Skip to content
Leaked secrets Write-up Intermediate

Finding Hidden Threats: How I Found Leaked AWS Credentials in an Android App API Using DAST

The Android app's API response leaked AWS access keys and secret keys when a specific activity was launched. An attacker could use these credentials to access over 65 S3 buckets and EC2 instances, potentially leading to AWS infrastructure takeover.

Muhammad Khizer Javed Follow

Published on blog.securitybreached.org

Hi everyone, welcome back! I haven’t written a blog in a while, I’m excited to share this recent finding with the bug bounty community.

Muhammad Khizer Javed (@khizer_javed47), on blog.securitybreached.org

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 API endpoint returned AWS credentials in its response, and the mobile app did not protect them, allowing anyone who captured the traffic to obtain them.

Impact

The leaked credentials gave access to over 65 S3 buckets and EC2 instances, and could allow file uploads and deletions that might lead to subdomain takeover.

What the attacker needed

Ability to run the Android app; ability to intercept network traffic

How it was found

  1. Set up MobSF and an Android emulator.
  2. Upload the app to MobSF and start dynamic analysis.
  3. Use the Activity Tester to launch all activities and record traffic.
  4. Generate a dynamic analysis report and open the HTTP(S) traffic file.
  5. Search the traffic file for keywords like 'AWS' and 'Secret'.
  6. Found AWS access and secret keys in a response from api.target.com/services.svc.

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.

When you use a mobile app, it often talks to a server behind the scenes. In this case, the server sent back secret keys that let someone log into the company's cloud account (AWS). With those keys, a person could look at and change data stored in the cloud, which is a serious security problem.

What is Leaked secrets?

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

More by Muhammad Khizer Javed

View all

21 more disclosed reports, 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.