home / security / masscan

masscan

25k

Internet-scale port scanner for sweeping large IP ranges, finding open ports, and collecting basic service banners.

$brew install masscan
Language
C
Stars
25,397
Category
Security
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

masscan is an Internet-scale port scanner for sweeping large IPv4 or IPv6 ranges at high packet rates. It is built for broad exposure discovery and lightweight banner collection, not the deeper host-by-host analysis you would normally do with nmap.

What It Enables
  • Sweep large CIDR ranges or explicit target lists for open TCP, UDP, or other supported ports, with rate limits, excludes, and resumable config files.
  • Collect lightweight service banners from common protocols such as HTTP, SSH, TLS, SMB, RDP, and VNC after open ports are found.
  • Split wide scans across shards or adapters and export results as JSON, NDJSON, XML, grepable, binary, or simple list output for later analysis.
Agent Fit
  • The CLI is non-interactive and explicit, so it fits scripted discovery jobs where an agent needs to inspect exposed network surface area quickly.
  • Structured output is real: the source ships JSON and NDJSON writers, which makes downstream parsing and ingestion straightforward.
  • It is strongest as an inspect and verify primitive; safe use usually depends on a skill that encodes scope, exclude lists, rate caps, and follow-up handling.
Caveats
  • Banner grabbing uses masscan's separate TCP/IP stack, so source IP or port selection and host firewall rules matter if you want reliable results.
  • The tool can send traffic fast enough to disrupt networks or trigger abuse responses, so unattended runs need strict target authorization and conservative rate control.