Slide 26 of 28
Part 4 · PreventionSlide 26
Slide 26 · The Matrix
Which mitigations stop which attacks?
Real incidents and scenarios mapped to the defenses that would have stopped them.
BREACH — Capital One (2019) · 100M records · Cloud Credential Theft
SSRF via misconfigured WAF to AWS metadata endpoint; IAM credentials stolen; 100+ S3 buckets downloaded

WAF accepted outbound requests to arbitrary URLs including 169.254.169.254. IMDSv1 was in use (GET-only metadata access). IAM role had overly broad S3 permissions across all company buckets.

Stopped by: MIT 02 (block 169.254.0.0/16 after DNS resolution) + MIT 06 (require IMDSv2; disable IMDSv1 on the WAF instance) + MIT 07 (alert on any request to metadata endpoint) + least-privilege IAM (scoped role permissions — not an API7 control, but critical to limiting blast radius)
CVE — GitLab CVE-2021-22214 · Unauthenticated SSRF · CI Lint API
Public CI lint endpoint accepted remote include URLs; fetched metadata endpoints without authentication required

API accepted arbitrary URLs in YAML include directives with no authentication and no URL validation. Cloud-hosted GitLab instances had their metadata endpoints exposed.

Stopped by: MIT 01 (allowlist: include URLs must be from permitted domains) + MIT 02 (resolve and validate IPs before fetching) + MIT 04 (don’t return raw fetch response in error messages) + MIT 06 (network isolation: CI lint service has no route to 169.254.169.254)
OWASP — Webhook to Internal Admin · Internal Network Pivot
Webhook URL accepted without IP validation; internal admin panel reached via SSRF; no auth on internal panel

Hostname check passed, but resolved to internal IP. Admin panel trusted all internal callers. Raw response returned in webhook test result.

Stopped by: MIT 02 (resolve hostname, block RFC 1918 IPs) + MIT 04 (return only success/fail, not raw response) + MIT 05 (admin panel requires auth from all callers, including internal)
OWASP — file:// Protocol · Local File Read
Link preview feature passed file:// URLs to HTTP client library; server returned local file contents as preview response

No protocol restriction on the URL parameter. URL-fetching library supported file:// by default. Raw response returned to caller.

Stopped by: MIT 01 (protocol allowlist: https:// only) + MIT 04 (extract specific fields from response, don’t return raw content) — either alone is sufficient for this specific attack pattern
← Back Ready to test yourself? →