Skip to content

πŸ‘οΈ Nmap NSE Scripts ​

πŸ“š Resources ​

🧠 Common Script Categories ​

CategoryDescription
authAuthentication-related brute force, bypass, info
broadcastNetwork discovery via LAN broadcast
bruteBrute Forcing
defaultDefault scripts used with -sC
discoveryTarget enumeration and asset discovery
dosDenial-of-Service vulnerability checks (⚠️)
exploitActual exploit attempts (⚠️ intrusive)
externalUses third-party external resources
fuzzerInput fuzzing for service stability tests
intrusivePotentially disruptive scripts
malwareChecks for known malware behavior/backdoors
safeSafe to use without authorization concerns
versionDetailed version detection
vulnCVE/exploit/vulnerability detection

πŸ” Script Discovery & Information ​

bash
# Search by service
ls /usr/share/nmap/scripts/ | grep -iE "ftp|ssh|http"

# Search by protocol & category
grep 'categories' /usr/share/nmap/scripts/*.nse | sort | uniq | grep -i '<protocol>' | grep '<category>'

# Display script help
nmap --script-help=<category-name>|<script-name>
bash
--script=<name>              # Single script
--script=<cat1,cat2>         # Multiple categories
--script="<pattern>"         # Wildcards (http-*, smb-*)
--script-args <args>         # Script arguments
--script-args-file <file>    # Args from file
--script-trace               # Debug script execution
--script-updatedb            # Update script DB
Advanced Examples
bash
# Common examples
--script-args userdb=users.txt,passdb=pass.txt
--script-args http-enum.fingerprintfile=./custom.txt
--script-args smbuser=admin,smbpass=1234

# Pass to all scripts
--script-args 'unsafe=1'
--script-args 'http.useragent="Mozilla/5.0"'

πŸš€ Advanced Script Execution ​

bash
# Enumerate all well-known CVEs
nmap --script discovery,vuln $TARGET

# Save vulnerability scan
nmap --script=vuln -oN vuln_scan.txt $TARGET

# SMB (safe only)
nmap -p 445 --script="smb-* and not brute and not intrusive" $TARGET

# HTTP (safe only)
nmap -p 80,443 --script="http-* and not intrusive,http-* and not brute" $TARGET

# With credentials
nmap --script=smb* --script-args smbuser=username,smbpass=password $TARGET