Skip to content
Subdomain takeover Write-up Beginner

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.

Ahmed Samy Follow

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

  1. Enumerate subdomains for the target domain.
  2. Remove duplicate entries from the results.
  3. Scan the list for subdomains that can be taken over.
  4. Check the CNAME record to see which hosting provider the subdomain points to.
  5. Open the subdomain in a browser and confirm it returns a not-found error.
  6. 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.

More by Ahmed Samy

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Subdomain takeover

The lesson behind this report.

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.