Quick Reference

🔧 Try the Interactive Builder

Don't want to memorize syntax? Use our Interactive Nmap Command Builder to visually configure scans and generate commands.

Comprehensive quick reference for Nmap - the essential network discovery and security auditing tool.

🔍 Host Discovery

Ping scan (no port scan)nmap -sn 192.168.1.0/24
Skip host discoverynmap -Pn target
TCP SYN pingnmap -PS22,80,443 target
TCP ACK pingnmap -PA22,80,443 target
UDP pingnmap -PU53,161 target
ICMP echo pingnmap -PE target
ICMP timestamp pingnmap -PP target
ARP ping (local network)nmap -PR 192.168.1.0/24
List targets onlynmap -sL 192.168.1.0/24

🚪 Port Scanning

TCP SYN scan (stealth)nmap -sS target
TCP connect scannmap -sT target
UDP scannmap -sU target
Specific portsnmap -p 22,80,443 target
Port rangenmap -p 1-1000 target
All portsnmap -p- target
Top 100 portsnmap --top-ports 100 target
FIN scannmap -sF target
Xmas scannmap -sX target
Null scannmap -sN target

🔬 Service & Version Detection

Service version detectionnmap -sV target
Light version scannmap -sV --version-light target
Aggressive version scannmap -sV --version-all target
Version intensity (0-9)nmap -sV --version-intensity 5
OS detectionnmap -O target
Aggressive OS detectionnmap -O --osscan-guess target
Service + OS + Scriptnmap -A target
Traceroutenmap --traceroute target

📜 NSE Scripts

Default scriptsnmap -sC target
Specific scriptnmap --script=http-headers target
Script categorynmap --script=vuln target
Multiple scriptsnmap --script=smb*,vuln target
Script with argsnmap --script-args=user=admin
Update script databasenmap --script-updatedb
Script helpnmap --script-help=http-*
Safe scripts onlynmap --script=safe target

⚠️ Vulnerability Scanning

All vuln scriptsnmap --script=vuln target
SMB vulnerabilitiesnmap --script=smb-vuln* target
EternalBlue checknmap --script=smb-vuln-ms17-010
HTTP vulnerabilitiesnmap --script=http-vuln* target
SSL vulnerabilitiesnmap --script=ssl-* target
Heartbleed checknmap --script=ssl-heartbleed
Shellshock checknmap --script=http-shellshock
Vulscan (CVE database)nmap --script=vulscan target

⏱️ Timing & Performance

Paranoid (IDS evasion)nmap -T0 target
Sneakynmap -T1 target
Polite (less bandwidth)nmap -T2 target
Normal (default)nmap -T3 target
Aggressivenmap -T4 target
Insane (fastest)nmap -T5 target
Min parallelismnmap --min-parallelism 100
Max retriesnmap --max-retries 2 target
Host timeoutnmap --host-timeout 30m

📄 Output Formats

Normal outputnmap -oN scan.txt target
XML outputnmap -oX scan.xml target
Grepable outputnmap -oG scan.gnmap target
All formatsnmap -oA scan target
Verbose outputnmap -v target
Extra verbosenmap -vv target
Debuggingnmap -d target
Reason for port statenmap --reason target
Resume scannmap --resume scan.gnmap

🥷 Evasion Techniques

Fragment packetsnmap -f target
Custom MTUnmap --mtu 24 target
Decoy scannmap -D decoy1,decoy2,ME target
Spoof source IPnmap -S spoofed_ip target
Spoof source portnmap --source-port 53 target
Spoof MAC addressnmap --spoof-mac 0 target
Append random datanmap --data-length 25 target
Bad checksumnmap --badsum target
Idle/zombie scannmap -sI zombie target

🎯 Common Scan Profiles

Quick Discovery

nmap -sn -T4 192.168.1.0/24

Fast host discovery on local network

Standard Scan

nmap -sS -sV -sC -T4 target

SYN scan with version detection and scripts

Full Comprehensive

nmap -sS -sV -sC -O -p- -T4 -oA full target

Complete scan with all ports, OS detection, output

Aggressive Scan

nmap -A -T4 target

OS detection, version, scripts, traceroute

Stealth Scan

nmap -sS -T2 -f --data-length 25 target

Slow, fragmented packets for IDS evasion

Vulnerability Scan

nmap -sV --script=vuln -T4 target

Version detection with vulnerability scripts

UDP Services

nmap -sU -sV --top-ports 20 target

Top UDP ports with service detection

Web Server Scan

nmap -sV -p 80,443 --script=http-* target

HTTP/HTTPS enumeration with all HTTP scripts

📚 NSE Script Categories

auth - Authentication
broadcast - Network discovery
brute - Brute force
default - Safe default
discovery - Information
dos - Denial of service
exploit - Exploits
external - Third-party
fuzzer - Fuzzing
intrusive - May crash
malware - Malware detection
safe - Non-intrusive
version - Version detect
vuln - Vulnerabilities