Aller au contenu

Feuille de chaleur du scanner de port Naabu

Aperçu général

Naabu est un scanner à port rapide écrit dans Go by Project Discovery. Il est conçu avec un accent sur la fiabilité et la simplicité, ce qui en fait un excellent outil pour la découverte de surface d'attaque. Naabu peut scanner des milliers d'hôtes et de ports en quelques minutes, fournissant un moyen rapide d'identifier les ports ouverts et les points d'entrée potentiels dans les systèmes cibles.

Quels ensembles Naabu mis à part les autres scanners de port est ses capacités d'intégration avec d'autres outils de sécurité. Il est conçu pour être utilisé en combinaison avec des outils comme httpx, noyaux, et d'autres outils Project Discovery pour créer de puissants workflows de tests de sécurité. Naabu prend en charge diverses techniques de numérisation, dont SYN, CONNECT et UDP, et peut être personnalisé pour répondre à différentes exigences de numérisation.

Le Naabu est couramment utilisé dans la phase de reconnaissance des évaluations de sécurité et de la chasse aux primes pour identifier les ports ouverts qui pourraient héberger des services vulnérables. Sa rapidité et sa précision en font un outil précieux pour les professionnels de la sécurité qui doivent rapidement cartographier la surface d'attaque des organisations cibles.

Installation

Utilisation de 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

Utilisation de Docker

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

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

### Utilisation de Homebrew (macOS)

```bash
# Install using Homebrew
brew install naabu

# Verify installation
naabu -version
```_

### Utilisation de PDTM (Project Discovery Tools Manager)

```bash
# 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

Sur Kali Linux

# Install using apt
sudo apt install naabu

# Verify installation
naabu -version

Utilisation de base

Analyse des hôtes

# 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

Sélection du port

# 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 -

Options de sortie

# 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

Utilisation avancée

Types d'analyse

# 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

Découverte de l'hôte

# 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

Options réseau

# 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

Optimisation de la numérisation

# 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

Optimisation des performances

Concurrence et limitation des taux

# 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

Options de délai

# 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

Optimisation pour les grands balayages

# 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

Intégration avec d'autres outils

Pipeline avec sous-marin

# 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 avec 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 avec 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/

Personnalisation des sorties

Format de sortie personnalisé

# 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

Filtrage Sortie

# 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

Filtre avancé

Filtre de port

# 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

Filtre d'hôte

# 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

Détection de service

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

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

Options de procuration et de réseau

# 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

Intégration Nmap

# 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"

Divers Caractéristiques

Détection CDN/WAF

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

Sélection de la version IP

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

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

Énumération passive des ports

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

Dépannage

Questions communes

  1. Émissions de permis
   # Use sudo for SYN and UDP scans
   sudo naabu -host example.com -scan-type s

   # Use CONNECT scan if you don't have root privileges
   naabu -host example.com -scan-type c
   ```

2. **Limitation des taux par objectif* *
```bash
   # Reduce rate limit
   naabu -host example.com -rate 100

   # Increase timeout
   naabu -host example.com -timeout 2000
   ```

3. ** Négatif faux* *
```bash
   # Increase retries
   naabu -host example.com -retries 5

   # Use multiple scan types
   naabu -host example.com -scan-type s,c
   ```

4. **Pare-feu/IDS Détection**
```bash
   # Use slower scan rate
   naabu -host example.com -rate 50

   # Use random port order
   naabu -host example.com -scan-random-port
   ```

### Déboguement

```bash
# 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

Configuration

Fichier de configuration

Naabu utilise un fichier de configuration situé à $HOME/.config/naabu/config.yaml. Vous pouvez personnaliser différents paramètres dans ce fichier :

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

Variables d'environnement

# 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

Référence

Options de ligne de commande

Flag Description
-host Target host(s) to scan
-list, -l File containing list of hosts to scan
-p, -port Ports to scan (comma-separated, range, or - for all)
-top-ports Top ports to scan (default: 100)
-exclude-ports Ports to exclude from scan
-o, -output File to write output to
-json Write output in JSON format
-csv Write output in CSV format
-silent Show only host:port in output
-v, -verbose Show verbose output
-scan-type Type of scan to perform (s=SYN, c=CONNECT, u=UDP)
-ping Use ping for host discovery
-skip-host-discovery Skip host discovery
-source-ip Source IP to use for scanning
-interface Network interface to use
-rate Rate of packet sending (packets per second)
-timeout Timeout in milliseconds
-retries Number of retries for failed requests
-c, -concurrency Number of concurrent hosts to scan
-port-concurrency Number of concurrent ports to scan
-warm-up-time Time in seconds to wait before scanning
-s Enable service detection
-sv Enable service detection with version
-nmap Enable Nmap integration
-nmap-flags Additional Nmap flags
-exclude-cdn Skip CDN/WAF IPs
-proxy HTTP/SOCKS5 proxy to use
-resolvers DNS resolvers to use
-ip-version IP version to use (4, 6, or both)
-passive Enable passive port enumeration
-version Show Naabu version

Listes de ports

Option Description
top-10 Top 10 most common ports
top-100 Top 100 most common ports
top-1000 Top 1000 most common ports
full All 65535 ports
80,443,8080 Custom port list
1-1000 Port range
- All ports (1-65535)

Types d'analyse

Type Description Root Required
s SYN scan Yes
c CONNECT scan No
u UDP scan Yes

Ressources


*Cette feuille de triche fournit une référence complète pour l'utilisation de Naabu, de la numérisation de port de base aux techniques avancées et l'intégration avec d'autres outils. Pour les informations les plus récentes, veuillez toujours consulter la documentation officielle. *