Skip to content
SSRF Write-up Advanced

Silent Sniper: How I Turned a Blind SSRF into a Critical AWS Inf

A webhook testing feature was vulnerable to blind SSRF, allowing an attacker to make the server send requests to internal addresses. By injecting shell commands into the URL, the attacker exfiltrated AWS IAM credentials via DNS and accessed internal services.

iski Follow

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

Root cause

Likely the webhook tester did not validate or restrict the URLs it fetched, and it passed user input to a shell command without sanitisation, enabling command injection.

Impact

The attacker could fully compromise the AWS account associated with the EC2 instance, map the internal network, and access sensitive data via internal APIs.

What the attacker needed

Access to the webhook testing feature; control of a domain for DNS exfiltration

The fix

The webhook tester should validate and restrict URLs to an allowlist, block internal IP ranges, and avoid passing user input to shell commands; additionally, AWS IMDSv2 should be enforced.

How it was found

  1. Enter a URL pointing to an external server to confirm outbound connectivity.
  2. Use a URL with a command substitution that curls the AWS metadata endpoint and puts the result in a subdomain of a controlled domain.
  3. Observe DNS queries to the controlled domain containing the exfiltrated data.
  4. Decode the base64-encoded data from the DNS query to obtain AWS credentials.
  5. Use timing differences to scan internal ports and discover a Consul service.

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 lets you give a URL and the server sends a request to it. The bug is that the server did not check where it was sending requests, so an attacker could make it talk to internal servers that are not supposed to be reachable from the internet. The attacker also found a way to run commands on the server and steal cloud 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.

More by iski

View all

186 more disclosed reports, best first.

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.