Basic Usage
- IP address, hostname, or range (e.g., 192.168.1.1, example.com, 192.168.1.1/24).
- Performs a simple scan, listing open ports and their corresponding services.
Scan Specific Ports
- -p <port_range>: Specify ports (e.g.,
80
, 1-100
, 22,80,443
).
- Scans only the specified ports.
Service Version Detection
- -sV: Detects version information of services running on open ports.
OS Detection
- -O: Attempts to detect the operating system of the target.
Aggressive Scan
- -A: Performs OS detection, version detection, script scanning, and traceroute.
Stealth Scan (SYN Scan)
- -sS: Performs a stealthy TCP SYN scan.
UDP Scan
- -sU: Scans for open UDP ports.
Scan Multiple Targets
- Scan multiple targets separated by spaces.
Scan Entire Network
- <network_range>: Specify a range (e.g.,
192.168.1.0/24
).
- Scans all IPs within the specified range.
Disable DNS Resolution
- -n: Disables DNS resolution for faster scanning.
- -T<0-5>: Adjusts timing template (0=slowest, 5=fastest).
Save Scan Results to File
- -oN: Saves the output in a normal format.
- -oX: Saves the output in XML format.
- -oG: Saves the output in a grepable format.
Scan with a Custom Script
- —script <script_name>: Runs the specified NSE script (e.g.,
http-title
).
Scan for Specific Service
- —script <service_name>: Runs a script related to a specific service (e.g.,
ssl-cert
on port 443).
Scan for Vulnerabilities
- —script vuln: Runs multiple scripts to detect vulnerabilities.
Traceroute
- —traceroute: Performs traceroute to map the path packets take to reach the target.
Scan a List of Targets from a File
- -iL <file_name>: Scans targets from a specified list in a file.
Evade Firewall/IDS
- -D: Uses decoys to hide the real source of the scan.