Skip to content
SSRF Write-up Intermediate

When Life Gave Me a 500 Error, I Found AWS Keys Instead! $$RF

The application was vulnerable to server-side request forgery (SSRF) through a URL parameter, allowing an attacker to make the server request internal resources. By targeting the cloud metadata endpoint, the attacker could retrieve temporary AWS credentials.

medium.com

Published on medium.com

Free Link🎈

Iski, on medium.com

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

Impact

An attacker could obtain temporary AWS credentials, potentially allowing access to cloud resources; however, Cloudflare initially blocked the request and a bypass was needed.

What the attacker needed

Ability to send requests to the vulnerable endpoint; knowledge of the URL parameter

The fix

The application should validate and restrict user-supplied URLs to an allowlist of permitted external hosts and block access to internal and metadata addresses.

How it was found

  1. Gather endpoint paths and append /getdata.jsp to each.
  2. Send requests with a URL parameter pointing to the cloud metadata address.
  3. Observe a 500 error and a Cloudflare block.
  4. Bypass the block using a path manipulation technique.
  5. Use curl with a Host header set to the metadata IP to retrieve 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.

Server-side request forgery (SSRF) is when a website fetches a URL you supply, but instead of only fetching public pages, it can be tricked into fetching internal addresses. Here, the attacker made the server ask for the cloud provider's secret metadata address, which returned temporary access keys. Those keys could let someone act as the server in the cloud.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.