“Day 25: The Cloud Heist — How a Forgotten Webhook Tester Gave Me the Keys to AWS”
A webhook testing tool on a forgotten subdomain made HTTP requests to any URL, creating a blind SSRF. The attacker used DNS exfiltration to steal temporary AWS IAM credentials from the metadata service, gaining broad read access to the cloud account.
infosecwriteups.com
Published on infosecwriteups.com
The target was a SaaS company built entirely on AWS. Their main application was a fortress.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the webhook tester accepted arbitrary URLs without an allowlist or blocking of internal IP ranges, and the EC2 instance used an overprivileged IAM role reachable via the metadata service.
Impact
The attacker could read from almost every resource in the AWS account, including production backups and EC2 instances, but only with temporary credentials and read access.
What the attacker needed
Access to the forgotten devtools subdomain; a webhook tester that fetches arbitrary URLs; a server controlled by the attacker; EC2 instance with metadata service reachable
The fix
The webhook tester should validate URLs against a strict allowlist and block internal IP ranges, and the cloud should use IMDSv2 with least-privilege roles.
How it was found
- Enter the AWS metadata service address in the webhook tester's URL field and observe that a request is initiated.
- Use a controlled server to confirm the tool makes outbound requests from the company's infrastructure.
- Set up a redirector that embeds request details into a subdomain to exfiltrate data via DNS.
- Point the webhook tester through the metadata service to the redirector to capture the IAM role name.
- Fetch the IAM credentials for the discovered role using the same DNS exfiltration technique.
- Use the stolen credentials with the AWS CLI to list S3 buckets and EC2 instances.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A webhook tester is a tool that sends a request to a URL you give it. Here it accepted any address, including internal ones, so the attacker could make the company's own server fetch secret cloud credentials and leak them out through DNS lookups.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.