️ Ghost Subdomain: How I Became an Accidental Cloud Landlord Through Abandoned DNS Records
A subdomain had a dangling CNAME record pointing to a non-existent S3 bucket, allowing an attacker to take over the subdomain by creating a bucket with the same name. The attacker could then host content on the subdomain, enabling phishing and cookie theft.
Free link 🎈
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
Impact
Subdomain takeover could allow content spoofing, phishing, and cookie stealing; additionally, a production database endpoint was exposed to the internet, though it required credentials.
What the attacker needed
Dangling DNS record; bucket name available; AWS account
The fix
The organisation should regularly audit and remove DNS records for services that no longer exist.
How it was found
- Found an abandoned subdomain through mass DNS recon.
- Discovered a dangling CNAME record pointing to a non-existent S3 bucket.
- Checked that the bucket name was available and created it in their own AWS account.
- Configured the bucket for website hosting and uploaded a simple index page.
- Visited the subdomain and saw their page, confirming the takeover.
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 like a separate section of a website, such as blog.example.com. A CNAME record is a DNS setting that points one name to another. If the target of that record no longer exists, an attacker can claim it and control what appears at the subdomain.
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.