Information Gathering
Masscan is an internet-scale port scanner. It can scan the entire Internet in under 6 minutes, transmitting up to 10 million packets per second utilizing asynchronous transmit setups.
sudo apt install masscan
masscan [options] <target>
Masscan is the fastest internet-scale port scanner available, capable of transmitting up to 10 million packets per second. It uses asynchronous transmission to scan massive IP ranges without the overhead of maintaining TCP connection state.
Created by Robert David Graham in 2013, Masscan was designed to scan the entire IPv4 address space in under 6 minutes. It achieves this by operating at the raw packet level, sending SYN packets and analyzing responses without completing TCP handshakes.
While Masscan excels at speed, it trades off detailed analysis capabilities. It identifies open ports but does not perform service detection or OS fingerprinting. For comprehensive scanning, Masscan is typically used as a first pass to identify live hosts, followed by Nmap for deeper analysis.
masscan -p80,443 192.168.1.0/24 --rate 1000Network subnet scan - Quickly sweep an active internal scope target range for web operational setupsmasscan 192.168.1.0/24 -p80,443Scan common web portsmasscan 10.0.0.0/8 -p0-65535 --rate 10000Full port scanmasscan 192.168.1.0/24 --top-ports 100Top 100 portsmasscan 192.168.1.0/24 -p22,3389 -oL output.txtSave resultsmasscan 192.168.1.0/24 -p 80,443Scan for web portsmasscan 192.168.1.0/24 -p0-65535 --rate 1000Full port scan at 1000 ppsmasscan 192.168.1.0/24 -p 22 --bannersSSH banner grabbingmasscan 192.168.1.0/24 -p 80 --open-onlyShow only open portsmasscan 192.168.1.0/24 -p 80 -oL live.txtList output formatmasscan 192.168.1.0/24 -p 80 -oJ results.jsonJSON outputmasscan 192.168.1.0/24 -p 80 -oX results.xmlXML outputmasscan 192.168.1.0/24 -p 80 -oG grep.txtGrepable outputmasscan 192.168.1.0/24 -p 80 --adapter eth0Specific interfacemasscan 192.168.1.0/24 -p 80 --source-port 61000Custom source portScan the entire IPv4 address space to discover hosts and open services globally.
Quickly map large enterprise networks with thousands of IP addresses.
Discover all open ports across entire IP ranges for asset documentation.
Monitor for new open ports appearing on your network over time.
Find unauthorized services and devices on corporate networks.
Masscan output shows discovered open ports on target systems. Results include IP address, port number, protocol, and service version when detected. Open ports indicate potential attack surfaces.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.