Nmap
Network Mapper
Performance Tuning
Timing tablesgo from0to5, being3the default.
nmap -T4 192.168.1.1--min-parallelismallows to manually control the concurrency of the scan:
nmap -sS -T4 --min-parallelism 20 --max-retries 1 -p 80,443,22,3389 192.168.1.1Rate Limiting(--min-rate/--max-rate) gives you a better control over packets/second:
nmap -sS --min-rate 500 192.168.1.1--max-rtt-timeoutadjusts how long Nmap waits for responses before retrying:
Optimized for LANs
nmap -sS --max-rtt-timeout 200ms 192.168.1.1TCP Scans
Connect Scan
nmap -sT -sV -p- 192.168.1.1ACK Scan
nmap -sA 192.168.1.1Window Scan
nmap -sW 192.168.1.1Maimon Scan
nmap -sM 192.168.1.1Host Discovery
Ping Sweep
nmap -sn 192.168.1.0/24Disable Host Discovery
nmap -Pn 192.168.1.0/24List targets Only
nmap 192.168.1.1-3 -sLFrom Target File
nmap -iL targets.txtRange Scan
nmap 192.168.1.1-254TCP SYN Ping
nmap 192.168.1.1-5 -PS22-25,80TCP ACK Ping
nmap 192.168.1.1-5 -PA22-25,80ARP Ping
nmap 192.168.1.1-1/24 -PRPing Host (ICMP, ACK, ARP)
nmap -PE -PA80 -PR 192.168.1.0/24Host Scan with traceroute
nmap -iR 10 -sn -tracerouteScript for Discovery
nmap --script discovery 192.168.1.1DNS Scans
Standard Scan
nmap --dns-servers 8.8.8.8 192.168.1.1Disable DNS Resolution
nmap 192.168.1.1 -nResolve Hostnames in a Range
nmap 192.168.1.1-50 -sL -dns-server 192.168.1.1Service and OS Detection
Service Version Detection
nmap -sV 192.168.1.1OS Detection
nmap -O 192.168.1.1Limits OS Detection
nmap 192.168.1.1 -O -osscan-limitAggressive Scan
nmap -A 192.168.1.1Target Specific Ports
sudo nmap -sCV -oA nmap -p 'PORTS' [IP]UDP Scans
Basic Scan
nmap -sU 192.168.1.1Specific Ports
nmap -p 53,123,161 -sU -sC 192.168.1.1All Ports
nmap -p- -sU 192.168.1.1Service Detection
nmap -sU -sV 192.168.1.1Script Scanning
nmap -sU --script=udp* 192.168.1.1Host discovery for UDP
UDP Ping first
nmap -PU53,161,123 192.168.1.1-254 -oN udp_live_hosts.txt Then scan live hosts
nmap -sS -sV -p- -iL udp_live_hosts.txt -oA full_scan --max-retries 1 Other Techniques
Last updated