My First Case of SSRF Using Dirsearch
A development subdomain had a proxy parameter that fetched any URL supplied by the user, without a whitelist. An attacker could use it to reach the cloud metadata service and read AWS credentials.
Published on goziem.medium.com
Hello, I am a 16-year-old bug bounty hunter. I would like to appreciate God Almighty for helping me to find this bug.
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 proxy endpoint accepted any origin URL without validating or whitelisting allowed destinations.
What the attacker needed
Access to the development subdomain; no authentication required
How it was found
- Enumerate subdomains of the target.
- Run a directory brute-force tool with deep recursion against the subdomains.
- Discover a proxy path and, through recursion, an origin parameter.
- Visit the URL with an external site as the origin and see it rendered.
- Test other URLs to confirm no whitelist, then use an out-of-band interaction tester and receive a pingback.
- Request the cloud metadata address and view the returned credentials.
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 server-side request forgery (SSRF) bug lets an attacker make the server fetch a web address of their choosing. Here the server had a feature that loaded other websites, but it did not check which addresses were allowed. The attacker pointed it at a special cloud address that returns secret keys, and the server handed those keys back.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.