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.
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.
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
- Gather subdomains using tools like subfinder, sublist3r, and amass.
- Remove duplicate subdomains with anew.
- Filter working websites using httpx.
- Collect URLs from the working sites using waybackurls, gospider, and katana.
- Extract JavaScript and PHP file URLs into separate lists.
- 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.