Scan Types
Nmap offers thirteen distinct scan techniques, each designed for different network conditions, target types, and stealth requirements. Choosing the right scan type is one of the most important decisions in any Nmap engagement.
Detailed Scan Type Reference
Click any scan type to expand and read its full technical explanation, including how it works under the hood, when to use it, and common pitfalls.
Scan Type Comparison
Use this table to quickly compare scan types across speed, stealth, privilege requirements, and best use cases.
| Scan Type | Speed | Stealth | Root | Best For |
|---|---|---|---|---|
| -sS (SYN) | Fast | High | Yes | General reconnaissance |
| -sT (Connect) | Medium | Low | No | Non-root scanning |
| -sU (UDP) | Very Slow | Medium | Yes | DNS, SNMP, VPN |
| -sN/sF/sX | Medium | Medium | Yes | Simple stateless filters |
| -sA (ACK) | Fast | High | Yes | Firewall rule mapping |
| -sI (Idle) | Slow | Maximum | Yes | Ultimate stealth |
| -sV (Version) | Slow | Low | No | Vulnerability assessment |
The TCP Three-Way Handshake
Understanding the TCP handshake is essential for understanding why SYN scans are stealthy and why Connect scans are not. This is the foundation of all TCP scanning.
Normal Connection vs SYN Scan
Normal Three-Way Handshake
The full connection is logged by the OS and the application.
SYN Scan (Stealth)
No full connection ever exists. Often not logged by applications.
Important Considerations
Important
-sS, -sN, -sF, -sX) require root/administrator privileges because they craft raw TCP packets. Without root, Nmap silently falls back to -sT.Warning
Info
-sU) are extremely slow. Always limit the port range with -p when scanning UDP. Scanning all 65,535 UDP ports can take hours or days.Tip
-sS (SYN scan) + -sV (version detection) + -O (OS detection) covers 95% of reconnaissance needs on Linux and macOS targets.Quick Reference Commands
1nmap -sS 192.168.1.1
1nmap -sT 192.168.1.1
1nmap -sU -p 53,161,500 192.168.1.1
1nmap -sA 192.168.1.1
1nmap -sN 192.168.1.1
1nmap -sn 192.168.1.0/24
1nmap -sV 192.168.1.1
1nmap -sS -sV -O 192.168.1.1