arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Nmap Cheat Sheet

hashtag
Nmap Cheat Sheet

Reference guide for scanning networks with Nmap.

Table of Contents

  1. Nmap Scripting Engine

hashtag
What is Nmap?

Nmap ("Network Mapper") is a free and open source utility for network discovery and security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime. Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running. It was designed to rapidly scan large networks, but works fine against single hosts.

hashtag
How to Use Nmap

Nmap can be used in a variety of ways depending on the user's level of technical expertise.

Technical Expertise
Usage

hashtag
Command Line

hashtag
Basic Scanning Techniques

The -s switch determines the type of scan to perform.

Nmap Switch
Description

hashtag
Scan a Single Target

hashtag
Scan Multiple Targets

hashtag
Scan a List of Targets

hashtag
Scan a Range of Hosts

hashtag
Scan an Entire Subnet

hashtag
Scan Random Hosts

hashtag
Exclude Targets From a Scan

hashtag
Exclude Targets Using a List

hashtag
Perform an Aggresive Scan

hashtag
Scan an IPv6 Target

hashtag
Port Scanning Options

hashtag
Perform a Fast Scan

hashtag
Scan Specific Ports

hashtag
Scan Ports by Name

hashtag
Scan Ports by Protocol

hashtag
Scan All Ports

hashtag
Scan Top Ports

hashtag
Perform a Sequential Port Scan

hashtag
Attempt to Guess an Unknown OS

hashtag
Service Version Detection

hashtag
Troubleshoot Version Scan

hashtag
Perform a RPC Scan

hashtag
Discovery Options

Host Discovery The -p switch determines the type of ping to perform.

Nmap Switch
Description

hashtag
Perform a Ping Only Scan

hashtag
Do Not Ping

hashtag
TCP SYN Ping

hashtag
TCP ACK Ping

hashtag
UDP Ping

hashtag
SCTP INIT Ping

hashtag
ICMP Echo Ping

hashtag
ICMP Timestamp Ping

hashtag
ICMP Address Mask Ping

hashtag
IP Protocol Ping

hashtag
ARP ping

hashtag
Traceroute

hashtag
Force Reverse DNS Resolution

hashtag
Disable Reverse DNS Resolution

hashtag
Alternative DNS Lookup

hashtag
Manually Specify DNS Server

Can specify a single server or multiple.

hashtag
Create a Host List

hashtag
Port Specification and Scan Order

hashtag
Service/Version Detection

Nmap Switch
Description

hashtag
Script Scan

Nmap Switch
Description

hashtag
OS Detection

hashtag
Timing and Performance

The -t switch determines the speed and stealth performed.

Nmap Switch
Description

Not specifying a T value will default to -T3, or normal speed.

hashtag
Firewall Evasion Techniques

hashtag
Firewall/IDS Evasion and Spoofing

hashtag
Fragment Packets

hashtag
Specify a Specific MTU

hashtag
Use a Decoy

hashtag
Idle Zombie Scan

hashtag
Manually Specify a Source Port

hashtag
Append Random Data

hashtag
Randomize Target Scan Order

hashtag
Spoof MAC Address

hashtag
Send Bad Checksums

hashtag
Advanced Scanning Functions

hashtag
TCP SYN Scan

hashtag
TCP Connect Scan

hashtag
UDP Scan

hashtag
TCP NULL Scan

hashtag
TCP FIN Scan

hashtag
Xmas Scan

hashtag
TCP ACK Scan

hashtag
Custom TCP Scan

hashtag
IP Protocol Scan

hashtag
Send Raw Ethernet Packets

hashtag
Send IP Packets

hashtag
Timing Options

hashtag
Timing Templates

hashtag
Set the Packet TTL

hashtag
Minimum NUmber of Parallel Operations

hashtag
Maximum Number of Parallel Operations

hashtag
Minimum Host Group Size

hashtag
Maximum Host Group Size

hashtag
Maximum RTT Timeout

hashtag
Initial RTT Timeout

hashtag
Maximum Number of Retries

hashtag
Host Timeout

hashtag
Minimum Scan Delay

hashtag
Maxmimum Scan Delay

hashtag
Minimum Packet Rate

hashtag
Maximum Packet Rate

hashtag
Defeat Reset Rate Limits

hashtag
Output Options

Nmap Switch
Description

hashtag
Save Output to a Text File

hashtag
Save Output to a XML File

hashtag
Grepable Output

hashtag
Output All Supported File Types

hashtag
Periodically Display Statistics

hashtag
1337 Output

hashtag
Compare Scans

hashtag
Comparison Using Ndiff

hashtag
Ndiff Verbose Mode

hashtag
XML Output Mode

hashtag
Troubleshooting and Debugging

hashtag
Get Help

hashtag
Display Nmap Version

hashtag
Verbose Output

hashtag
Debugging

hashtag
Display Port State Reason

hashtag
Only Display Open Ports

hashtag
Trace Packets

hashtag
Display Host Networking

hashtag
Specify a Network Interface

hashtag
Nmap Scripting Engine

hashtag
Execute Individual Scripts

hashtag
Execute Multiple Scripts

hashtag
Execute Scripts by Category

hashtag
Execute Multiple Script Categories

hashtag
Troubleshoot Scripts

hashtag
Update the Script Database

Reference Sites

Scan a List of Targets
  • Scan a Range of Hosts

  • Scan an Entire Subnet

  • Scan Random Hosts

  • Exclude Targets From a Scan

  • Exclude Targets Using a List

  • Perform an Aggresive Scan

  • Scan an IPv6 Target

  • Scan Ports by Name
  • Scan Ports by Protocol

  • Scan All Ports

  • Scan Top Ports

  • Perform a Sequential Port Scan

  • Attempt to Guess an Unknown OS

  • Service Version Detection

  • Troubleshoot Version Scan

  • Perform a RPC Scan

  • TCP SYN Ping
  • TCP ACK Ping

  • UDP Ping

  • SCTP INIT Ping

  • ICMP Echo Ping

  • ICMP Timestamp Ping

  • ICMP Address Mask Ping

  • IP Protocol Ping

  • ARP Ping

  • Traceroute

  • Force Reverse DNS Resolution

  • Disable Reverse DNS Resolution

  • Alternative DNS Lookup

  • Manually Specify DNS Server

  • Create a Host List

  • Use a Decoy
  • Idle Zombie Scan

  • Manually Specify a Source Port

  • Append Random Data

  • Randomize Target Scan Order

  • Spoof MAC Address

  • Send Bad Checksums

  • UDP Scan
  • TCP NULL Scan

  • TCP FIN Scan

  • Xmas Scan

  • TCP ACK Scan

  • Custom TCP Scan

  • IP Protocol Scan

  • Send Raw Ethernet Packets

  • Send IP Packets

  • Minimum Number of Parallel Operations
  • Maximum Number of Parallel Operations

  • Minimum Host Group Size

  • Maximum Host Group Size

  • Maximum RTT Timeout

  • Initial RTT TImeout

  • Maximum Number of Retries

  • Host Timeout

  • Minimum Scan Delay

  • Maximum Scan Delay

  • Minimum Packet Rate

  • Maximum Packet Rate

  • Defeat Reset Rate Limits

  • Grepable Output
  • Output All Supported File Types

  • Periodically Display Statistics

  • 1337 Output

  • XML Output Mode
    Verbose Output
  • Debugging

  • Display Port State Reason

  • Only Display Open Ports

  • Trace Packets

  • Display Host Networking

  • Specify a Network Interface

  • Execute Scripts by Category
  • Execute Multiple Script Categories

  • Troubleshoot Scripts

  • Update the Script Database

  • -sO

    Protocol scan

    -sP

    Ping scan

    -sR

    RPC scan

    -sS

    SYN scan

    -sT

    TCP connect scan

    -sW

    Windows scan

    -sX

    XMAS scan

    Top 32 Nmap Commandarrow-up-right
  • Nmap Linux man pagearrow-up-right

  • 29 Practical Examples of Nmap Commandsarrow-up-right

  • Nmap Scanning Types, Scanning Commands , NSE Scriptsarrow-up-right

  • Nmap CheatSheetarrow-up-right

  • Nmap Cheat Sheetarrow-up-right

  • Nmap Cheat Sheet: From Discovery to Exploitsarrow-up-right

  • Nmap: my own cheatsheetarrow-up-right

  • NMAP Commands Cheatsheetarrow-up-right

  • Nmap Cheat Sheetarrow-up-right

  • Nmap Cheat Sheetarrow-up-right

  • Beginner

    Zenmaparrow-up-right the graphical user interface for Nmap

    Intermediate

    Command linearrow-up-right

    Advanced

    Python scripting with the Python-Nmaparrow-up-right package

    -sA

    ACK scan

    -sF

    FIN scan

    -sI

    IDLE scan

    -sL

    DNS scan (a.k.a. list scan)

    -sN

    NULL scan

    -PI

    ICMP ping

    -Po

    No ping

    -PS

    SYN ping

    -PT

    TCP ping

    -sV

    Enumerates software versions

    -sC

    Run all default scripts

    -T0

    Serial, slowest scan

    -T1

    Serial, slow scan

    -T2

    Serial, normal speed scan

    -T3

    Parallel, normal speed scan

    -T4

    Parallel, fast scan

    -oN

    Normal output

    -oX

    XML output

    -oA

    Normal, XML, and Grepable format all at once

    What is Nmap?
    How to Use Nmap
    Command Line
    Basic Scanning Techniques
    Scan a Single Target
    Scan Multiple Targets
    Port Scanning Options
    Perform a Fast Scan
    Scan Specific Ports
    Discovery Options
    Perform a Ping Only Scan
    Do Not Ping
    Firewall Evasion Techniques
    Fragment Packets
    Specify a Specific MTU
    Advanced Scanning Functions
    TCP SYN Scan
    TCP Connect Scan
    Timing Options
    Timing Templates
    Set the Packet TTL
    Output Options
    Save Output to a Text File
    Save Output to a XML File
    Compare Scans
    Comparison Using Ndiff
    Ndiff Verbose Mode
    Troubleshooting and Debugging
    Get Help
    Display Nmap Version
    Execute Individual Scripts
    Execute Multiple Scripts
    Nmap - The Basicsarrow-up-right
    Reference link 1arrow-up-right
    Beginner's Guide to Nmaparrow-up-right
    nmap [ <Scan Type> ...] [ <Options> ] { <target specification> }
    nmap [target1, target2, etc]
    nmap [range of IP addresses]
    nmap [targets] --exclude [targets]
    nmap [targets] --excludefile [list.txt]
    nmap -p [port(s)] [target]
    nmap -p [port name(s)] [target]
    nmap -sU -sT -p U:[ports],T:[ports] [target]
    nmap --top-ports [number] [target]
    nmap -O --osscan-guess [target]
    nmap -sV --version-trace [target]
    nmap --traceroute [target]
    nmap --system-dns [target]
    nmap --dns-servers [servers] [target]
    nmap --mtu [MTU] [target]
    nmap -D RND:[number] [target]
    nmap -sI [zombie] [target]
    nmap --source-port [port] [target]
    nmap --data-length [size] [target]
    nmap --randomize-hosts [target]
    nmap --spoof-mac [MAC|0|vendor] [target]
    nmap --scanflags [flags] [target]
    nmap --ttl [time] [target]
    nmap --min-parallelism [number] [target]
    nmap --max-parallelism [number] [target]
    nmap --min-hostgroup [number] [targets]
    nmap --max-hostgroup [number] [targets]
    nmap --initial-rtt-timeout [time] [target]
    nmap --max-rtt-timeout [TTL] [target]
    nmap --max-retries [number] [target]
    nmap --host-timeout [time] [target]
    nmap --scan-delay [time] [target]
    nmap --max-scan-delay [time] [target]
    nmap --min-rate [number] [target]
    nmap --max-rate [number] [target]
    nmap --defeat-rst-ratelimit [target]
    nmap -oN [scan.txt] [target]
    nmap -oX [scan.xml] [target]
    nmap -oG [scan.txt] [target]
    nmap -oA [path/filename] [target]
    nmap --stats-every [time] [target]
    nmap -oS [scan.txt] [target]
    ndiff [scan1.xml] [scan2.xml]
    ndiff -v [scan1.xml] [scan2.xml]
    ndiff --xml [scan1.xml] [scan2.xml]
    nmap --packet-trace [target]
    nmap -e [interface] [target]
    nmap --script [script.nse] [target]
    nmap --script [expression] [target]
    nmap --script [category] [target]
    nmap --script [category1,category2,etc]
    nmap --script [script] --script-trace [target]