naabu
Fast port scanner with SYN/CONNECT scanning. ProjectDiscovery.
Quickstart
naabu -host target.com
naabu -host target.com -top-ports 100
naabu -host target.com -p -
naabu -l hosts.txt -silent | httpx -silent
Core Concepts
| Concept |
Description |
| SYN scan |
Fast, stealthy (needs root) |
| CONNECT scan |
Full TCP connect (no root) |
| Service discovery |
Combine with httpx for services |
Syntax
naabu -host <target> [options]
naabu -l <file> [options]
Options
| Option |
Description |
-host <target> |
Single target |
-l <file> |
Host list |
- |
Read from stdin |
-exclude-hosts <h> |
Exclude hosts |
-iL <file> |
Input list (nmap style) |
Ports
| Option |
Description |
-p <ports> |
Port range (-p 80,443,8080) |
-p - |
All ports (1-65535) |
-top-ports <n> |
Top N ports (100, 1000) |
-ep <ports> |
Exclude ports |
-pt <type> |
Port type (tcp, udp) |
Scan Type
| Option |
Description |
-sn |
Host discovery only |
-Pn |
Skip host discovery |
-s |
SYN scan (needs root) |
-sc |
CONNECT scan |
Output
| Option |
Description |
-o <file> |
Output file |
-json |
JSON output |
-csv |
CSV output |
-silent |
Silent mode |
-v |
Verbose |
-nc |
No color |
| Option |
Description |
-c <n> |
Concurrency (default 25) |
-rate <n> |
Packets per second |
-timeout <ms> |
Timeout in ms |
-retries <n> |
Retries |
-warm-up-time <sec> |
Warm up time |
Integration
| Option |
Description |
-nmap |
Run nmap on results |
-nmap-cli <args> |
Nmap arguments |
Recipes
Basic Scanning
naabu -host target.com -top-ports 100
naabu -host target.com -p 80,443,8080,8443
naabu -host target.com -p -
naabu -l hosts.txt -top-ports 100
Port Ranges
naabu -host target.com -p 22,80,443,3389
naabu -host target.com -p 1-1000
naabu -host target.com -p 1-1000,8000-9000
naabu -host target.com -p -
Scan Types
sudo naabu -host target.com -s
naabu -host target.com -sc
naabu -host target.com -sn
naabu -host target.com -Pn
Pipeline Integration
naabu -host target.com -silent | httpx -silent
subfinder -d target.com -silent | naabu -silent | httpx -silent
naabu -host target.com -nmap-cli "-sV -sC"
naabu -l hosts.txt -top-ports 100 -silent | httpx -silent -o live.txt
naabu -host target.com -c 50 -rate 1000
naabu -host target.com -c 5 -rate 100
naabu -l hosts.txt -c 100 -rate 5000
Service Discovery
naabu -host target.com -p 80,443,8080,8443 | httpx -silent
naabu -host target.com -p - -nmap-cli "-sV"
naabu -host target.com -silent -o ports.txt
Network Range
naabu -host 10.10.10.0/24 -top-ports 100
naabu -host 10.10.10.0/24 -exclude-hosts 10.10.10.1,10.10.10.2
Output & Parsing
naabu -host target.com -json -o results.json
naabu -host target.com -csv -o results.csv
cat results.json | jq -r '.port'
naabu -host target.com -silent
naabu -l hosts.txt -silent | cut -d: -f2 | sort -u
Troubleshooting
| Issue |
Solution |
| SYN scan fails |
Need root/sudo |
| Slow scan |
Increase -c and -rate |
| Missing ports |
Increase -retries, check firewall |
| Permission denied |
Use -sc for CONNECT scan |
References