Masscan probes IP addresses and port ranges with very high packet rates, aimed at sweeping large networks or the public Internet. Its options and output formats are kept familiar to nmap users.
Overview
Masscan is a command-line TCP port scanner built to search huge address and port ranges quickly. It sends SYN packets asynchronously and at very high transmit rates can cover the entire Internet in under five minutes from one machine.
Operation and flags are intentionally close to nmap, but the tool favors broad sweeps across many hosts rather than deep inspection of a single system. You must choose ports with -p; targets are IP addresses or simple ranges without DNS names. Many nmap-style options are applied by default, including SYN scan, no host ping, no DNS resolution, randomized host order, and sending at the Ethernet layer.
Internally it runs its own TCP/IP stack, which can clash with the host OS during anything beyond simple port scans. Banner grabbing and similar checks may need a separate source IP on the local subnet or firewall rules so the OS does not reset connections before results are recorded. Banner checks are supported for common protocols such as HTTP, SSH, SMTP, and SMB.
Results can be written as text, XML, JSON, grepable output, a compact binary format, or a simple host-and-port list. Scan parameters can be saved in a configuration file and replayed. Compared with nmap, masscan targets wide-area discovery, while nmap suits intensive scans of one machine or a small range.
Key features
- Asynchronous high-rate SYN scanning
- Arbitrary IP and port ranges
- IPv4 and IPv6 targets
- Nmap-like command-line options
- Protocol banner grabbing
- Multiple export formats including XML and JSON
- Configurable scan rate limits
- Include and exclude range lists
Use cases
- Sweeping corporate network ranges for port exposure
- Internet-wide discovery with exclusions
- Fast open-port mapping on large subnets
- Collecting service banners at scale
- Security research on reachable services