Zap cli scans
Version vom 16. Mai 2025, 14:35 Uhr von Thomas.will (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Hier ist die korrigierte Version in **MediaWiki-Syntax** mit korrekten Codeblöcken (``<code>`` oder ``<syntaxhighlight>``): --- == OWASP ZAP Headless-Scan (…“)
Hier ist die korrigierte Version in **MediaWiki-Syntax** mit korrekten Codeblöcken (```` oder ``<syntaxhighlight>``):
---
OWASP ZAP Headless-Scan (ohne Docker)
Mehrere Reports generieren
Führe ZAP mit mehreren -quickout-Parametern aus:
/usr/share/zaproxy/zap.sh -cmd -quickurl "http://victim.secure.local" \
-quickout "/tmp/report.html" \
-quickout "/tmp/report.json" \
-quickout "/tmp/report.xml"
Scan-Typen & Reports
Scan-Typ
Befehl
/usr/share/zaproxy/zap.sh -cmd -spider \
-quickurl "http://victim.secure.local" \
-quickout "/tmp/spider_report.html"
/usr/share/zaproxy/zap.sh -cmd -activescan \
-quickurl "http://victim.secure.local" \
-quickout "/tmp/active_scan_report.json"
/usr/share/zaproxy/zap.sh -cmd \
-quickurl "http://victim.secure.local" \
-quickadv \
-quickout "/tmp/full_report.html"
API-Methode
Starte ZAP als Daemon:
/usr/share/zaproxy/zap.sh -daemon -port 8080 -config api.disablekey=true
Generiere Reports per cURL:
curl "http://localhost:8080/JSON/reports/action/generate/ \
?title=Scan-Report \
&template=traditional-html \
&reportFileName=report.html \
&reportDir=/tmp"
Tipps
- Für XML/JSON-Reports:
&format=xml oder &format=json in der API-URL
- Pfade anpassen: Ersetze
/tmp/ mit deinem Zielverzeichnis
</nowiki>
---
Diese Version:
1. Nutzt korrekte MediaWiki-Syntax
2. Zeigt Befehle in klar getrennten Codeblöcken
3. Ist übersichtlich mit Tabellen strukturiert
4. Enthält alle zuvor besprochenen Funktionen