workspace/skills/nmap-network-scan/SKILL.md
Host discovery and port scanning using nmap — ICMP/ARP host discovery, SYN/TCP/UDP port scanning with scope enforcement and audit logging. Use when discovering live hosts on a subnet, scanning for open ports, verifying firewall rules, or doing pre/post-change port scans
npx skillsauth add automateyournetwork/netclaw nmap-network-scanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" TOOL_NAME '{"param":"value"}'
| Tool | Purpose | Privileges |
|------|---------|-----------|
| nmap_ping_scan | ICMP+TCP host discovery (no port scan) | none |
| nmap_arp_discovery | ARP host discovery (LAN only) | cap_net_raw |
| nmap_top_ports | Fast scan of N most common ports | none |
| nmap_syn_scan | SYN half-open port scan (fast, stealthy) | cap_net_raw |
| nmap_tcp_scan | Full TCP connect scan (no root needed) | none |
| nmap_udp_scan | UDP port scan (DNS, SNMP, NTP, etc.) | cap_net_raw |
When asked "what's on this network?" or "scan this subnet":
Find live hosts first — avoids wasting time port-scanning dead IPs.
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" nmap_ping_scan '{"target":"192.168.1.0/24"}'
On directly-connected LANs, ARP discovery is more reliable:
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" nmap_arp_discovery '{"target":"192.168.1.0/24"}'
Scan the top 100 common ports on discovered hosts:
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" nmap_top_ports '{"target":"192.168.1.1","count":100}'
For deeper scanning, use SYN scan (faster) or TCP connect scan:
# SYN scan — faster, requires cap_net_raw
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" nmap_syn_scan '{"target":"192.168.1.1","ports":"1-65535"}'
# TCP connect — works without special privileges
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" nmap_tcp_scan '{"target":"192.168.1.1","ports":"22,80,443,8080"}'
Check for UDP services (DNS, SNMP, TFTP, NTP, syslog):
python3 $MCP_CALL "python3 -u $NMAP_MCP_SCRIPT" nmap_udp_scan '{"target":"192.168.1.1","ports":"53,67,68,69,123,161,162,500,514,1900"}'
target (required): IP, hostname, or CIDR rangetarget (required): CIDR range or IP (LAN segment only)target (required): IP, hostname, or CIDR rangecount (optional): Number of top ports to scan (default 100, max 65535)target (required): IP, hostname, or CIDR rangeports (optional): Port range (default "1-1024", use "common" for top 1000)target (required): IP, hostname, or CIDR rangeports (optional): Port range (default "1-1024")target (required): IP, hostname, or CIDR rangeports (optional): Port list or range (default: common UDP service ports)All targets are validated against the CIDR allowlist in config.yaml. Targets outside the allowed ranges are hard-rejected before nmap runs. Default allowed ranges:
127.0.0.0/8 (loopback)10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 (RFC1918)fd00::/8 (IPv6 ULA)All tools return structured JSON with:
scan_id — unique identifier for retrieving results latertarget — what was scannedhosts_up / per_host — discovered hosts with open portscount / total_open — summary countsnmap_list_scans / nmap_get_scantesting
Human-in-the-loop escalation via HumanRail — route low-confidence agent decisions, pre-destructive operation approvals, and ambiguous incident tickets to real human engineers. Human answers are verified and returned as structured output. Workers are paid via Lightning Network. Use when the agent is uncertain, when a destructive change needs explicit human sign-off beyond a ServiceNow CR, or when an ambiguous ticket requires human triage before automated handling.
testing
Manage EVE-NG node lifecycle. Use when listing nodes, checking runtime state, creating or deleting nodes, starting or stopping nodes or whole labs, verifying node details, or wiping node NVRAM back to factory defaults.
development
Manage EVE-NG labs and platform inventory. Use when listing labs, checking lab metadata, creating or deleting labs, importing or exporting lab archives, checking EVE-NG health or auth, or verifying available node images before build work.
tools
Execute live CLI commands on running EVE-NG nodes over telnet console. Use when running show commands, making live config changes, verifying protocol state, testing connectivity, checking console readiness, or interacting with IOS, Junos, VPCS, EOS, or NX-OS nodes.