Home › Labs › Boss Lab 6 — SSRF to Cloud Account Takeover
Boss Lab 6 — SSRF to Cloud Account Takeover
A web app has an SSRF. Use it to reach the (emulated) instance metadata service, steal role credentials, enumerate the account, and exfiltrate from storage — then remediate.
| Difficulty | Advanced |
| Est. time | ~4 hours |
| Tracks | Cloud, Web |
Environment
The Cloud part environment (LocalStack emulating AWS) plus a vulnerable fetcher app with an SSRF, on labnet.
Everything is local and isolated. This is a capstone: it assumes you've worked the related chapters below.
Objectives (capture the flags)
Stages
Work them in order. Each stage has a hint — try hard before opening it.
Stage 1 — Find the SSRF
Confirm the app fetches attacker-supplied URLs server-side.
Hint
A callback to your listener proves server-side fetch.
Stage 2 — Reach metadata
Pivot the SSRF to the metadata endpoint and steal credentials.
Hint
169.254.169.254 (or the LocalStack stand-in) → role credentials.
Stage 3 — Enumerate
Use the stolen credentials to map the account's permissions.
Hint
aws --endpoint-url ... sts get-caller-identity; enumerate with prowler/scoutsuite.
Stage 4 — Exfiltrate
Find and read sensitive objects the role can access.
Hint
List and get from the storage buckets the role permits.
Stage 5 — Remediate
Close the SSRF (egress + IP validation), scope the role down, require IMDSv2.
Hint
Three independent fixes — any one breaks the chain (as in the real Capital One case).
Debrief
Map this to the Capital One breach. Which of the three fixes (egress, least-privilege role, IMDSv2) is the strongest, and why is defence-in-depth the real answer?