XXE → SSRF → IMDS → cloud creds
XML parser configured with external entities resolution. Use XXE to make the server hit IMDS and exfiltrate cloud credentials via DTD trickery.
§ Context
Assumed environment: an endpoint accepts XML input (SAML, SOAP, document upload, RSS importer). XML parser doesn't disable DOCTYPE / external entities.
§ Steps
- 01Move laterally via cloud APIsInitial AccessT1078— Valid Accounts
- 02Recover IAM credentialsCredential AccessT1552— Unsecured Credentials
- 03Find XML-accepting endpointReconnaissanceW-RECON-API-DISCO— API Endpoint Discovery
- 04Read IMDS via parameter entity exfilLateral MovementW-SSRF-IMDS— SSRF → Cloud IMDS
- 05Confirm XXE via OOB callbackLateral MovementW-XXE-BLIND-OOB— Blind XXE — Out-of-Band Exfil
- 06XXE → SSRF (SYSTEM "http://169.254.169.254")Lateral MovementW-XXE-SSRF— XXE → SSRF
§ References
- T1078Valid Accounts
- T1552Unsecured Credentials
§ Frequently asked
- What is the "XXE → SSRF → IMDS → cloud creds" attack path?
- XML parser configured with external entities resolution. Use XXE to make the server hit IMDS and exfiltrate cloud credentials via DTD trickery. It chains 6 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Move laterally via cloud APIs (T1078) — a initial access primitive. Assumed environment: an endpoint accepts XML input (SAML, SOAP, document upload, RSS importer).
- What is the final impact of this kill-chain?
- The final step lands on XXE → SSRF (SYSTEM "http://169.254.169.254") (W-XXE-SSRF), which falls under Lateral Movement. 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 techniques4
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.
- 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
F5 BIG-IP iControl auth bypass (CVE-2022-1388) → root on LB
Connection-header smuggle bypasses iControl REST auth, command-injection RCE as root. Load balancers see all traffic — recover TLS keys, session cookies, internal SSO config.
- Shared techniques2
Spectre-class side-channel → cross-tenant memory leak
Pre-mitigation cloud VM lets a co-tenant trigger speculative loads from kernel / sibling-VM memory. Cache-side-channel measurements recover sensitive data, including TLS keys + cloud creds.
- Shared techniques2
Open MQTT broker → smart-estate takeover
Shodan-indexed MQTT broker on TCP/1883 with no auth. Subscribe to '#' to harvest every device topic; publish to relays/locks/lights/thermostats.
- Shared techniques2
Exported ContentProvider → private data leak
App exports a ContentProvider for legitimate inter-app integration but forgets to enforce grantUri / signature permissions — a rogue installed app reads private auth tokens.