Nmap
Introduction
• Nmap, short for Network Mapper, is a network
discovery and security auditing tool. It is
known for its simple and easy to remember
flags that provide powerful scanning options.
Cont’d
• Nmap is widely used by network
administrators to scan for:
• Open ports and services
• Discover services along with their versions
• Guess the operating system running on a target
machine
• Get accurate packet routes till the target
machine
• Monitoring hosts
Nmap Scan Types
TCP SCAN
UDP SCAN
Cont’d
• This type of scan tends to be quite slow
because machines, in general, tend to slow
down their responses to this kind of traffic as a
precautionary measure.
SYN SCAN
ACK SCAN
FIN SCAN
NULL SCAN
XMAS SCAN
RPC SCAN
IDLE SCAN
Nmap Commands
• Scanning Techniques
flag Use Example
-sS TCP syn port scan nmap -sS [Link]
-sT TCP connect port scan nmap -sT [Link]
–sU UDP port scan nmap –sU [Link]
–sA TCP ack port scan nmap –sA [Link]
Host Discovery
Flag Use Example
-Pn only port scan nmap -Pn192.168.1.1
-sn only host discover nmap -sn192.168.1.1
-PR arp discovery on a local network nmap -PR192.168.1.1
-n disable DNS resolution nmap -n [Link]
Port Specification
Flag Use Example
-p specify a port or port range nmap -p 1-30 [Link]
-p- scan all ports nmap -p- [Link]
-F fast port scan nmap -F [Link]
Service Version and OS Detection
flag Use Example
detect the version of services
-sV nmap -sV [Link]
running
-A aggressive scan nmap -A [Link]
detect operating system of the
-O nmap -O [Link]
target
Timing and Performance
Flag Use Example
-T0 paranoid IDS evasion nmap -T0 [Link]
-T1 sneaky IDS evasion nmap -T1 [Link]
-T2 polite IDS evasion nmap -T2 [Link]
-T3 normal IDS evasion nmap -T3 [Link]
-T4 aggressive speed scan nmap -T4 [Link]
-T5 insane speed scan nmap -T5 [Link]