|
| 1 | +## 🌀 Dismap - Asset discovery and identification tool |
| 2 | +<a href="https://github.com/zhzyker/dismap"><img alt="Release" src="https://img.shields.io/badge/golang-1.6+-9cf"></a> |
| 3 | +<a href="https://github.com/zhzyker/dismap"><img alt="Release" src="https://img.shields.io/badge/dismap-0.1-ff69b4"></a> |
| 4 | +<a href="https://github.com/zhzyker/dismap"><img alt="Release" src="https://img.shields.io/badge/LICENSE-GPL-important"></a> |
| 5 | + |
| 6 | + |
| 7 | +[[中文readme点我]](https://github.com/zhzyker/dismap/blob/main/readme.md) |
| 8 | +Dismap positioning is an asset discovery and identification tool; its characteristic function is to quickly identify Web fingerprint information and locate asset types. Assist the red team to quickly locate the target asset information, and assist the blue team to find suspected vulnerabilities |
| 9 | + |
| 10 | +Dismap has a comprehensive fingerprint rule library, so you can easily customize new recognition rules. With the help of golang's concurrency advantages, rapid asset detection and identification can be achieved |
| 11 | + |
| 12 | +The scan results can be directly submitted to [vulmap](https://github.com/zhzyker/vulmap) (>=0.8) for vulnerability scanning. Introduction to rule base in [RuleLab](https://github.com/zhzyker/dismap#-rulelab) |
| 13 | + |
| 14 | +## 🏂 Run |
| 15 | +Dismap is a binary file for Linux, MacOS, and Windows. Go to [Release](https://github.com/zhzyker/dismap/releases) to download the corresponding version to run: |
| 16 | +```Bash |
| 17 | +# Linux and MacOS |
| 18 | +zhzyker@debian:~$ chmod +x dismap |
| 19 | +zhzyker@debian:~$ ./dismap -h |
| 20 | + |
| 21 | +# Windows |
| 22 | +C:\Users\zhzyker\Desktop> dismap.exe -h |
| 23 | +``` |
| 24 | +>  |
| 25 | +>  |
| 26 | +
|
| 27 | +## 🎡 Optons |
| 28 | +```Python |
| 29 | +-file string |
| 30 | + Select a URL file for batch identification |
| 31 | +-ip string |
| 32 | + Network segment [e.g. -ip 192.168.1.0/24 or -ip 192.168.1.1-10] |
| 33 | +-np |
| 34 | + Not use ICMP/PING to detect surviving hosts |
| 35 | +-output string |
| 36 | + Save the scan results to the specified file (default "output.txt") |
| 37 | +-port string |
| 38 | + Custom scan ports [e.g. -port 80,443 or -port 1-65535] |
| 39 | +-thread int |
| 40 | + Number of concurrent threads, (adapted to two network segments 2x254) (default 508) |
| 41 | +-timeout int |
| 42 | + Response timeout time, the default is 5 seconds (default 5) |
| 43 | +-url string |
| 44 | + Specify a target URL [e.g. -url https://example.com] |
| 45 | +``` |
| 46 | + |
| 47 | +## 🎨 Examples |
| 48 | +```Bash |
| 49 | +zhzyker@debian:~$ ./dismap -ip 192.168.1.1/24 |
| 50 | +zhzyker@debian:~$ ./dismap -ip 192.168.1.1/24 -output result.txt |
| 51 | +zhzyker@debian:~$ ./dismap -ip 192.168.1.1/24 -np -timeout 10 |
| 52 | +zhzyker@debian:~$ ./dismap -ip 192.168.1.1/24 -thread 1000 |
| 53 | +zhzyker@debian:~$ ./dismap -url https://github.com/zhzyker/dismap |
| 54 | +zhzyker@debian:~$ ./dismap -ip 192.168.1.1/24 -port 1-65535 |
| 55 | +``` |
| 56 | + |
| 57 | +## ⛪ Discussion |
| 58 | +* Dismap bug feedback or new feature suggestion [click me](https://github.com/zhzyker/dismap/issues) |
| 59 | +* Twitter: https://twitter.com/zhzyker |
| 60 | + |
| 61 | +## 🌈 RuleLab |
| 62 | +The entire rule base is a struct located in [rule.go](https://github.com/zhzyker/dismap/blob/main/config/rule.go) |
| 63 | +Rough format: |
| 64 | +```Golang |
| 65 | +Rule: |
| 66 | + Name: name /* Define rule name */ |
| 67 | + Type: header|body|ico /* Support recognized types, header, body, ico can be any logical combination, ico is to request favicon.ico separately and calculate MD5*/ |
| 68 | + Mode: and|or /* Type judgment logic */ |
| 69 | + Rule |
| 70 | + InBody: str /* Specify which str exists in the response body */ |
| 71 | + InHeader: str /* Specify which str exists in the response Header */ |
| 72 | + InIcoMd5: str_md5 /* MD5 of favicon.ico */ |
| 73 | + Http: |
| 74 | + ReqMethod: GET|POST /* Custom request method, currently supports GET and POST */ |
| 75 | + ReqPath: str /* Custom request web path */ |
| 76 | + ReqHeader: []str /* Customize the header of the Http request */ |
| 77 | + ReqBody: str /* Customize the body of the POST request */ |
| 78 | +``` |
| 79 | +**Example1:** |
| 80 | + |
| 81 | +Whether the character `<flink-root></flink-root>` exists in the response body |
| 82 | +```Golang |
| 83 | +{"Apahce Flink", "body", "", InStr{"(<flink-root></flink-root>)", "", ""}, ReqHttp{"", "", nil, ""}}, |
| 84 | +``` |
| 85 | + |
| 86 | +**Example2:** |
| 87 | + |
| 88 | +Customize the request path `/myportal/control/main`, and determine whether there are header characters and body characters in the result of the custom request |
| 89 | +It can be found that all support regular expressions |
| 90 | +```Golang |
| 91 | +{"Apache OFBiz", "body|header", "or", InStr{"(Apache OFBiz|apache.ofbiz)", "(Set-Cookie: OFBiz.Visitor=(.*))", ""}, ReqHttp{"GET", "/myportal/control/main", nil, ""}}, |
| 92 | +``` |
| 93 | + |
| 94 | +**The logical relationship of header, body, ico can be combined at will, but cannot be combined repeatedly:** |
| 95 | + |
| 96 | +Can: `"body|header|ico", "or"` or `"body|header|ico", "or|and"` or `"body|ico", "and"` |
| 97 | +Can't: `"body|body", "or"` |
| 98 | +Repeated combination is not allowed to be specified by type, but it can be achieved through InBody to determine the character: `"body", "", InStr{"(str1|str2)"}` |
0 commit comments