NMAP - NSE Scripts

Vulnerability scanning using NSE in Nmap. 

Note: I have written this tutorial taking the fact into consideration that the user is well versed with basic "NMAP commands".

For basic NMAP commands please refer the cheat-sheet given below:

Basic Scanning Techniques

• Scan a single target :                                                                  nmap [target]

• Scan multiple targets:                                                                nmap [target1,target2,etc]

• Scan a list of targets                                                                  nmap -iL [list.txt]

• Scan a range of hosts                                                                nmap [range of IP addresses]

• Scan an entire subnet                                                                nmap [IP address/cdir]

• Scan random hosts                                                                    nmap -iR [number]

• Excluding targets from a scan                                                  nmap [targets] –exclude [targets]

• Excluding targets using a list                                                   nmap [targets] –excludefile [list.txt]

• Perform an aggressive scan                                                      nmap -A [target]

• Scan an IPv6 target                                                                  nmap -6 [target]


Discovery Options

• Perform a ping scan only                                                         nmap -sP [target]

• Don’t ping                                                                                nmap -PN [target]

• TCP SYN ping                                                                         nmap -PS [target]

• TCP ACK ping                                                                        nmap -PA [target]

• UDP ping                                                                                 nmap -PU [target]

• SCTP Init Ping                                                                         nmap -PY [target]

• ICMP echo ping                                                                       nmap -PE [target]

• ICMP Timestamp ping                                                             nmap -PP [target]

• ICMP address mask ping                                                         nmap -PM [target]

• IP protocol ping                                                                       nmap -PO [target]

• ARP ping                                                                                 nmap -PR [target]

• Traceroute                                                                                nmap –traceroute [target]


Firewall Evasion Techniques

• Fragment packets                                                                     nmap -f [target]

• Specify a specific MTU                                                           nmap –mtu [MTU] [target]

• Use a decoy                                                                              nmap -D RND: [number] [target]

• Idle zombie scan                                                                      nmap -sI [zombie] [target]

• Manually specify a source port                                                nmap –source-port [port] [target]

• Append random data                                                                nmap –data-length [size] [target]

• Randomize target scan order                                                    nmap –randomize-hosts [target]

• Spoof MAC Address                                                             nmap –spoof-mac [MAC|0|vendor] [target]

• Send bad checksums                                                                nmap –badsum [target]


Version Detection

• Operating system detection                                                     nmap -O [target]

• Attempt to guess an unknown OS                                           nmap -O –osscan-guess [target]

• Service version detection                                                        nmap -sV [target]

• Troubleshooting version scans                                                nmap -sV –version-trace [target]

• Perform a RPC scan                                                                nmap -sR [target]


Nmap Scripting Engine

• Execute individual scripts                                                       nmap –script [script.nse] [target]

• Execute multiple scripts                                                          nmap –script [expression] [target]

• Execute scripts by category                                                    nmap –script [cat] [target]

• Execute multiple scripts categories                                        nmap –script [cat1,cat2, etc]

• Troubleshoot scripts                                                               nmap –script [script] –script-trace [target]

• Update the script database                                                      nmap –script-updatedb

Comments

Popular posts from this blog

OSINT Tool in Termux

Active Directory Ransomware Attacks

Colt Telecom Hit by WarLock Ransomware: SharePoint Zero Day Used for Mass Data Theft