Table of Contents
Masscan is a powerful network scanning tool used by cybersecurity professionals to quickly identify live hosts and open ports across large networks. Mastering its commands can significantly enhance your network reconnaissance capabilities. Here are the top 10 Masscan commands every cybersecurity professional should know.
1. Basic Scan of a Single IP Address
This command scans a specific IP address for open ports.
masscan 192.168.1.1 -p0-65535
2. Scan a Range of IP Addresses
Use this to scan multiple IPs within a range.
masscan 192.168.1.0/24 -p80,443
3. Scan Specific Ports
Target specific ports instead of the entire port range.
masscan 10.0.0.0/16 -p22,80,443
4. Use a Rate Limit
Control the scan speed with the –rate option.
masscan 192.168.1.0/24 -p1-65535 --rate=1000
5. Save Scan Results to a File
Export results for further analysis.
masscan 192.168.1.0/24 -p80 -oG results.txt
6. Scan with a Specific Source IP
Specify a source IP address for the scan.
masscan 192.168.1.0/24 -p80 --source-ip=192.168.1.100
7. Use a Custom Timeout
Adjust the timeout for responses.
masscan 192.168.1.0/24 -p80 --wait=2
8. Enable Verbose Output
Get detailed information during the scan.
masscan 192.168.1.0/24 -p80 --verbose
9. Scan Using a List of Targets
Scan targets listed in a file.
masscan -iL targets.txt -p80,443
10. Combine Multiple Options
Use several options together for a customized scan.
masscan 192.168.1.0/24 -p80,443 --rate=1000 --output-format=JSON -oX scan_results.xml