Subdomain Takeover: How I Almost Snatched a Vulnerable Subdomain
A subdomain pointed to a Google Sites host that was no longer claimed, so anyone could register it and serve content under the organisation's domain. The author registered the subdomain on Google Sites and published a page, taking it over.
Published on medium.com
The original lives on medium.com
We do not hold its text, 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 dangling DNS record: the subdomain still pointed at a Google Sites host that had been released, and nobody removed the record.
Impact
An attacker could serve their own content on a subdomain of the organisation's domain, which could be used for phishing or reputational damage.
What the attacker needed
A subdomain with a dangling CNAME record; an account on the hosting provider
How it was found
- Enumerate subdomains for the target domain.
- Remove duplicate entries from the results.
- Scan the list for subdomains that can be taken over.
- Check the CNAME record to see which hosting provider the subdomain points to.
- Open the subdomain in a browser and confirm it returns a not-found error.
- Register the subdomain on the provider, verify it, and publish a page.
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 name like shop.example.com that belongs to the main domain. If it points to an outside service that nobody has claimed, a stranger can sign up for that service and put their own page there, so visitors see attacker content on a trusted name.
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.