NMAP Commands Flashcards
-iL
scan targets from a file
-iR
scan 100 random hosts
-exclude
exclude listed host
-sS
tcp syn port scan (default)
-sT
tcp connect port scan (default without root privelege)
-sU
UDP port scan
-sA
tcp ack port scan
-sW
tcp window port scan
-sM
tcp maimon port scan
-sL
no scan, list targets only
-sn
disable port scanning, host discovery only
-Pn
disable host discover, port scan only
-PS
tcp syn discovery on port x (port 80 by default)
-PA
tcp ack discovery on port x (80 by default)
-PU
udp discovery on port x (40125 by default)
-PR
arp discovery on local network
-n
never do DNS resolution
-p
port scan for port x
-p 10-21
port range 10-21
-p U:53,T:21-25,80
port scan multiple tcp and udp ports
-p-
port scan all ports
-p http, https
port scan from service name
-F
fast port scan (100 ports)
-top-ports x
port scan the top x ports
-p- 65535
leaving off the initial port in range makes the scan start at port 1
-p0-
leaving off the end port in range makes the scan go through to port 65535
-sV
attempts to determine version of service running on port
-sV -version-intensity
intensity level 0-9. higher number increases possibility of correctness
-sV -version-light
enable light mode, lower possibility of correctness. faster
-sV -version-all
enable intensity level 9. higher possibility of correctness, slower
-A
enable OS detection, version detection, script scanning, and traceroute
-O
remote OS detection
-O -osscan-guess
makes nmap guess more aggressively
-O -max-os-tries
set the max number of OS detection tries
-T0 > -T5
adjust scan speed
0: paranoid
1: sneaky
2: polite
3: normal
4: aggressive
5: insane
-sC
scan with default NSE scripts
-script (ex. -script=banner)
scan with a single script
nmap -script whois* domain.com
whois query
-f
request scan (including ping) use tiny fragmented IP packets. harder for packet filters
-D
send scans from spoofed IPs
-g
use given source port number
-oN normal.file
normal output to normal.file
-oX xml.file
XML output to file xml.file
-oG grep.file
grepable output to the file grep.file