Skip to content
Leaked secrets Write-up Beginner

Why is recon so very important? API key exposure by only recon

A bug bounty hunter found a Bugsnag API key exposed in a JavaScript file after performing reconnaissance. The key could be used by an attacker to spam fake error reports, potentially costing the company money.

karim.engmohamed Follow

Published on medium.com

Hello guys, I am learning bug bounty And I want to tell you why recon is so so so important and how I got a bug from recon only.

Karim Mohamed, 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 API key was accidentally included in a publicly accessible JavaScript file.

Impact

An attacker could use the key to spam fake error reports, potentially causing financial loss to the company.

What the attacker needed

None

How it was found

  1. Gather subdomains using tools like subfinder, sublist3r, and amass.
  2. Remove duplicate subdomains with anew.
  3. Filter working websites using httpx.
  4. Collect URLs from the working sites using waybackurls, gospider, and katana.
  5. Extract JavaScript and PHP file URLs into separate lists.
  6. Scan JavaScript files with mantra to find leaked API keys.

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 researcher looked through many subdomains and web addresses to find files that might contain secrets. One JavaScript file had an API key for a service called Bugsnag, which apps use to report errors. Anyone with that key could send lots of fake error reports, which might cost the company money.

What is Leaked secrets?

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

More by karim.engmohamed

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.