Nmap Scripting Engine (NSE)

Category: Reconnaissance & OSINT 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: