tips
12 tips Nmap
One command, setting or habit at a time about Nmap: what it does, the line to copy and a caveat or two.
Network and DNS 8
-
Prints a summary line for each packet Nmap sends or receives during a scan.
nmap --packet-trace -p 22,80 192.0.2.10 -
Saves scan results as one line per host, so grep and cut can pick out open ports.
nmap -p 22,80,443 -oG scan.gnmap 192.0.2.0/24 -
Scan the UDP side of a host, where DNS, NTP and similar services listen.
sudo nmap -sU -p 53,67,123,161 192.0.2.10 -
Preview what a target range expands to and which names reverse DNS gives.
nmap -sL 192.0.2.0/28 -
See which reply, or missing reply, led nmap to each port state.
sudo nmap --reason -p 22,443,5432 192.0.2.10 -
Ask the local network for a DHCP offer and see who replies.
sudo nmap --script broadcast-dhcp-discover -
Trade coverage for speed by checking the most frequently used ports first.
nmap --top-ports 20 192.0.2.0/24 -
Lists the devices that are online on a network without scanning their ports.
nmap -sn 192.168.1.0/24
Access and security 4
-
Identify the service and often the version behind each open port.
nmap -sV 192.0.2.10 -
Spot new or vanished ports by diffing a saved scan against a fresh one.
nmap -oX before.xml 192.0.2.10 -
Read what a script does and which categories it belongs to.
nmap --script-help ssh2-enum-algos -
Lists every TLS protocol and cipher a server accepts and grades the weakest one from A to F.
nmap --script ssl-enum-ciphers -p 443 proxy.example.com
Nothing in this filter yet.