Nmap Cheatsheet
How to Install Nmap
Nmap installation:
Useful Commands for Nmap
-sS: Perform a stealthy SYN scan
-sT: Perform a TCP connect scan
-sU: Perform a UDP scan
-p [port]: Specify the port to scan
-p-: Scan all 65535 ports
-O: Enable OS detection
-A: Enable OS detection, version detection, script scanning, and traceroute
-v: Increase verbosity level
-Pn: Disable host discovery
-T[0-5]: Set timing template (0 = slowest, 5 = fastest)
--script [script]: Specify a script to run
-oN [file]: Save output in normal format
-oX [file]: Save output in XML format
-oG [file]: Save output in grepable format
Examples of Nmap Commands
Perform a basic SYN scan:
Perform a TCP connect scan:
Perform a UDP scan:
Perform OS detection:
Scan all ports:
Perform a service version detection scan:
Save the output in normal format: