Cheatography
https://cheatography.com
Nmap In-Depth Cheat Sheet
Alive Hosts
NMAP
nmap -sn -n 172.16.0.1\24 | grep "Nmap" | cut -d " " -f 5 > alives
NIX
bash/sh
for x in {1..254..1};do ping -c 1 172.16.0.$x | grep "64 b" | cut -d" " -f4 >> alive.hosts; done
WIN
cmd.exe
for /L %i in (10,1,254) do @ (for /L %x in (10,1,254) do @ ping -n 1 -w 172.16.%i.%x 2>nul | find "Reply" && echo 172.16.%i.%x >> alive.hosts)
powershell.exe
Foreach($x in 1..255){Test-Connection 172.16.0.$x}
|
NMAP
Alives Generation
nmap -sn -n | grep "Nmap" | awk $6 > alives.hosts
nmap -sn -n -oN scan.nmap && awk $6 scan.nmap > alives.hosts
Very Minimal Footprint with Fragmentation & Decoys
nmap -sS --max-retries 0 --scan-delay 3 --os-limit --max-os-tries 1 -T0 -n -Pn -iL targets.txt -vv -f -D RND:10 --ttl 32
Conscious Footprint
nmap -sS -sN -p1,2-9,39 -Pn -n -T2 -f 192.168.0.1\24
Aggressive Everything
nmap -A -p- 0.0.0.0\0
XML Web Presentation
nmap -sT -p- 192.168.1.5 -oX webpresentation.xml --webxml
|
NMAP Flags/Args
|
|
|
|
|
|
|
|
|
Don't resolve IP addresses
|
|
|
|
Always resolve IP addresses
|
|
|
|
Fast amount of ports Scan
|
|
|
|
|
|
|
|
Timing speed very slow (1) to very fast (5)
|
|
|
|
|
|
|
|
Fragment Packets (IDS/FW evasion)
|
|
|
|
|
|
10 Random source hosts for '-D'
|
|
|
|
|
|
|
|
|
|
|
|
ICMP Address Mask Query5A
|
|
|
|
Set Time-To-Live for packets
|
|
|
|
|
|
List interfaces (ifconfig)
|
|
Trace route to destination
|
|
Time between writing to stdout
|
|
|
|
Use with -sU, size of UDP payload
|
|
|
|
Resolve hostnames with localhost
|
|
Specify name server addresses for resolutions
|
|
Scan to resume from output file
|
|
|
|
Specify raw IP frame hex options
|
|
--ip-options \x01\x07\x04\x00*36\x01
|
|
|
|
|
|
TCP Xmas Scan (all flags)
|
|
|
1A. Sends ICMP Echo Req, SYN:443, ACK:80, ICMP Timestamp Req
2A. Destination port 80, may specify alternate port with the '-p' flag.
3A. Destination port 40125, may specify alternate port with the '-p' flag.
4A. Expects ICMP Code 14 reply, indicates host is available.
5A. Expects ICMP Code 18 reply, indicates host is available.
6A. Includes, OS detection, version scans, script scans, and traceroute.
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by djf