Nmap Cheat Sheet

Durchsuchbare Nmap-Befehlsreferenz: Host-Discovery, Scan-Typen, Service-/OS-Erkennung, NSE-Skripte und Timing, mit jeder Option erklärt.

Läuft im Browser · es wird nichts gesendetNeu

21 Befehle

Host discovery

nmap -sn <target>Ping scan: find which hosts are up on a network without scanning any ports.

Beispiel

nmap -sn 192.168.1.0/24

Optionen

-snDisable port scanning; only perform host discovery (the "n" is for "no port scan").
nmap -Pn <target>Skip host discovery entirely and treat every target as online, then scan its ports directly.

Useful when a target blocks the ping probes Nmap uses for discovery (common behind a firewall), which would otherwise make Nmap report the host as down and skip it.

Optionen

-PnTreat all hosts as online, skip the discovery/ping phase.
nmap -sL <target>List scan: show the targets that a given specification resolves to, without sending any packets to them.

A safe way to check exactly which IPs a CIDR range or hostname list expands to before actually scanning.

nmap <target>Target specification accepts single IPs, hostnames, CIDR ranges, octet ranges, or a file of targets.

Beispiel

nmap 192.168.1.1 192.168.1.0/24 192.168.1.1-50 scanme.nmap.org

Optionen

-iL <file>Read target list from a file, one target per line.
--exclude <target1,target2,...>Exclude specific hosts from an otherwise broader scan.
--excludefile <file>Exclude hosts listed in a file.

Scan types

nmap -sS <target>TCP SYN scan (the default scan when run with sufficient privileges): sends a SYN packet and reads the response without completing the TCP handshake.

Faster and less intrusive than a full connect scan since the target application typically never sees a completed connection. Requires raw-packet privileges (root/administrator).

nmap -sT <target>TCP connect scan: completes the full TCP three-way handshake using the OS's normal connect() call.

Used automatically when raw-packet privileges are not available (no root/administrator), or IPv6 targets are specified. Slower and more easily logged by the target than -sS.

nmap -sU <target>UDP scan: probes UDP ports instead of TCP.

Significantly slower than a TCP scan because UDP has no handshake to confirm a response, and many systems rate-limit the ICMP "port unreachable" replies Nmap relies on to detect closed ports.

Achtung: A UDP scan of all 65535 ports can take a very long time; combine with -p to scope it to a smaller, relevant port list where possible.
nmap -sF <target> nmap -sN <target> nmap -sX <target>FIN, NULL and Xmas scans send unusual TCP flag combinations (FIN only, no flags, or FIN+PSH+URG) that some older or misconfigured firewalls and systems do not log or block, unlike a normal SYN scan.

Only reliable against systems with an RFC 793-compliant TCP stack (mostly older or embedded systems); modern stacks like Windows generally respond the same way to all ports and make these scans unreliable.

nmap -sY <target> nmap -sZ <target>-sY is an SCTP INIT scan (the SCTP equivalent of a TCP SYN scan); -sZ is an SCTP COOKIE-ECHO scan, a stealthier variant that many firewalls do not filter.

SCTP is mainly used in telecom (SS7/SIGTRAN) networks, so these are specialist scan types.

nmap -sO <target>IP protocol scan: determine which IP protocols (TCP, UDP, ICMP, GRE, and so on) a host supports, rather than scanning individual ports.

Useful for discovering protocols other than TCP/UDP that a host or firewall passes, for example whether GRE or ESP (used by some VPNs) is allowed through.

Port specification

nmap -p <ports> <target>Scan only specific ports instead of the default top 1000.

Beispiel

nmap -p 22,80,443 <target>
nmap -p 1-1024 <target>
nmap -p- <target>

Optionen

-p <n1>,<n2>,...Comma-separated list of specific ports.
-p <n1>-<n2>A port range.
-p-Scan all 65535 ports.
-p U:<ports>,T:<ports>Specify different port lists for UDP (U:) and TCP (T:) in a combined -sU -sT scan.
-FScan only the ports registered in the nmap-services file as "fast" (a smaller subset than the default top 1000).
--top-ports <n>Scan only the n most common ports according to Nmap's internal frequency data.
nmap -F <target>Fast mode: scan fewer ports than the default (the ports in nmap-services flagged as common), trading completeness for speed.

Good for a quick first pass across many hosts; follow up with a full -p- scan on hosts of particular interest.

Service, version & OS detection

nmap -sV <target>Probe open ports to determine the actual service and version running, instead of just guessing from the port number.

Nmap sends protocol-specific probes and matches the responses against its service-probes database; this is how it tells OpenSSH 9.x apart from an unrelated service that happens to also listen on port 22.

Optionen

--version-intensity <0-9>How many probes to try. Higher finds more but takes longer; default is 7.
--version-lightShortcut for a low intensity (faster, less thorough).
--version-allTry every available probe (shortcut for intensity 9).
nmap -O <target>Attempt to identify the target's operating system based on subtle differences in how its TCP/IP stack responds to a series of probes.

Needs at least one open and one closed TCP port on the target to work reliably, and requires raw-packet privileges.

Optionen

--osscan-guessBe more aggressive about guessing the OS when there is no exact match, at the cost of more false positives.
nmap -A <target>Shortcut that enables OS detection (-O), version detection (-sV), default script scanning (-sC) and traceroute, all in one flag.

Convenient for a thorough first look at a host, but noisier and slower than a targeted scan; the official docs note it should be used thoughtfully rather than as a default for every scan.

NSE scripts

nmap -sC <target>Run the default set of Nmap Scripting Engine (NSE) scripts, a curated, generally safe and useful set tagged "default".

Included automatically by -A; run it on its own to get script output without the extra time cost of OS detection and traceroute.

nmap --script <name-or-category> <target>Run specific NSE scripts by name, category, or a comma-separated combination, instead of the default set.

Beispiel

nmap --script http-title,http-headers <target>
nmap --script vuln <target>

Optionen

--script <name>One script by filename (without .nse), for example http-title.
--script <category>A whole category, for example vuln, auth, discovery, safe.
--script-args <key=value,...>Pass arguments to a script, for example a custom wordlist or credentials for a brute-force script.
--script-help <name>Show a script's description and arguments without running it.
Achtung: Scripts in categories like "vuln", "exploit" or "brute" actively probe for weaknesses or attempt logins, which can trigger alerts, lock out accounts, or affect service stability. Only use them against systems you are authorized to test.

Timing & performance

nmap -T<0-5> <target>Timing templates trade scan speed against stealth and reliability, from 0 (slowest, most evasive) to 5 (fastest, most aggressive).

Optionen

-T0Paranoid: extremely slow, intended to evade intrusion detection systems.
-T1Sneaky: slow, also IDS-evasion focused.
-T2Polite: slows down to use less bandwidth and target resources.
-T3Normal: the default, no particular adjustment.
-T4Aggressive: assumes a fast, reliable network; recommended for scanning hosts you control.
-T5Insane: fastest, sacrifices accuracy for speed; may miss results on slower networks.
Achtung: Aggressive timing (-T4/-T5) on a fragile network device or an unreliable link can produce inaccurate results (ports reported closed/filtered that are actually open) or overload the target.
nmap --min-rate <n> <target> nmap --max-rate <n> <target>Directly control how many packets per second Nmap sends, instead of using a timing template.

Optionen

--min-rate <n>Never send slower than this many packets per second.
--max-rate <n>Never send faster than this many packets per second, useful to avoid overwhelming a sensitive target or link.

Output

nmap -oN <file> <target> nmap -oX <file> <target> nmap -oG <file> <target> nmap -oA <basename> <target>Save scan results to a file in a specific format.

Optionen

-oN <file>Normal output, the same text shown on screen.
-oX <file>XML output, suitable for parsing by other tools (including Nmap's own diff/compare tooling).
-oG <file>Grepable output, one line per host, easy to parse with grep/awk.
-oA <basename>Save in all three formats at once, using <basename>.nmap, .xml and .gnmap.
nmap -v <target> nmap -vv <target> nmap -d <target>Increase output detail. -v (repeatable) increases general verbosity; -d (repeatable) adds low-level debugging information.

-v shows discovered open ports as the scan runs instead of only at the end; -d is mainly useful when reporting a bug or understanding exactly what Nmap is doing.

Die Beschreibungen in dieser Referenz sind derzeit auf Englisch.

Erklärung

Suche oder filtere nach Gruppe und kopiere einen Befehl mit einem Klick. Öffne einen Befehl für eine Erklärung, ein Beispiel und jede Option, die er annimmt, mit einer Warnung bei allem, was störend sein kann oder nur auf Systemen laufen sollte, für die du eine Berechtigung hast.

🔒 Deine Eingabe bleibt in deinem Browser und wird nirgendwohin gesendet.

Häufige Fragen

Warum ist ein UDP-Scan so viel langsamer als ein TCP-Scan?

UDP hat keinen Handshake zur Bestätigung einer Antwort, daher verlässt sich Nmap auf ICMP-"port unreachable"-Antworten, um geschlossene Ports zu erkennen, die viele Systeme ratenbegrenzen. Beschränke -sU mit -p auf bestimmte Ports, wenn möglich.

Wie geht es weiter?

Mehr in diesem Abschnitt

  • Cisco-IOS Cheat SheetDurchsuchbare Cisco-IOS/IOS-XE-Referenz: Interfaces, VLANs, Routing, Access Lists, Port-Security, STP, EtherChannel, SNMP und NAT, mit jedem Parameter erklärt.
  • FortiGate (FortiOS) Cheat SheetDurchsuchbare FortiGate-CLI-Befehlsreferenz: System, Netzwerk, Firewall-Policy, VPN und Diagnose, mit jedem Parameter erklärt.
  • Palo Alto (PAN-OS) Cheat SheetDurchsuchbare PAN-OS-CLI-Befehlsreferenz: Security Policy, NAT, VPN und Diagnose, mit jedem Parameter erklärt.

Auch nützlich

  • Häufige Netzwerk-PortsDurchsuchbare Liste bekannter TCP- und UDP-Ports: SSH, HTTP, HTTPS, RDP, SMB, DNS, Datenbanken und mehr.
  • SubnetzrechnerBerechne Netzwerkadresse, Broadcast, Netzmaske und Hostanzahl eines IPv4-Subnetzes. Mit CIDR (/24) und Netzmaske.

Problem gefunden oder einen Vorschlag? Schreib uns