Nmap
Open- received TCP SYN-ACKClosed- received TCP RSTFiltered- no responseUnfiltered- (with-sATCP ACK scans) can’t determine the state, but the port is accessibleOpen/Filtered- can’t tell if the port is open or blocked by a firewallClosed/Filtered- (with-sIIP ID idle scan) can’t tell if the port is closed or blocked by a firewall
Filtering out live hosts for -iL:
📜 Nmap Scripting Engine (NSE)
The Nmap Scripting Engine (NSE) extends Nmap’s functionality with custom scripts for vulnerability detection, service enumeration, and exploitation.
Reference: NSE Usage Guide
📖 How to Use NSE
Basic Usage:
-sC- Run a set of popular, common scripts--script- Run specific scripts by name, category, or file path--script-help- Show arguments for--script-args
Advanced Usage:
- Combine scripts with wildcards:
--script "smb-*,http-*" - Use comprehensive documentation: NSE Script Database
- Search for scripts:
grep "ftp" /usr/share/nmap/scripts/script.db
📂 Script Categories
Location: /usr/share/nmap/scripts
| Category | Description |
|---|---|
auth | Scripts related to authentication, such as bypassing credentials or checking for default ones. |
broadcast | Used to discover hosts on the local network by broadcasting requests. |
brute | Scripts that perform brute-force attacks to guess passwords or credentials. |
default | The core set of scripts that are run automatically with -sC or -A. |
discovery | Actively gathers more information about a network, often using public registries or protocols like SNMP. |
dos | Tests for vulnerabilities that could lead to a denial-of-service attack. |
exploit | Actively attempts to exploit known vulnerabilities on a target system. |
external | Interacts with external services or databases. |
fuzzer | Sends unexpected or randomized data to a service to find bugs or vulnerabilities. |
intrusive | These scripts can be noisy, resource-intensive, or potentially crash the target system. |
malware | Scans for known malware or backdoors on a target host. |
safe | Scripts that are considered safe to run as they are not designed to crash services, use excessive resources, or exploit vulnerabilities. |
version | Extends the functionality of Nmap’s version detection feature. |
vuln | Checks a target for specific, known vulnerabilities. |