Nmap Commands Cheat Sheet – POFTUT

Nmap Commands Cheat Sheet

Nmap is the most popular tools used in penetrations test or assessments for network scanning. Nmap have another features like listing some basic vulnerabilities and protocol related details. We will look Nmap features in fast way. For more detailed information read following tutorial.

Nmap Tutorial

Target Selection

Target is the remote system nmap will scan.

Scan Single Ip


Scan A Host

nmap google.com

Scan A Range of IP


Scan A Subnet


Scan Targets From Text File

nmap -iL targets.txt

Port Selection

During scan we can define port range to scan

Scan Single TCP Port

nmap -p 22

Scan Range Of TCP Port

nmap -p 1-200

Scan 100 Most Common TCP Ports

nmap -F

Scan All 65535 TCP Ports

nmap -p-

Scan Single UDP Port

nmap -p 5060 -U

Nmap Port Scan Types

Scan types generally requires Administrator or root privileges

Scan Using TCP Connect

nmap -sT

Scan Using TCP Sync

nmap -sS

Scan Using TCP Sync/Ack

nmap --PA

Scan Without Ping

nmap -Pn

Nmap Service and OS Detection

This will detect operating system and services version

Detect Operating System and Version

nmap -O

Detect Service Version

nmap -sV

Detect Aggressive Service Version

nmap -sV --version-intensity 5

Nmap Speed, Performance and Timing

We can set performance, speed and timing of nmap.

Faster Scan

nmap -T 4

Fastest Scan

nmap -T 5

Parallel Scan

nmap --min-parallelism 128

Nmap Output Format

Nmap result will be saved according to given format

Save Output To A File

nmap -oN result.nmap

Save Output As Xml

nmap -oX result.xml

Save Output As Grepable

nmap -oG result.gnmap

Save In All Formats

nmap -oA result.gnmap

Nmap Scripts

Scripts run against host to get information or check some thing with related protocol.

LEARN MORE  What Is DNS Server Or Protocol Port Number?

Scan Using Default Scripts

nmap -sC

Get Help About Script

nmap --script-help=http_open_proxy

Scan Using Specific Script

nmap --script=http_open_proxy

Scan Using Group Of Script

nmap --script=auth

Leave a Comment