Skip to content
Leaked secrets Write-up Intermediate

Capturing Exposed AWS Keys During Dynamic Web Application Tests

The web application sent temporary AWS access keys and session tokens to the browser in HTTP responses, allowing an attacker to capture them and use them to send MQTT messages to the IoT endpoint and upload false logs to CloudWatch. This could tamper with log integrity and incur costs.

Aleksa Zatezalo Follow

Published on praetorian.com

We have recently identified several vulnerable HTTP requests that allow attackers to capture access keys and session tokens for a web application’s AWS infrastructure. Attackers could use these keys and tokens to access back-end IOT endpoints and CloudWatch instances to execute commands.

Justin Copeland, on praetorian.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 application design sends temporary AWS credentials directly to the client instead of proxying requests through an internal server.

Impact

Attackers could upload false logs to CloudWatch, tampering with log integrity and potentially interfering with forensic investigations, and could send MQTT messages to the IoT endpoint, incurring costs.

What the attacker needed

Access to the web application

The fix

The application should not send backend credentials to clients; instead, clients should send data to an internal server that validates and forwards it to AWS.

How it was found

  1. Send a request to the '/createsession' endpoint.
  2. Observe the response containing access keys and a session token for the AWS IoT endpoint.
  3. Use the keys to send MQTT messages to the IoT endpoint.
  4. When ending a screen sharing session, a request to '/cloudwatchupload' contains separate access tokens and a session token.
  5. Use those keys to upload logs to CloudWatch.

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 application gave users temporary passwords (access keys) for its cloud services. Because these were sent to the browser, anyone could copy them and use them to mess with the cloud services, like sending fake messages or uploading fake logs.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

More by Aleksa Zatezalo

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.