nmap Cheat Sheet
A quick Nmap cheat sheet for your reference, covering essential commands and options:
Basic Nmap Scanning Commands
- Scan a single IP:
 - Scan a range of IPs:
Example:
nmap 192.168.1.1-10 - Scan an entire subnet:
 - Scan a list of IPs from a file:
 
Common Scan Types
- TCP SYN scan (default and stealthier):
 - TCP Connect scan:
 - UDP scan:
 - Aggressive scan (includes OS detection, version detection, script scanning, and traceroute):
 - OS and Version Detection:
 - Service Version Detection:
 
Specifying Ports
- Scan a specific port:
 - Scan a range of ports:
 - Scan top 1000 common ports (default):
 - Scan all 65535 ports:
 
Output Options
- Save output to a text file:
 - Save output in XML format:
 - Save output in all formats:
 
Advanced Techniques
- Scan using a specific timing template (0–5; 5 is the fastest):
Example:
nmap -T4 <target> - Scan with a spoofed IP:
 - Disable DNS resolution:
 - Traceroute to detect network paths:
 - Scan for scripts (e.g., 
--script=vulnfor vulnerabilities):Example:
nmap --script=vuln <target> 
Example Commands
- Full TCP SYN scan on all ports with OS detection:
 - Fast scan of top 100 ports and output to a file:
 
Helpful Tips
- Use 
-vor-vvfor verbose mode. - Combine multiple options to customize scans, e.g., 
nmap -sS -p 80,443 -A -T4 <target> 
Learn more about nmap.
Total 0 Votes
 0
 0