Zap cli scans: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 77: | Zeile 77: | ||
* Template-Anpassung: <code>-config report.template=modern</code> | * Template-Anpassung: <code>-config report.template=modern</code> | ||
* Speicherlimit: <code>-Xmx4096m</code> (4GB RAM) | * Speicherlimit: <code>-Xmx4096m</code> (4GB RAM) | ||
| − | |||
| − | |||
| − | |||
| − | |||
Aktuelle Version vom 16. Mai 2025, 14:42 Uhr
OWASP ZAP Headless-Scan ohne Docker
Einführung
OWASP ZAP (Zed Attack Proxy) ist ein weit verbreiteter Open-Source-Sicherheitsscanner für Webanwendungen. Der Headless-Modus ermöglicht automatisierte Scans ohne grafische Oberfläche, ideal für:
- Integration in CI/CD-Pipelines
- Regelmäßige Sicherheitstests
- Automatisierte Berichterstellung
Grundlegender Scan
Der einfachste Befehl für einen schnellen Scan mit HTML-Report:
/usr/share/zaproxy/zap.sh -cmd -quickurl "http://victim.secure.local" -quickout "/tmp/report.html"
Erweiterte Optionen
Mehrere Report-Formate
Generieren Sie HTML, JSON und XML parallel:
/usr/share/zaproxy/zap.sh -cmd -quickurl "http://victim.secure.local" \ -quickout "/tmp/report.html" \ -quickout "/tmp/report.json" \ -quickout "/tmp/report.xml"
Unterschiedliche Scan-Typen
| Scan-Typ | Befehl | Beschreibung |
|---|---|---|
| Spider |
/usr/share/zaproxy/zap.sh -cmd -spider \ -quickurl "http://victim.secure.local" \ -quickout "/tmp/spider_report.html" |
Crawlt die Website-Struktur |
| Aktiver Scan |
/usr/share/zaproxy/zap.sh -cmd -activescan \ -quickurl "http://victim.secure.local" \ -quickout "/tmp/active_scan.json" |
Führt Angriffstests durch |
| Kombinierter Scan |
/usr/share/zaproxy/zap.sh -cmd \ -quickurl "http://victim.secure.local" \ -quickadv \ -quickout "/tmp/full_report.html" |
Spider + Aktiver Scan |
API-Methode
Für maximale Flexibilität:
# ZAP als Daemon starten /usr/share/zaproxy/zap.sh -daemon -port 8080 -config api.disablekey=true # Report per API generieren curl "http://localhost:8080/JSON/reports/action/generate/\ ?title=Scan-Report\ &template=traditional-html\ &reportFileName=report.html\ &reportDir=/tmp"
Tipps
- Für interne URLs:
-config network.trustAllCerts=true - Template-Anpassung:
-config report.template=modern - Speicherlimit:
-Xmx4096m(4GB RAM)