- Basic scans:
nmap <hostip>
- Scan Single IPsnmap <hostip1> <hostip2>
- Scan Specific IPsnmap 192.168.1.1-254
- Scan a Rangenmap scanme.domain.name
- Scan a domainnmap 192.168.1.0/24
- Scan using CIDR notationnmap -iL targets.txt
- Scan targets from a filenmap -iR 100
- Scan 100 random hostsnmap --exclude 192.168.1.1
- Excude listed host
- Scans:
nmap -sP 10.7.1.0/24
: ping multiple ips at oncenmap -p <port(s)> <hostaddress
: scan specific portsnmap -sT <host>
: TCP (full open) scan - using full 3 way handshakenmap -sS -p <port(s)> <host>
- Stealthy scan (don't let TCP 3 way handshake complete to avoid getting caught.nmap -O <host>
: OS Detectionnmap -A <host>
: OS Detection + Version Detection + Script Scanning + traceroutenmap -sV <host>
: Service version detectionnmap -D <decoy ip> <host>
: Add Decoynmap --script ssl-enum-ciphers -p <port> <host>
: Check SSL
Foot notes:
nmap -sV -Sc -oA nmap/ <hostip>
-sV ==> Version detection
-sC ==> Run default scripts
-oA ==> Save the output in all formats