$XXX Bounty, How I Chained a Leaked AWS Secret Key into a Full Subdomain Takeover
A subdomain pointed to an abandoned host via a stale DNS record, and its login page source exposed AWS access keys. The keys were valid but had limited permissions, and the subdomain was vulnerable to takeover because anyone could claim the abandoned resource.
Hey, I’m M0n3m👋🏻 — and this is the story of a bug I almost gave up on. Almost.
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 a stale DNS record pointing to an abandoned host, combined with hardcoded AWS credentials in the page source.
Impact
The leaked AWS keys were valid but had very limited permissions, and the stale DNS record meant an attacker could potentially take over the subdomain.
What the attacker needed
Subdomain enumeration; access to the login page; valid AWS credentials
How it was found
- Enumerate subdomains using online sources and a tool, then merge results.
- Filter live subdomains with httpx and take screenshots using Nuclei headless mode.
- Review screenshots and open a suspicious login page.
- Try default credentials, then inspect the page source.
- Find AWS access keys in the source and test them with AWS CLI.
- Report the leaked keys; later realise the subdomain is vulnerable to takeover due to a stale DNS record.
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 subdomain is a part of a website address, like blog.example.com. If that subdomain points to a server the company no longer controls, an attacker can claim that server and take over the subdomain. Here, the abandoned server's login page also had secret cloud keys in its code, which let the finder access the company's cloud account, though with limited permissions.
What is Subdomain takeover?
A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.