WAF SSRF → IMDS → S3 mass exfil (Capital One 2019)
A misconfigured ModSecurity rule on a customer-facing app allowed SSRF; SSRF hit EC2 IMDSv1 for the instance role; the role had ListBucket + GetObject on a major customer-data bucket.
§ Context
Assumed environment: target operates AWS-hosted web apps with broad EC2 IAM role attachments. IMDSv1 still enabled. WAF rules occasionally introduce SSRF-class behaviour.
§ Steps
- 01Steal instance role credentialsCredential AccessT1552— Unsecured Credentials
- 02Find SSRF primitive on the web appLateral MovementW-SSRF— Server-Side Request Forgery (SSRF)
- 03ListBucket via stolen roleCollectionC-S3-EXFIL— S3 / Blob / GCS Mass Exfil
- 04Reach 169.254.169.254 IMDSv1Credential AccessC-IMDS-V1— IMDSv1 Credential Theft
- 05Mass GetObject of customer dataInitial AccessAPT-CAPITAL-ONE-SSRF— Cloud SSRF → IMDS → Bucket Exfil (Capital One 2019)
§ References
§ Frequently asked
- What is the "WAF SSRF → IMDS → S3 mass exfil (Capital One 2019)" attack path?
- A misconfigured ModSecurity rule on a customer-facing app allowed SSRF; SSRF hit EC2 IMDSv1 for the instance role; the role had ListBucket + GetObject on a major customer-data bucket. It chains 5 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Steal instance role credentials (T1552) — a credential access primitive. Assumed environment: target operates AWS-hosted web apps with broad EC2 IAM role attachments.
- What is the final impact of this kill-chain?
- The final step lands on Mass GetObject of customer data (APT-CAPITAL-ONE-SSRF), which falls under Initial Access. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques2
Dev workstation → cloud backup keys → encrypted vault store (LastPass 2022)
Attacker compromised a single LastPass DevOps engineer's home machine via outdated Plex Media Server, harvested AWS keys for the encrypted-vault backup bucket, exfiltrated production vault data.
- Shared techniques2
SSRF → IMDS → AssumeRole chain → Org admin
A web SSRF leaks the EC2 instance role; iam:PassRole + sts:AssumeRole hops across two member accounts land you with AdministratorAccess in the organisation's management account.
- Shared techniques2
Public bucket → CI/CD secret leak → cloud takeover
A public S3 bucket hosts a build artefact containing CI tokens / .env files. Use them to push to the prod CI/CD pipeline and gain a deploy role.
- Shared techniques2
SSRF → IMDS → cloud creds → lateral
An image-fetcher / link-preview endpoint fetches attacker-controlled URLs server-side. Pivot to the cloud metadata service and steal the instance role credentials.