Networking/Computing Tips/Tricks

Rate this content:
5 of 5 - 1 votes
Thank you for rating this article.

nmapWelcome to my little nmap cheat sheet! 

To learn more about nmap - check out my articles: Getting Started with nmap and Deeper Scanning with nmap and Even Deeper Scanning with nmap and Advanced nmap Scripting Engine.

There was no intent here to recreate the full nmap capabilities, that would have been a waste of your and my time. 

Instead, I tried to create a good cheat sheet reference for common/helpful uses of nmap.  Did I miss one or two that really belong here?  Probably.  Please comment below.

For Reference: Usage format: nmap [Scan Type(s)] [Options] {target specification}

For Reference: nmap help: nmap —help

Simple Basic Scan


Look for all devices on a subnet using ARP

nmap -sn

Use a PING scan

nmap -sP   or    nmap -sP 192.168.1.*   or    nmap -sP     or    nmap -sP   

Looking for open ports and OS detection

nmap -sS -P0 -sV -O

  • -sS TCP SYN scan
  • -P0 Looking for IP Protocols by protocol number (ICMP=1, TCP=6, UDP=7, etc)
  • -sV Probe open ports looking for version information
  • -O Enable the OS detection

Don't wait very long, fast timing

nmap -T5   

OS and version detection

nmap -A   

nmap -A

  • -A OS detection, version detection, script scanning and traceroute

Aggressive and Faster Scanning

nmap -A -T4

  • -A agressive (enables -O and -sV and -sC (script) and --traceroute
  • -T4 faster timing

Look for the top 20 ports   

nmap --top-ports 20

Looking for hosts with specific open port

nmap -sT -p3325 

  • -sT TCP Connect scan
  • -p3325 Try on port 3325

Ducking for cover - a TCP SYN Scan with decoy source IP

nmap -sS -D,   

  • -sS TCP SYN scan
  • -D  {decoy IP addresses}

To do a verbose scan

nmap -v   

To Scan fewer ports (100), and exclude a couple devices, with exclusion

nmap -F --exclude,   

To Scan skipping the ping, and do the rest of the scanning on every port address

nmap -Pn

Add IPv6 address to Linux system

ifconfig eth0 inet6 add 2001:db8:cafe:1::1/64 

Now use nmap to scan the IPv6 address

nmap -6 2001:db8:cafe:1::1    

To see interfaces available on the system

nmap --iflist   

Use nmap to do a UDP based ping:

nmap -PU 

To do a UDP port scan:

nmap -sU   

You can even spoof the MAC address

nmap --spoof-mac 0 

nmap Scripting Engine  (NSE)

nmap --script={script name}

To see help with scripts

nmap --script-help {script name}
nmap --script=default
same as
nmap -sC

Version information

nmap --script=version

Vulnerability Scan

nmap --script=vuln

Combining scripts

nmap --script "safe or default"   
nmap --script "discovery and version"

Scripts that execute attacks:

nmap --script=brute
nmap --script=dos
nmap --script=exploit
nmap --script=malware

Add comment


Did you learn something?
Did I save you time? 

Buy me a coffeeBuy me a coffee!

Find by Tag

5G Networks 6LoWLAN 6LoWPAN 802.11 802.11ah 802.11ax 802.11ay 802.11az ACL Addressing Analysis Ansible Architecture ARP Assessment AToM Backup Bandwidth BGP Bibliography Biography Briefings CBRS CellStream Cellular Central Office Cheat Sheet Chrome Cisco Clock Cloud Computer Consulting CPI Data Center Data Networking Decryption DHCPv4 DHCPv6 Display Filter DNS Documentation ECMP EIGRP Ethernet Ethics Flipping the Certification Model Follow Me Fragmentation Git GNS3 Google GQUIC Hands-On History Home Network HTTPS ICMP ICMPv6 IEEE 802.11p IEEE 802.15.4 In A Day Internet IOS Classic IoT IPv4 IPv6 L2 Switch L2VPN L3VPN LDP Learning Services Linux LLN Logging LoL M-BGP MAC MAC OSx Macro Microsoft mininet Monitoring Monitor Mode MPLS Multicast Name Resolution Netflow NetMon netsh Networking Network Science nmap Npcap nslookup Online Learning Online School OpenFlow OSPF OSPFv2 OSPFv3 OSX Parrot PIM Ping Policy POTS POTS to Pipes PPP Profile Profiles Programming Project Management Python QoS QUIC Requirements RFC RIP Routing RPL RSVP Rural SAS SDN Security Self Certification Service Provider Services Sharepoint Small Business Smartport SONET Speed SSH SSL Subnetting T-Shark TCP TCP/IP Telco Telecom 101 Telecommunications Telephone Telnet Terminal TLS Tools Traceroute Traffic Analysis Traffic Engineering Training Travel Tunnel Utility Video Virtualbox Virtualization Voice VoIP VXLAN Webex Wi-Fi Wi-Fi 4 Wi-Fi 5 Wi-Fi 6 Wi-Fi 6/6E Windows Wireless Wireless 5G Wireshark Wireshark Tip WLAN ZigBee Zoom

Twitter Feed