OWASP ZAP

Field Detail
Summary Free intercepting proxy and active scanner, automation-friendly
Category Web application testing
Phase web-testing, exploitation
Interface GUI + CLI/daemon + API
Platform Linux, Windows, macOS
Licence Open source (Apache 2.0)
Docs https://www.zaproxy.org/docs/
Related Burp Suite, Nuclei, ffuf and Gobuster

Free, open-source intercepting proxy and web scanner — the no-licence counterpart to Burp Suite. Strong at automation (headless daemon, CLI, CI pipelines) and has a genuinely capable active scanner in the free tier, which Burp Community lacks.

⚠️ Warning — Active scan is intrusive ZAP's active scanner sends real attack payloads (injection, etc.) and can modify data or break fragile apps. Spider/passively-scan first; only active-scan in-scope targets you're authorised to attack.

Getting traffic in

  1. Start ZAP → it runs a proxy on #tcp/8080 (127.0.0.1).
  2. Use the bundled browser (Quick Start → Manual Explore → Launch Browser) — pre-proxied.
  3. Or point your browser at 127.0.0.1:8080 and import ZAP's CA cert (Tools → Options → Network → Server Certificates → Save) for HTTPS.
  4. Set the scope: right-click the site in the Sites tree → Include in Context; tick "scope" so scans stay on target.

Core workflow (GUI)

  • Spider — classic crawler following links/forms. Right-click site → Attack → Spider.
  • AJAX Spider — drives a real browser for JS-heavy / SPA apps the normal spider misses.
  • Passive scan — runs automatically on all proxied traffic; flags issues without sending anything.
  • Active scan — right-click → Attack → Active Scan; fires attack payloads.
  • Manual request editor — ZAP's Repeater equivalent (resend/modify a request).
  • Fuzzer — right-click a request → Fuzz; the Intruder equivalent (no throttling, unlike Burp Community).
  • HUD (Heads-Up Display) — overlays controls directly in the browser.

Panels: Sites tree, History, Alerts (findings by risk), Spider/Active Scan progress tabs.

Automation (ZAP's real strength)

# Headless baseline scan (great for CI) — spider + passive, no attacks
zap-baseline.py -t https://target.com -r report.html

# Full active scan
zap-full-scan.py -t https://target.com -r report.html

# API scan against an OpenAPI/SOAP/GraphQL definition
zap-api-scan.py -t https://target.com/openapi.json -f openapi -r report.html

# Run as a daemon and drive via REST API
zap.sh -daemon -port 8090 -config api.key=changeme
curl "http://127.0.0.1:8090/JSON/spider/action/scan/?apikey=changeme&url=https://target.com"

The Automation Framework (YAML-driven) is the modern way to script jobs reproducibly:

zap.sh -cmd -autorun plan.yaml

Useful bits

  • Add-on marketplace (Manage Add-ons): extra active/passive rules, GraphQL, retest, SAML, etc.
  • Context + Authentication: configure form/script/JSON auth so the spider stays logged in (ZAP's auth config is more involved than Burp's — budget time).
  • Alerts export to HTML/XML/JSON/Markdown for reporting.
  • Request/response in the Break tab = intercept (off by default; toggle the green/red button).

ZAP vs Burp — when to pick ZAP

Reason ZAP
No budget / free active scanner ✅ (Burp needs Pro)
CI/CD, headless, scripted scans ✅ (purpose-built)
Open-source / auditable ✅
Deep manual testing ergonomics, BApp ecosystem Burp usually nicer
Most industry pentest reports Burp is the de-facto standard

Many testers learn both; ZAP for automation and when a licence isn't available, Burp for manual depth.

More automation & API

zap.sh -daemon -host 127.0.0.1 -port 8090 -config api.key=KEY     # headless daemon
zap.sh -cmd -autorun plan.yaml                                    # run an Automation Framework plan
# REST API (swap JSON for HTML/XML; actions change state, views read)
curl "http://127.0.0.1:8090/JSON/spider/action/scan/?apikey=KEY&url=https://t&recurse=true"
curl "http://127.0.0.1:8090/JSON/ascan/action/scan/?apikey=KEY&url=https://t&recurse=true"
curl "http://127.0.0.1:8090/JSON/core/view/alerts/?apikey=KEY&baseurl=https://t"
curl "http://127.0.0.1:8090/OTHER/core/other/htmlreport/?apikey=KEY" -o report.html
  • Launch flags: -config <k=v> overrides any setting, -session <file> loads a saved session, -cmd runs a task then exits, -addoninstall <id> preloads an add-on.
  • Define a Context + Users/Authentication so the spider/scanner stay logged in; set scope so scans stay on-target. The Automation Framework (YAML) is the reproducible, CI-friendly path.

Kill-chain usage

Web testing

zap.sh -cmd -autorun plan.yaml           # automated spider + passive scan

Exploitation

# active scan / Fuzzer to confirm and exploit an injection

Where it fits

Same slot as Burp Suite in the web-testing phase. Reach for ZAP when you want free active scanning or a scriptable/CI scan; chain discovered endpoints to ffuf and Gobuster for content discovery and Nuclei for templated known-CVE checks.