Nmap Cheat-Sheet

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen

Nmap Cheat Sheet

Übersicht der wichtigsten Nmap-Aufrufe für Discovery, Port- und Versionsscan, OS-Erkennung, Tarnung, NSE und Reporting. Als Ziel dient hier durchgängig 192.168.1.10 bzw. das Netz 192.168.1.0/24.

Basic Discovery & Scanning

Einzelnen Host scannen
  • nmap 192.168.1.10
Mehrere Hosts scannen
  • nmap 192.168.1.10 192.168.1.11
Ganzes Subnetz scannen
  • nmap 192.168.1.0/24
Nur Host Discovery (keine Ports)
  • nmap -sn 192.168.1.0/24
DNS-Auflösung abschalten (schneller)
  • nmap -n 192.168.1.0/24

Port Scanning

Bestimmte Ports
  • nmap -p 22,80,443 192.168.1.10
Port-Bereich
  • nmap -p 1-1000 192.168.1.10
Alle TCP-Ports
  • nmap -p- 192.168.1.10
Fast Scan (weniger Ports, schnell)
  • nmap -F 192.168.1.10

Service & Version Detection

Service-Versionen erkennen
  • nmap -sV 192.168.1.10
Aggressive Erkennung (Services, OS, Skripte, Traceroute)
  • nmap -A 192.168.1.10
Version-Intensity erhöhen
  • nmap -sV --version-intensity 9 192.168.1.10

OS Detection

OS erkennen
  • nmap -O 192.168.1.10
OS-Erkennung erzwingen (raten)
  • nmap -O --osscan-guess 192.168.1.10

UDP Scanning

UDP-Scan
  • nmap -sU 192.168.1.10
TCP + UDP kombinieren
  • nmap -sS -sU 192.168.1.10

Stealth / SYN Scanning

SYN-Scan (Standard, stealthy, root nötig)
  • nmap -sS 192.168.1.10
TCP-Connect-Scan (ohne root)
  • nmap -sT 192.168.1.10

Firewall Evasion & Timing

Schnellerer Scan
  • nmap -T4 192.168.1.10
Sehr aggressiv (laut)
  • nmap -T5 192.168.1.10
Reihenfolge der Ziele randomisieren
  • nmap --randomize-hosts 192.168.1.0/24
Pakete fragmentieren (einfache IDS umgehen)
  • nmap -f 192.168.1.10
MAC-Adresse spoofen
  • nmap --spoof-mac 0 192.168.1.10

NSE (Nmap Scripting Engine)

Default-Skripte (safe)
  • nmap -sC 192.168.1.10
Vulnerability-Skripte
  • nmap --script vuln 192.168.1.10
HTTP-Enumeration
  • nmap --script http-enum -p 80,443 192.168.1.10
SSL-Zertifikat auslesen
  • nmap --script ssl-cert -p 443 192.168.1.10
Schwache TLS-Cipher erkennen
  • nmap --script ssl-enum-ciphers -p 443 192.168.1.10
SMB-Enumeration (Windows)
  • nmap --script smb-os-discovery -p 445 192.168.1.10

Output & Reporting

Format Option
Normaler Text -oN scan.txt
XML (für Tools) -oX scan.xml
Grepable -oG scan.gnmap
Alle Formate gleichzeitig -oA full_scan
Normaler Text-Output
  • nmap -oN scan.txt 192.168.1.10
XML-Output
  • nmap -oX scan.xml 192.168.1.10
Grepable Output
  • nmap -oG scan.gnmap 192.168.1.10
Alle Formate auf einmal
  • nmap -oA full_scan 192.168.1.10

Full Recon Combinations

Ausgewogener Recon-Scan (safe & sinnvoll)
  • nmap -sS -sV -O -T4 -p- 192.168.1.10
Web-Server Deep Scan
  • nmap -p 80,443 --script http-enum,http-title,http-headers 192.168.1.10
Windows / AD Environment Discovery
  • nmap -p 135,139,445 --script smb-os-discovery,smb-enum-shares 192.168.1.10
Full Aggressive Audit (laut)
  • nmap -A -T4 -p- 192.168.1.10

Pro Tip: typischer Pentest-Ablauf

1. Hosts finden
  • nmap -sn 192.168.1.0/24
2. Offene Ports scannen
  • nmap -sS -p- target_ip
3. Services enumerieren
  • nmap -sV -sC target_ip
4. Tieferer NSE-Scan
  • nmap --script vuln target_ip