~/signal
terminal
$ nmap -sV -p 22,80,443 scanme.nmap.org Starting Nmap ( https://nmap.org ) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp closed https
tool
Nmap: network discovery and port scanning
Maps which hosts are up, which ports are open, and what services answer.
Curated by Signal · 10/5/2026
What it is
Nmap (Network Mapper) scans a target to find live hosts, open ports, running services, and sometimes the operating system behind them. It is usually the first tool used in any network assessment. Run it only against systems you own or are authorized to test.
Basic scans
# Scan a single host
nmap 192.168.1.1
# Scan a whole subnet
nmap 192.168.1.0/24
# Scan a list of specific hosts
nmap 192.168.1.1 192.168.1.5 192.168.1.10
# Scan a hostname
nmap scanme.nmap.org
Host discovery
# Ping scan only, no port scan
nmap -sn 192.168.1.0/24
# Skip host discovery, assume host is up
nmap -Pn 192.168.1.1
# List targets without scanning
nmap -sL 192.168.1.0/24
Port selection
# Scan specific ports
nmap -p 22,80,443 192.168.1.1
# Scan a port range
nmap -p 1-1000 192.168.1.1
# Scan all 65535 ports
nmap -p- 192.168.1.1
# Scan the 100 most common ports
nmap -F 192.168.1.1
Scan types
# TCP SYN scan (default with root/admin privileges)
nmap -sS 192.168.1.1
# TCP connect scan (no special privileges needed)
nmap -sT 192.168.1.1
# UDP scan
nmap -sU 192.168.1.1
# Combine TCP and UDP
nmap -sS -sU -p T:80,443,U:53 192.168.1.1
Service and version detection
# Detect service versions
nmap -sV 192.168.1.1
# Detect OS
nmap -O 192.168.1.1
# Both, plus default scripts
nmap -A 192.168.1.1
# Aggressive version intensity (slower, more accurate)
nmap -sV --version-intensity 9 192.168.1.1
Timing and performance
# Timing templates, 0 (slowest) to 5 (fastest)
nmap -T4 192.168.1.1
# Set a maximum scan time
nmap --host-timeout 5m 192.168.1.1
# Slow down to avoid detection
nmap -T2 192.168.1.1
Nmap Scripting Engine (NSE)
# Run default safe scripts
nmap -sC 192.168.1.1
# Run a specific script
nmap --script=http-title 192.168.1.1
# Run a category of scripts
nmap --script=vuln 192.168.1.1
# List available scripts matching a name
nmap --script-help=ssl*
Output formats
# Normal output to a file
nmap -oN scan.txt 192.168.1.1
# XML output
nmap -oX scan.xml 192.168.1.1
# Grepable output
nmap -oG scan.gnmap 192.168.1.1
# All formats at once
nmap -oA scan_results 192.168.1.1
Firewall and IDS evasion (authorized testing only)
# Fragment packets
nmap -f 192.168.1.1
# Use a decoy
nmap -D RND:5 192.168.1.1
# Spoof the source port
nmap --source-port 53 192.168.1.1
Common one-liners
# Quick full scan: all ports, service detection, default scripts
nmap -p- -sV -sC -T4 192.168.1.1
# Find which hosts on a subnet are alive
nmap -sn 192.168.1.0/24 -oG - | grep Up
# Scan the top 20 ports across a subnet
nmap --top-ports 20 192.168.1.0/24
Curated summary. The original work belongs to its authors.
#recon#network
Related reading
capture.pcap
packet capture
No. Source Destination Proto Info 1 192.0.2.10 198.51.100.7 DNS Standard query A example.com 2 198.51.100.7 192.0.2.10 DNS Standard query response 3 192.0.2.10 203.0.113.5 TCP 52144 → 443 [SYN] 4 203.0.113.5 192.0.2.10 TCP 443 → 52144 [SYN, ACK] 5 192.0.2.10 203.0.113.5 TLS Client Hello
Wireshark: see what is on the wire
capture.pcap
packet capture
No. Source Destination Proto Info 1 192.0.2.10 198.51.100.7 DNS Standard query A example.com 2 198.51.100.7 192.0.2.10 DNS Standard query response 3 192.0.2.10 203.0.113.5 TCP 52144 → 443 [SYN] 4 203.0.113.5 192.0.2.10 TCP 443 → 52144 [SYN, ACK] 5 192.0.2.10 203.0.113.5 TLS Client Hello
Zeek: turn network traffic into searchable logs
capture.pcap
packet capture
No. Source Destination Proto Info 1 192.0.2.10 198.51.100.7 DNS Standard query A example.com 2 198.51.100.7 192.0.2.10 DNS Standard query response 3 192.0.2.10 203.0.113.5 TCP 52144 → 443 [SYN] 4 203.0.113.5 192.0.2.10 TCP 443 → 52144 [SYN, ACK] 5 192.0.2.10 203.0.113.5 TLS Client Hello