NMAP Cheat Sheet Flashcards
TCP SYN port scan (Default)
-sS
Example:
nmap 192.168.1.1 -sS
TCP connect port scan
Default without root privilege
-sT
Example:
nmap 192.168.1.1 -sT
UDP port scan
-sU
Example:
nmap 192.168.1.1 -sU
TCP ACK port scan
-sA
Example:
nmap 192.168.1.1 -sA
TCP Window port scan
-sW
Example:
nmap 192.168.1.1 -sW
TCP Maimon port scan
-sM
Example:
nmap 192.168.1.1 -sM
No Scan. List targets only
-sL
Example:
nmap 192.168.1.1-3 -sL
- Disable port scanning. Host discovery only.
- Good for seeing which hosts on a network are up
-sn
Example:
nmap 192.168.1.1/24 -sn
- Disable host discovery. Port scan only.
- Good for more intrusive scans and saves time
-Pn
Example:
nmap 192.168.1.1-5 -Pn
Port range
-p
Example:
nmap 192.168.1.1 -p 21-100
Port scan multiple TCP and UDP ports
-p
Example:
nmap 192.168.1.1 -p U:53,T:21-25,80
Port scan all ports
-p-
Example:
nmap 192.168.1.1 -p-
Fast port scan (100 ports)
-F
Example:
nmap 192.168.1.1 -F
Attempts to determine the version of the service running on port
-sV
Example:
nmap 192.168.1.1 -sV
Enables OS detection, version detection, script scanning, and traceroute
-A
Example:
nmap 192.168.1.1 -A
Remote OS detection using TCP/IP stack fingerprinting
-O
Example:
nmap 192.168.1.1 -O
- Scan speed setting
- Paranoid Intrusion Detection System evasion
-T0
Example:
nmap 192.168.1.1 -T0
- Scan speed setting
- Sneaky Intrusion Detection System evasion
-T1
Example:
nmap 192.168.1.1 -T1
- Scan speed setting
- Polite slows down the scan to use less bandwidth and use less target machine resources
-T2
Example:
nmap 192.168.1.1 -T2
- Scan speed setting
- Normal which is default speed
-T3
Example:
nmap 192.168.1.1 -T3
- Scan speed setting
- Aggressive speeds scans; assumes you are on a reasonably fast and reliable network
-T4
Example:
nmap 192.168.1.1 -T4
- Scan speed setting
- Insane speeds scan; assumes you are on an extraordinarily fast network
-T5
Example:
nmap 192.168.1.1 -T5
Requested scan (including ping scans) use tiny fragmented IP packets. Harder for packet filters
-f
Example:
nmap 192.168.1.1 -f
Send scans from spoofed IPs
-D
Example:
nmap -D 192.168.1.101,192.168.1.102,192.168.1.103,192.168.1.23 192.168.1.1
Use given source port number
-g
Example:
nmap -g 53 192.168.1.1
Normal output to the file normal.file
-oN
Example:
nmap 192.168.1.1 -oN normal.file
XML output to the file xml.file
-oX
Example:
nmap 192.168.1.1 -oX xml.file
Grepable output to the file grep.file
-oG
Example:
nmap 192.168.1.1 -oG grep.file
Output in the three major formats at once
-oA
Example:
nmap 192.168.1.1 -oA results
Increase the amount of info (use twice or more for greater effect)
-v
Example:
nmap 192.168.1.1 -v
Scan targets from a file
-iL
Example:
nmap -iL targets.txt
Scan 100 random hosts
-iR
Example:
nmap -iR 100