Skip to content
SSRF Write-up Advanced

When a web application SSRF causes the cloud to rain credentials & more

A server-side request forgery flaw in a web application let attackers reach the cloud instance metadata service, but the usual IAM credentials path was blocked. The authors instead used the EC2 describe-instance-attribute operation to read the userData attribute and extract AWS credentials, which gave access to Amazon S3.

soroush.me

Published on soroush.me

https://soroush.me/downloadable/when-a-web-application-ssrf-causes-the-cloud-to-rain-credentials-and-more.pdf

The author, on soroush.me

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 web application allowed user-controlled requests to internal cloud metadata endpoints without restricting the destination, and the instance's startup data contained AWS credentials.

Impact

An attacker could obtain AWS credentials and use them to access Amazon S3, although the direct IAM metadata path was not reachable during the exploitation.

What the attacker needed

SSRF in a web application; Cloud instance with metadata service; Instance userData contains 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 web app can be tricked into making a request to a location the attacker chooses, including internal addresses. Cloud servers often expose a special internal address that returns information about the machine, including temporary access keys. Here the direct path to those keys was blocked, so the researchers used a different cloud API call to read startup configuration data that contained credentials.

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.