
🛡️ Strumento ad alte prestazioni per il rilevamento di WAF e CDN. Identifica i livelli di protezione (Cloudflare, Akamai, AWS, Fastly e altri), esegue test di efficacia e applicazione con payload di evasione e genera report sulla postura. Scritto in Rust 🦀.
Strumento CLI per il rilevamento, il test e la profilazione di Web Application Firewall (WAF) e Content Delivery Network (CDN).
Importante: testa solo sistemi di tua proprietà o per i quali disponi di esplicita autorizzazione.
Per gli agenti di coding AI: consulta AGENTS.md per la mappatura delle skill e i riferimenti ai workflow. Usa agent-skills/waf-assess/WORKFLOW.md per le valutazioni complete; usa agent-skills/validate-build/WORKFLOW.md prima del merge.
| Modalità | Cosa testa | Flag |
|---|
| Rilevamento | Identifica quale WAF/CDN protegge un target | waf-detect <url> |
| Smoke Test | Invia payload di attacco noti, misura i tassi di blocco | --smoke-test <url> |
| Enforcement Test | Invia sonde di attacco categorizzate, misura blocco/challenge/allow | --va <url> |
| Analisi Comportamentale | Sonde appaiate che testano la sofisticazione del WAF su 5 canali | --va2 <url> --va2-run |
| Posture Report | Voto unificato (A-F) che combina tutti i risultati dei test | --posture <url> |
| Report HTML | Rende i risultati JSON salvati in un report statico condivisibile | report <file.json> |
cargo build --release
./target/release/waf-detect scan example.com
# Full hardening scan + HTML report
./target/release/waf-detect hardening https://example.com --output /tmp/example-hardening.json
./target/release/waf-detect report /tmp/example-hardening.json --output /tmp/example-hardening.html
| Modalità | Comando |
|---|---|
| Rilevamento | waf-detect scan <url> o waf-detect <url> |
| Hardening | waf-detect hardening <url> --output file.json |
| Smoke test | waf-detect --smoke-test <url> |
| Enforcement | waf-detect va <url> |
| Comportamentale | waf-detect va2 <url> --run |
| Posture | waf-detect --posture <url> |
| Effectiveness | waf-detect --effectiveness <url> |
| Origin probe | waf-detect origin-probe <url> --json |
| Report HTML | waf-detect report <file.json> -o <file.html> |
Identifica WAF/CDN tramite header, body, DNS, TLS e timing. 12 provider: CloudFlare, AWS, Akamai, Fastly, Vercel, Azure, F5, Imperva, ModSecurity, Sucuri, Radware, FortiWeb.
waf-detect scan example.com --json
waf-detect scan @urls.txt --ndjson
Invia payload di attacco noti e misura cosa il WAF blocca, mette in challenge o lascia passare. Lo smoke testing attivo viene eseguito solo contro target registrati di proprietà.
./target/release/waf-detect --smoke-test example.com
# Aggressive mode (more payloads)
./target/release/waf-detect --smoke-test example.com --aggressive
# Export results
./target/release/waf-detect --smoke-test example.com -o results.json
Categorie di attacco testate: SQL injection (base + avanzata), XSS (base + avanzata), command injection, path traversal, SSTI, SSRF, Log4Shell, file upload, scanner detection, GraphQL injection, HTTP request smuggling, prototype pollution, WebSocket injection, enumeration.
Classificazioni dei risultati:
BLOCKED — il WAF ha bloccato la richiesta (tipicamente 403)CHALLENGE — protezione anti-bot attivata (JS challenge, CAPTCHA)ALLOWED — la richiesta è passata all'originERROR — errore non bloccante (404, 500, timeout)Invia sonde di attacco categorizzate e misura i tassi di blocco/challenge/allow con punteggio di confidenza. Richiede uno scope di target registrato.
# Register owned targets once
./target/release/waf-detect --scope init example.com
# Run enforcement test
./target/release/waf-detect --va https://example.com
# With JSON output
./target/release/waf-detect --va https://example.com --va-json
# Save report
./target/release/waf-detect --va https://example.com --va-output report.json
Opzioni:
--va-tier 1|2|3 — Livello di sicurezza (1 = più sicuro)--va-budget N — Richieste massime per esecuzione (default: 120)--va-timeout SECONDS — Timeout per richiesta (default: 15)--va-delay MS — Ritardo tra le richieste (default: 750)--va-variants N — Varianti per template di payload (default: 4)--va-replay — Esporta il piano di replay come JSON--va-replay-csv — Esporta il piano di replay come CSVTesta la sofisticazione del WAF inviando sonde appaiate — una benigna, una malevola — su 5 canali HTTP. Misura se il WAF le tratta in modo diverso.
# Dry run (shows plan without executing)
./target/release/waf-detect --va2 https://example.com
# Run behavioral analysis
./target/release/waf-detect --va2 https://example.com --va2-run
# Full 5-phase analysis
./target/release/waf-detect --va2 https://example.com --va2-run \
--va2-phases baseline,protocol-variance,state-escalation,behavioral-pressure,challenge-interaction
# Save results
./target/release/waf-detect --va2 https://example.com --va2-run --va2-output results.json
Cosa misura:
| Segnale | Cosa testa |
|---|---|
| Encoding Defense | Il WAF normalizza i percorsi codificati prima del matching? |
| Session Tracking | Il WAF traccia lo stato della sessione e intensifica in caso di abusi ripetuti? |
| Bot Challenge | Il WAF emette CAPTCHA o JS challenge? |
| Rate Limiting | Il WAF limita le richieste rapide? |
| Attack Recognition | Il WAF distingue le sonde di attacco dalle richieste benigne? |
Canali testati: Path, Query, Header, Body, Method. I canali con 0% di rilevamento attacchi sono segnalati come non protetti.
Opzioni:
--va2-phases LIST — Fasi da eseguire (separate da virgola)--va2-seed N — Seed deterministico per risultati riproducibili (default: 1337)--va2-budget N — Budget di richieste (default: 60)--va2-json — Stampa piano/report come JSONGenera un voto di sicurezza unificato (A-F) e un punteggio di rischio (0-100) combinando confidenza di rilevamento, risultati di enforcement e analisi comportamentale.
# Detection only
./target/release/waf-detect --posture example.com
# Include behavioral analysis
./target/release/waf-detect --posture example.com --posture-va2
# Include enforcement testing (VA1) -- distinguishes "WAF present but not
# enforcing" (monitor/log-only mode) from "no WAF at all"
./target/release/waf-detect --posture example.com --posture-va1
# JSON output
./target/release/waf-detect --posture example.com --posture-va2 --posture-json
Scala di valutazione:
Rende un artefatto di scansione JSON salvato in un report HTML statico, facile da rivedere localmente e da condividere con altri ingegneri.
# Render a saved hardening report
./target/release/waf-detect hardening https://example.com --output /tmp/example-hardening.json
./target/release/waf-detect report /tmp/example-hardening.json
# Render a saved posture report
./target/release/waf-detect --posture https://example.com --posture-va2 --posture-json > /tmp/example-posture.json
./target/release/waf-detect report /tmp/example-posture.json --output /tmp/example-posture.html
L'HTML generato è statico e autonomo, quindi può essere allegato ai ticket, condiviso in chat o aperto localmente senza rieseguire la scansione.
Smoke test, analisi dei payload, enforcement, analisi comportamentale e test di effectiveness richiedono target registrati di proprietà.
# Check target scope
./target/release/waf-detect --scope
# Initialize target scope
./target/release/waf-detect --scope init example.com api.example.com
# Add authorized target
./target/release/waf-detect --scope add-target admin.example.com
# Remove target
./target/release/waf-detect --scope remove-target api.example.com
# Clear target scope
./target/release/waf-detect --scope clear
Punteggi di rischio (posture report):
Riscontri comuni:
# List supported providers
./target/release/waf-detect --list
# Effectiveness testing (advanced evasion techniques)
./target/release/waf-detect --effectiveness example.com
# Benchmark against corpus
./target/release/waf-detect --benchmark corpus.json
# Performance snapshot
./target/release/waf-detect example.com --perf-report perf.json
# Debug output
./target/release/waf-detect example.com --debug --verbose
Opzioni di output: --json / --ndjson / --compact / --yaml · waf-detect providers · waf-detect doctor
cargo test --lib
cargo clippy -- -D warnings
cargo fmt
Consulta DEVELOPMENT.md per tutti i dettagli.
Concesso in licenza secondo una delle seguenti
a tua scelta.
Salvo che tu dichiari esplicitamente il contrario, qualsiasi contributo inviato intenzionalmente per l'inclusione nell'opera da parte tua, come definito nella licenza Apache-2.0, sarà concesso in doppia licenza come sopra, senza termini o condizioni aggiuntivi.