Post

Nmap Cheat Sheet

A quick-access reference covering essential Nmap commands, scanning techniques, evasion tricks, and enumeration options for fast and effective network reconnaissance.

Nmap Cheat Sheet

What is NMAP?

Nmap is a free and open-source tool for network discovery and security auditing that scans networks to discover hosts, services, and operating systems

Nmap Target Specification

Define the specific IPs, ranges, or subnets you want Nmap to examine during reconnaissance.

COMMANDDESCRIPTION
nmap $targetipScan a single IP
nmap 10.10.10.10 10.10.10.20Scan specific IPs
nmap 10.10.10.10-20Scan a range of IPs
nmap $domainScan a domain
nmap 10.10.10.0/24Scan using CIDR notation
nmap -iL $filenameScan a list of targets
nmap -iR 20Scan 20 random hosts
nmap -exclude $targetipExclude listed IP

Bypassing Filters

SWITCHDESCRIPTION
-fFragment packets
-g 80Spoof source port
-D RND:10Use random decoys
-sI $zombieip $targetipIdle (zombie) scan
-sAACK scan
--spoof-macSpoof MAC address

Saving Scans

SWITCHDESCRIPTION
-oXOutput in XML format
-oNNormal text output
-oGGreppable output
-oAOutput in all formats
-append-outputAppend to existing output

Scan Timming

SWITCHDESCRIPTION
-T0Paranoid (very slow, IDS evasion)
-T1Sneaky (slow, quiet)
-T2Polite (reduced speed)
-T3Normal (default timing)
-T4Aggressive (fast scan)
-T5Insane (very fast, noisy)

Service & Version Detection

SWITCHDESCRIPTION
-sVService/version detection
-sCRun default scripts
-AAggressive scan (OS, scripts, traceroute)
--scriptRun specific NSE scripts
-OOS detection

Resources

This post is licensed under CC BY 4.0 by the author.