nmap
nmap
COMMANDS
CHEAT SHEET awjunaid.com
nmap target Scan a single target nmap -sS target SYN scan (Stealth scan)
nmap target1 target2 Scan multiple targets nmap -sT target Connect scan (TCP)
nmap -iL targets.txt Scan targets from a list in a file nmap -sU target UDP scan
Port Specification nmap -sF target FIN scan (fin flag set)
nmap -sX target XMAS scan (FIN, URG, and PSH flags set)
Command Description
Protocol scan (Determine supported
nmap -p port target Scan a specific port nmap -sO target
protocols)
Command Description
Service and Version Detection
nmap --script
Run specific script
scriptname target
Command Description
nmap --script vuln target Scan for vulnerabilities using scripts
nmap -sV target Service and version detection
nmap --script-help
Get help for a specific script
Aggressive scan (OS detection, scriptname
nmap -A target
version, scripts)
nmap --script-updatedb Update script database
nmap --version-
Adjust version detection intensity
intensity 0-9 target
Output Options
Please note that this is a Command Description
comprehensive cheatsheet, and
not all options may be nmap -oN output.txt target Save normal output to a file
applicable or necessary for
every situation. Always ensure nmap -oX output.xml
target
Save output in XML format
you have proper authorization
before conducting any network nmap -oG output.grep
Save output in grepable format
scanning or testing. target
Command Description