masscan-scan

Performs high-speed large-scale port scanning across CIDR ranges using masscan.

1.7k|238|Updated Dec 7, 2019
One-click install
npx skills add https://github.com/wgpsec/AboutSecurity --skill masscan-scan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: masscan-scan
Source: https://github.com/wgpsec/AboutSecurity/tree/main/skills/tool/masscan-scan
Command: npx skills add https://github.com/wgpsec/AboutSecurity --skill masscan-scan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scanning large network ranges with traditional tools like nmap is slow and impractical for /16 or larger CIDR blocks. This Skill provides a structured methodology for using masscan, an asynchronous stateless scanner capable of millions of packets per second, to rapidly discover open ports across massive network segments.

Core Features & Use Cases

  • Large-Scale Scanning: Scan /16 or /8 CIDR ranges, full port ranges (0-65535), or internet-scale targets with tunable packet rates.
  • Flexible Output Formats: Export results in List, JSON, nmap-compatible XML, or grepable formats for downstream toolchains.
  • Advanced Options: Banner grabbing, interface/source-IP selection, exclude files, and pause/resume for long-running scans.
  • Use Case: During an internal penetration test, run sudo masscan 10.0.0.0/16 -p 22,80,443,3389 --rate 10000 -oL results.txt to quickly map live services, then feed the results to nmap -sV for service identification.

Quick Start

Ask the AI to scan the 10.0.0.0/24 network for common web ports using masscan and save the results to a list file.

Frequently Asked Questions about masscan-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan a large network range quickly with masscan?

Run masscan with a CIDR range, port list, and rate limit, for example: sudo masscan 10.0.0.0/16 -p 22,80,443,3389 --rate 10000 -oL results.txt. Root privileges are required, and the rate flag controls packets per second.

masscan vs nmap: which should I use for port scanning?

masscan is an asynchronous stateless scanner built for speed on large ranges like /16 networks, but it does not perform service identification. The recommended workflow is masscan for fast port discovery followed by nmap -sV for service detection.

Does masscan require root privileges to run?

Yes, masscan requires root privileges because it crafts raw packets for asynchronous stateless scanning. Run it with sudo, and optionally specify the network interface with -e and source IP with --adapter-ip.

What output formats does masscan support?

masscan supports List (-oL), JSON (-oJ), nmap-compatible XML (-oX), and grepable (-oG) output formats. The XML format integrates directly with nmap-compatible toolchains for further analysis.

Can I pause and resume a long masscan scan?

Yes, pressing Ctrl+C during a scan generates a paused.conf file capturing the scan state. Resume the scan later with sudo masscan --resume paused.conf, which is useful for very large scans like /8 ranges.

When should I not use masscan for port scanning?

Avoid masscan for small scopes where naabu or nmap is more convenient, and when you need service version detection, which masscan does not perform. Also tune the rate carefully, as high packet rates can saturate or disrupt networks.