Nmap Scripting Engine (NSE)
Category: Vulnerability Scanners
Language: C++ / Lua
Type: Port Scanner & Script Engine
๐ Definition & Purpose
The Nmap Scripting Engine (NSE) allows users to write scripts in Lua to automate network checks, vulnerability detection, and system profiling.
๐งช Core Mechanics
Nmap executes Lua scripts during the port scan phase, interacting directly with TCP/UDP sockets to verify vulnerabilities.
๐ Usage & Cheat Sheet
# Check for common vulnerabilities using the 'vuln' script category
nmap --script vuln -p 80,443,8080 target.com
# Audit an SMB server for vulnerabilities (e.g. MS17-010 EternalBlue)
nmap --script smb-vuln-ms17-010 -p 445 10.10.10.40
# Run safe detection scripts and perform OS detection
nmap -sV -sC -O target.com -oN nmap_safe_scan.txt
๐ Integration
This tool is utilized across the: