2022-10-10 16:35:44 +02:00
|
|
|
# masscan
|
2021-10-17 10:36:55 -04:00
|
|
|
|
2025-07-29 05:12:25 +00:00
|
|
|
> A very fast network scanner.
|
|
|
|
> Works best with elevated privileges. For help with Nmap compatibility, run `masscan --nmap`.
|
2025-03-28 05:26:23 +02:00
|
|
|
> More information: <https://manned.org/masscan>.
|
2021-10-17 10:36:55 -04:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
- Scan an IP or network subnet for port 80:
|
2021-10-17 10:36:55 -04:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`masscan {{ip_address|network_prefix}} {{[-p|--ports]}} {{80}}`
|
2021-10-17 10:36:55 -04:00
|
|
|
|
|
|
|
- Scan a class B subnet for the top 100 ports at 100,000 packets per second:
|
|
|
|
|
|
|
|
`masscan {{10.0.0.0/16}} --top-ports {{100}} --rate {{100000}}`
|
|
|
|
|
|
|
|
- Scan a class B subnet avoiding ranges from a specific exclude file:
|
|
|
|
|
2021-11-17 19:53:43 +02:00
|
|
|
`masscan {{10.0.0.0/16}} --top-ports {{100}} --excludefile {{path/to/file}}`
|
2021-10-17 10:36:55 -04:00
|
|
|
|
2025-04-11 09:00:29 +02:00
|
|
|
- Scan a class B subnet with Nmap-like version detection (banner grabbing):
|
|
|
|
|
|
|
|
`masscan {{10.0.0.0/16}} {{[-p|--ports]}} {{22,80}} --banners --rate {{100000}}`
|
|
|
|
|
2024-04-16 03:24:05 +10:00
|
|
|
- Scan the Internet for web servers running on port 80 and 443:
|
2021-10-17 10:36:55 -04:00
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`masscan {{0.0.0.0/0}} {{[-p|--ports]}} {{80,443}} --rate {{10000000}}`
|
2024-04-16 03:24:05 +10:00
|
|
|
|
|
|
|
- Scan the Internet for DNS servers running on UDP port 53:
|
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`masscan {{0.0.0.0/0}} {{[-p|--ports]}} {{U:53}} --rate {{10000000}}`
|
2021-10-17 10:36:55 -04:00
|
|
|
|
|
|
|
- Scan the Internet for a specific port range and export to a file:
|
|
|
|
|
2025-03-28 05:26:23 +02:00
|
|
|
`masscan {{0.0.0.0/0}} {{[-p|--ports]}} {{0-65535}} --output-format {{binary|grepable|json|list|xml}} --output-filename {{path/to/file}}`
|
2024-04-16 03:24:05 +10:00
|
|
|
|
|
|
|
- Read binary scan results from a file and output to `stdout`:
|
|
|
|
|
|
|
|
`masscan --readscan {{path/to/file}}`
|