pentesting, updated

Test for subdomain takeover

Find DNS records that point at a service no longer provisioned — claim it and you control content on the victim's domain.

Goal

Find subdomains whose DNS still points at a cloud service or third-party host that’s no longer claimed, so you (or an attacker) could register it.

How to test

Enumerate subdomains (see enumerate applications), then check each CNAME:

dig CNAME sub.example.com

Visit the subdomain and look for a provider’s “not found / not claimed” page (GitHub Pages, Heroku, S3, Azure, Fastly all have distinct ones). dnsrecon automates the sweep across many records at once.

What to look for

A CNAME pointing at a provider domain (*.github.io, *.herokuapp.com, *.s3.amazonaws.com, *.azurewebsites.net, …) that resolves to a provider “not claimed” page instead of your target’s content.

Notes

Always confirm the subdomain is in scope before you claim anything — claiming a resource is an active, visible action, not passive recon. A 404 from the app itself is not proof of takeover; the signal is the provider’s not-claimed page, not a generic 404 — this still needs more certainty when the provider’s page is ambiguous, so treat an unclear case as inconclusive rather than exploitable.

References

§ home
~/knubertus/home/
1,1 Top