Vai al contenuto

FRONTMATTER_81_# Naabu Port Scanner Foglio di formaggio

Panoramica

Naabu è uno scanner a porta veloce scritto in Go by Project Discovery. È progettato con un focus su affidabilità e semplicità, rendendolo un ottimo strumento per la scoperta della superficie di attacco. Naabu può scansionare migliaia di host e porte in pochi minuti, fornendo un modo rapido per identificare porte aperte e potenziali punti di ingresso nei sistemi target.

Che cosa imposta Naabu a parte altri scanner porta è la sua capacità di integrazione con altri strumenti di sicurezza. È progettato per essere utilizzato in combinazione con strumenti come httpx, nuclei e altri strumenti Project Discovery per creare flussi di lavoro di test di sicurezza potenti. Naabu supporta varie tecniche di scansione, tra cui SYN, CONNECT e scansioni UDP, e può essere personalizzato per soddisfare diverse esigenze di scansione.

Naabu è comunemente usato nella fase di ricognizione delle valutazioni di sicurezza e della caccia alle taglie di bug per identificare le porte aperte che potrebbero potenzialmente ospitare servizi vulnerabili. La sua velocità e precisione lo rendono uno strumento prezioso per i professionisti della sicurezza che devono mappare rapidamente la superficie di attacco delle organizzazioni bersaglio.

Installazione

Using Go

# Install using Go (requires Go 1.20 or later)
go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest

# Verify installation
naabu -version

Using Docker

# Pull the latest Docker image
docker pull projectdiscovery/naabu:latest

# Run Naabu using Docker
docker run -it projectdiscovery/naabu:latest -h

Using Homebrew (macOS)

# Install using Homebrew
brew install naabu

# Verify installation
naabu -version

Using PDTM (Project Discovery Tools Manager)

# Install PDTM first if not already installed
go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest

# Install Naabu using PDTM
pdtm -i naabu

# Verify installation
naabu -version

On Kali Linux

# Install using apt
sudo apt install naabu

# Verify installation
naabu -version

Uso di base

Scanning Hosts

# Scan a single host (default: top 100 ports)
naabu -host example.com

# Scan multiple hosts
naabu -host example.com,hackerone.com

# Scan from a list of hosts
naabu -list hosts.txt

# Scan from STDIN
cat hosts.txt|naabu

Selezione porta

# Scan specific ports
naabu -host example.com -p 80,443,8080,8443

# Scan port ranges
naabu -host example.com -p 1-1000

# Scan top ports
naabu -host example.com -top-ports 100

# Scan all ports
naabu -host example.com -p -

Opzioni di uscita

# Save results to a file
naabu -host example.com -o results.txt

# Output in JSON format
naabu -host example.com -json -o results.json

# Output in CSV format
naabu -host example.com -csv -o results.csv

# Silent mode (only host:port)
naabu -host example.com -silent

Uso avanzato

Tipi di scansione

# SYN scan (default, requires root/sudo)
sudo naabu -host example.com -scan-type s

# CONNECT scan (no root required)
naabu -host example.com -scan-type c

# UDP scan (requires root/sudo)
sudo naabu -host example.com -scan-type u

Host Discovery

# Ping scan for host discovery
naabu -host 192.168.1.0/24 -ping

# Skip host discovery
naabu -host 192.168.1.0/24 -skip-host-discovery

Opzioni di rete

# Set source IP
sudo naabu -host example.com -source-ip 192.168.1.2

# Set source port
sudo naabu -host example.com -source-port 53

# Set interface
sudo naabu -host example.com -interface eth0

Scan Optimization

# Set timeout (milliseconds)
naabu -host example.com -timeout 1000

# Set retries
naabu -host example.com -retries 3

# Set rate limit (packets per second)
naabu -host example.com -rate 1000

Ottimizzazione delle prestazioni

Concurrency and Rate Limiting

# Set host concurrency (default: 25)
naabu -host example.com -c 50

# Set port concurrency (default: 25)
naabu -host example.com -port-concurrency 50

# Set rate limit
naabu -host example.com -rate 1000

Opzioni timeout

# Set timeout for port scans (milliseconds)
naabu -host example.com -timeout 1000

# Set timeout for host discovery (milliseconds)
naabu -host example.com -ping-timeout 1000

Ottimizzazione per grandi scansioni

# Use warm-up for large scans
naabu -host example.com -warm-up-time 2

# Increase concurrency for faster scanning
naabu -host example.com -c 100 -port-concurrency 100

Integrazione con altri strumenti

Pipeline with Subfinder

# Find subdomains and scan for open ports
subfinder -d example.com -silent|naabu -silent

# Find subdomains, scan for open ports, and probe for HTTP services
subfinder -d example.com -silent|naabu -silent|httpx -silent

Pipeline con HTTPX

# Scan for open ports and probe for HTTP services
naabu -host example.com -silent|httpx -silent

# Scan for specific ports and probe for HTTP services
naabu -host example.com -p 80,443,8080,8443 -silent|httpx -silent

Pipeline with Nuclei

# Scan for open ports, probe for HTTP services, and scan for vulnerabilities
naabu -host example.com -silent|httpx -silent|nuclei -t cves/

# Scan for specific ports and scan for vulnerabilities
naabu -host example.com -p 80,443,8080,8443 -silent|httpx -silent|nuclei -t cves/

Personalizzazione dell'uscita

Formato di uscita personalizzato

# Output only host:port
naabu -host example.com -silent

# Output with additional information
naabu -host example.com -v

# Count open ports
naabu -host example.com -silent|wc -l

# Sort output by port
naabu -host example.com -silent|sort -t: -k2 -n

Filtro dell'uscita

# Filter by port
naabu -host example.com -silent|grep ":80$"

# Filter by host
naabu -list hosts.txt -silent|grep "example.com"

# Find unique ports
naabu -list hosts.txt -silent|cut -d: -f2|sort -u

Filtro avanzato

Port Filtering

# Exclude specific ports
naabu -host example.com -exclude-ports 80,443

# Scan only common web ports
naabu -host example.com -p 80,81,443,591,2082,2087,2095,2096,3000,8000,8001,8008,8080,8083,8443,8834,8888

Filtro host

# Exclude specific hosts
naabu -list hosts.txt -exclude-hosts excluded-hosts.txt

# Scan only specific CIDR ranges
naabu -host 192.168.1.0/24,10.0.0.0/24

Servizio di rilevamento

# Enable service detection
naabu -host example.com -s

# Enable service detection with version
naabu -host example.com -sv

Opzioni proxy e di rete

# Use SOCKS5 proxy
naabu -host example.com -proxy socks5://127.0.0.1:1080

# Use HTTP proxy
naabu -host example.com -proxy http://127.0.0.1:8080

# Set DNS resolvers
naabu -host example.com -resolvers 1.1.1.1,8.8.8.8

Nmap Integrazione

# Enable Nmap integration
naabu -host example.com -nmap

# Pass additional Nmap flags
naabu -host example.com -nmap -nmap-flags "-sV -A"

# Use Nmap for service detection
naabu -host example.com -nmap-cli "nmap -sV"

Miscellaneous # Caratteristiche

CDN/WAF Detection

# Skip CDN/WAF IPs
naabu -host example.com -exclude-cdn

Selezione della versione IP

# Scan using IPv4
naabu -host example.com -ip-version 4

# Scan using IPv6
naabu -host example.com -ip-version 6

Passive Port Enumeration

# Enable passive port enumeration
naabu -host example.com -passive

Risoluzione dei problemi

Questioni comuni

  1. ** Problemi di autorizzazione ** Traduzione:

  2. ** Limitare il bersaglio* * Traduzione:

  3. ♪False Negatives ♪ * Traduzione:

  4. **Firewall/IDS Rilevamento Traduzione:

Debugging

# Enable verbose mode
naabu -host example.com -v

# Show debug information
naabu -host example.com -debug

# Show only open ports
naabu -host example.com -silent

Configurazione

Configuration File

Naabu utilizza un file di configurazione situato in $HOME/.config/naabu/config.yaml. È possibile personalizzare varie impostazioni in questo file:

# Example configuration file
concurrency: 25
port-concurrency: 25
rate: 1000
timeout: 1000
retries: 3
verify: false
scan-type: s
ports: "80,443,8080,8443"

Variabili ambientali

# Set Naabu configuration via environment variables
export NAABU_CONCURRENCY=25
export NAABU_PORT_CONCURRENCY=25
export NAABU_RATE=1000
export NAABU_TIMEOUT=1000
export NAABU_RETRIES=3

Riferimento

Opzioni di riga di comando

Tabella_82_

Port Lists

Tabella_83_

Tipi di scansione

Tabella_84_

Risorse


*Questo foglio di scacchi fornisce un riferimento completo per l'utilizzo di Naabu, dalla scansione porta di base alle tecniche avanzate e l'integrazione con altri strumenti. Per le informazioni più aggiornate, consultare sempre la documentazione ufficiale. *