🟒Scanning

Hping

Perform a SYN scan for range of ports:

hping3 -S -p <port> <target>

Specify a port range:

hping3 -S --scan 1-1000 <target>

SYN scan all ports:

hping3 -S --scan all <target>

SYN scan a list of ports:

hping3 -S --scan 80,445,53,21 <target>

Nmap

Simple SYN scan:

nmap -sS <target>

Increase scan speed by disabling DNS resolution -n and treating parget as online -Pn:

nmap -sS <target> -n -Pn 

Execute TCP connect scan -sT in fast mode -F which scans fewer ports than the default scan:

nmap -sT <target> -F

Scan UDP ports:

TCP null scan:

Christmas scan:

FIN scan:

Nmap NSE

NSE scripts are located in:

Execute default set of scripts:

Specify certain script:

How to update scripts:

Get help for certain script catagory (example help for SMB discovery scripts):

Lookup whois information:

SMB OS discovery:

Enumerate all SMB shares:

Execute all authentication related scripts:

Idle Scan Hping Nmap

Idle scan is stealthy because the target host will never know the real attacker's ip

Probes a zombie candidate:

Spoofs zombie’s IP and probes target:

Determines if IP ID is incremental:

Performs Idle scan. (performs previous two steps simultaneously):

Advanced Port Scanning

Fragment packets:

Fragmented SYN scan:

Performs a scan using decoys:

Use random number of decays:

Port scan using DNS as source port 53:

Port scan well known ports using DNS as source port:

Spoof MAC address (useful if firewall only accepts packets from specific MAC addresses):

Random MAC address:

Delayed scan with randomized hosts from a list of hosts:

Spoof IP address of alive host:

Evade firewalls that use packet size to detect port scans:

Last updated

Was this helpful?