Nmap Cheat Sheet: The Ultimate Guide to Network Scanning

Cuncis
2 min readFeb 16, 2023

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:

  1. Basic scan: nmap targetIP - Performs a basic port scan on the specified target IP address.
  2. 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.
  3. Scan a specific port: nmap -p 80 targetIP - Scans only port 80 on the specified target IP.
  4. Scan multiple ports: nmap -p 80,443 targetIP - Scans ports 80 and 443 on the specified target IP.
  5. Scan all ports: nmap -p- targetIP - Scans all 65,535 ports on the specified target IP.
  6. OS detection: nmap -O targetIP - Attempts to determine the operating system running on the specified target IP.
  7. Version detection: nmap -sV targetIP - Attempts to determine the software and version numbers running on the specified target IP.
  8. Service detection: nmap -sS targetIP - Attempts to detect the services running on the specified target IP.
  9. Aggressive scan: nmap -A targetIP - Performs an aggressive scan that includes OS detection, version detection, and service detection.
  10. 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.

--

--

Cuncis

Penetration Tester | Bug Hunter | Ethical Hacker - Connect with me on https://twitter.com/wh1te_h0le