️ SSRF Odyssey: How I Pillaged Internal Systems & Bagged a Heavy Bounty
A URL preview feature was vulnerable to blind SSRF, allowing an attacker to make the server send requests to internal addresses. By chaining this with DNS exfiltration, the author retrieved AWS IAM credentials and accessed internal services such as Consul.
Free link 🎈
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 URL preview feature did not validate or restrict the URLs it fetched, allowing requests to internal and metadata addresses.
Impact
The attacker could obtain temporary AWS credentials, potentially compromising the AWS account, and map internal services, though the text does not confirm the extent of actual access.
What the attacker needed
A URL preview feature; Attacker controls a domain for DNS exfiltration
The fix
The feature should validate and restrict URLs to an allow list of trusted domains and block outbound traffic to internal and metadata IP ranges.
How it was found
- Start a listener on a server you control and enter its URL in the preview form.
- Observe the incoming request to confirm the server makes outbound connections.
- Try to access the AWS metadata endpoint and see that the preview is unavailable.
- Use a DNS exfiltration payload to retrieve the IAM role name.
- Modify the payload to fetch credentials for that role and decode the base64 response.
- Use the SSRF to scan internal IPs and discover services like Consul.
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.
The website had a feature that fetched a link to show a preview. The author could make it fetch internal addresses that are normally hidden, and by encoding stolen data in a domain name, they could read the responses. This let them steal cloud credentials and explore the internal network.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.