Nmap is a free, open-source tool used for scanning and analyzing computer networks. It helps identify hosts, services, and vulnerabilities, and is commonly used for network management and security auditing.
Here’s a simple Nmap cheat sheet that covers some of the most commonly used commands and options:
- Basic scan:
nmap targetIP
- Performs a basic port scan on the specified target IP address. - Scan a range of IPs:
nmap 192.168.1.1-100
- Scans the IP addresses from 192.168.1.1 to 192.168.1.100. - Scan a specific port:
nmap -p 80 targetIP
- Scans only port 80 on the specified target IP. - Scan multiple ports:
nmap -p 80,443 targetIP
- Scans ports 80 and 443 on the specified target IP. - Scan all ports:
nmap -p- targetIP
- Scans all 65,535 ports on the specified target IP. - OS detection:
nmap -O targetIP
- Attempts to determine the operating system running on the specified target IP. - Version detection:
nmap -sV targetIP
- Attempts to determine the software and version numbers running on the specified target IP. - Service detection:
nmap -sS targetIP
- Attempts to detect the services running on the specified target IP. - Aggressive scan:
nmap -A targetIP
- Performs an aggressive scan that includes OS detection, version detection, and service detection. - Firewall evasion:
nmap -f targetIP
- Uses fragmentation to evade firewalls and IDS/IPS systems.
*Note that this is not an exhaustive list of Nmap commands and options, but rather a set of some of the most commonly used ones.