This article is a comprehensive guide to finding and exploiting subdomain takeover vulnerabilities in bug bounty programs. It explains how forgotten DNS records pointing to deleted third-party resources can be claimed by attackers to control brand-owned subdomains, describes the complete exploitation pipeline from subdomain enumeration through proof-of-concept, and emphasizes that severity depends entirely on the trust relationship the subdomain carries rather than the technical mechanism.
- Dangling CNAME as takeover primitiveA subdomain takeover occurs when a DNS CNAME record points to a third-party service resource that no longer exists—for example, promo.target.com pointing to target.github.io after the GitHub Pages repository was deleted. The DNS record persists but the backing resource is gone, allowing an attacker to register that resource and control what is served on the victim's subdomain. The danger lies in trust: browsers, cookies, and OAuth providers treat the subdomain as belonging to the company because the DNS record is genuine.
- Enumeration combines passive and active sourcesThe article prescribes a three-stage enumeration pipeline: passive subdomain collection from certificate transparency (using subfinder and crt.sh), active brute force against wordlists (using puredns), and merging into a deduplicated master list. Historical data is especially valuable because takeover-able subdomains are by definition abandoned or migrated—a hostname appearing only in old certificate records but not currently serving content is exactly the orphan to hunt.
- CNAME resolution identifies third-party pointersUsing dnsx to resolve all subdomains and capture CNAME targets reveals which ones point to vulnerable providers. The article provides specific indicators: hostnames ending in .github.io, .s3.amazonaws.com, .herokudns.com, .azurewebsites.net, .trafficmanager.net, .fastly.net, .myshopify.com, and .zendesk.com signal third-party hosting. A subdomain whose CNAME chain ends at a provider but whose HTTP response says 'no such resource' becomes a takeover candidate.
- Fingerprinting is a lead, not confirmationThe nuclei takeover templates and the can-i-take-over-xyz project catalog the known 'unclaimed resource' fingerprints for each service—for example, GitHub Pages serves 'There isn't a GitHub Pages site here,' S3 returns 'The specified bucket does not exist,' and Heroku shows 'No such app.' However, a matching fingerprint only indicates the slot is empty, not that it is claimable by you. Providers often change their error pages or close takeovers entirely (Zendesk, for example, changed its behavior), so fingerprints go stale and must be treated as candidates requiring manual verification against
- Claimability verification separates real from false positivesBefore reporting, an attacker must verify the backing resource can actually be registered: for S3, check whether the bucket name is free using curl; for GitHub Pages, attempt to create a repository with that name; for Heroku, verify the app name is unregistered. Only a resource genuinely claimable by the attacker represents a true takeover. When claiming, serve a single harmless text file containing only the attacker's handle and date—never impersonate the brand, collect data, run JavaScript, or serve login forms.
- Severity determined by trust, not techniqueTwo identical technical takeovers can have wildly different ratings depending on the subdomain's trust relationship. A takeover escalates to Critical if the subdomain shares cookies scoped to the parent domain (.target.com), sits in an OAuth redirect allowlist, is listed as a trusted script-src in a Content Security Policy, or is used in SSO/SAML flows—all enable session hijacking or convincing phishing on a hostname users trust completely. A bare marketing subdomain with no shared cookies and no authentication role may rate only Medium. The article provides a severity decision table keying on
- Report proof must be reproducible in secondsThe winning report structure leads with the proof URL, provides the three reproducible facts (the dangling CNAME, the fingerprint string, the proof file location), and makes the trust relationship explicit with evidence—such as a screenshot of the Set-Cookie header showing cookies scoped to .target.com, or documentation of the subdomain's presence in an OAuth allowlist. The report template in the article emphasizes that the triager must be able to verify the finding with a single curl command and that severity comes from proving the trust relationship, not asserting it.
- Systemic remediation ties DNS deletion to decommissioningBeyond deleting a single dangling record, the article emphasizes that hunters gain higher payouts by identifying the process failure that enabled the whole class of vulnerability. The recommended fix is integrating DNS record deletion into resource decommissioning runbooks—whenever a third-party-hosted resource is deleted, its DNS record must be deleted in the same change—and implementing periodic scans to detect dangling third-party pointers. Bug bounty programs reward hunters who fix the vulnerability class, not just the instance.
Bottom line: Subdomain takeover is primarily a recon challenge: the technical exploitation is trivial, but finding the forgotten DNS record requires combining multiple enumeration sources and historical data. The real bounty depends on proving what trust the subdomain carries (shared cookies, OAuth allowlist membership, CSP source trust) rather than on the takeover itself—a Medium finding becomes Critical when you document that an attacker-controlled page receives the parent application's session cookies.
FREE
Part of the Bug Bounty 60-Day Course
promo.target.com at it with a CNAME, and later deleted the repo — but never deleted the DNS record. That record now dangles, pointing at a GitHub Pages site that doesn’t exist. You visit it, see GitHub’s “There isn’t a GitHub Pages site here” page, create a repo with the matching name, and suddenly promo.target.com is serving a page you control. On a bare marketing subdomain that’s a Medium. On a subdomain that shares cookies with the parent domain, or that sits in an OAuth redirect allowlist, it’s a Critical — session theft and convincing phishing on a hostname the victim trusts completely. The whole class comes down to one forgotten DNS record, and most of the work is recon.🎯 What you’ll master in Day 37
⏱ ~30 min read · 3 hands-on exercises · subfinder + dnsx + nuclei + can-i-take-over-xyz
subfinder, dnsx, httpx, nuclei), and basic comfort with DNS record types (A, AAAA, CNAME, NS). No Burp needed for most of this one — subdomain takeover is a DNS and HTTP recon finding, not a request-manipulation finding.📋 On this page
What a subdomain takeover is
A subdomain takeover occurs when a subdomain points — via DNS — to a third-party service resource that no longer exists, and an attacker can register that resource themselves. The classic form is a dangling CNAME: blog.target.com has a CNAME record pointing to target.github.io, but the GitHub Pages repository that used to live there was deleted. The DNS record still exists and still points to GitHub’s infrastructure, but there is no site behind it. GitHub serves its default “no site here” page. Anyone who creates a GitHub repository with the right name, enables Pages, and sets the custom domain to blog.target.com now controls what GitHub serves for that hostname.
The reason this is dangerous is trust. The browser, other servers, and users all treat blog.target.com as belonging to the company — because it does, at the DNS level. Cookies scoped to .target.com are sent to it. OAuth providers may have it in a redirect allowlist. Content Security Policies may trust it as a script source. A phishing page on blog.target.com is far more convincing than one on a random domain, because the hostname is genuinely the company’s. The takeover converts a forgotten DNS entry into control of a trusted hostname.
Not every third-party pointer is vulnerable. Many providers verify domain ownership before letting you attach a custom domain, which closes the takeover. The vulnerable services are the ones that let you claim a resource name and attach a custom domain without proving you own that domain. The community keeps a living catalog of which services are and aren’t vulnerable.
🧠 EXERCISE 1 — THINK LIKE A HACKER (10 MIN · NO TOOLS)
Reason about the takeover primitive before touching tools:
shop.target.comhas a CNAME totarget-shop.myshopify.com, and visiting it shows Shopify’s “Sorry, this shop is currently unavailable” page.cdn.target.comhas a CNAME tod1a2b3c4.cloudfront.netand returns a generic CloudFront error. Which one is more likely to be a true takeover, and what additional fact would you need to confirm each?- Two subdomains both point at deleted GitHub Pages sites. One is
status.target.comand the other islogin-assets.target.com, where the parent app sets cookies on.target.com. If you could take over only one, which has the higher impact, and why does the cookie scope matter? - A subdomain returns NXDOMAIN (it doesn’t resolve at all) but its parent domain’s zone still has an
NSdelegation for it pointing to a nameserver at a provider where you can register zones. Why might this also be a takeover, even though there’s no dangling CNAME?
Enumerating subdomains
Subdomain takeover is a numbers game. The vulnerable subdomain is almost always a forgotten one — decommissioned, migrated, or spun up for a one-off campaign and abandoned. The bigger and more complete your subdomain list, the more likely you surface the orphan. Combine passive sources (certificate transparency logs, DNS aggregators) with active brute force against a good wordlist and resolver list.
Resolving CNAME chains
Once you have the full list, resolve every subdomain and capture its CNAME target. You’re looking for subdomains whose CNAME points at a third-party service — the giveaways are hostnames ending in .github.io, .s3.amazonaws.com, .herokudns.com, .azurewebsites.net, .trafficmanager.net, .fastly.net, .myshopify.com, .zendesk.com, and similar. A subdomain whose CNAME chain ends at a provider but whose HTTP response says “no such resource” is your candidate.
Fingerprinting vulnerable services
For each candidate, fetch the subdomain over HTTP and HTTPS and compare the response body to the provider’s known “unclaimed resource” fingerprint. Each vulnerable service has a signature string it serves when a custom domain points at it but no resource is attached. The authoritative, community-maintained catalog of these fingerprints — and whether each service is currently exploitable — is the can-i-take-over-xyz project. nuclei ships a takeover template set built from the same data, so you can automate the first pass.
target-org.github.io.
$ curl -s https://promo.target.com | grep -i github
"There isn't a GitHub Pages site here."
# CNAME points at an unclaimed github.io project = takeover
# cross-check the fingerprint against can-i-take-over-xyz
Confirming claimability and claiming safely
This is the step that makes or breaks the report. A fingerprint tells you the subdomain points at an empty slot on a provider; it does not tell you that slot is available to you. You must verify the backing resource can actually be registered. For S3, check whether the bucket name is free. For GitHub Pages, check whether a repo/org with that name can be created. For Heroku, check whether the app name is unregistered. Only a resource you can genuinely claim is a true takeover.
When you claim it, keep the proof minimal and harmless. The goal is to demonstrate that you control what the subdomain serves — nothing more. A single text file with your handle and the date is ideal. Never serve a login form, never collect any data, never run JavaScript, never impersonate the brand’s look and feel. Those actions turn a clean security finding into something that could harm real users and could put you outside the programme’s safe harbor.
⚡ EXERCISE 2 — TOOLING LAB (25 MIN)
Build and run the full takeover pipeline against a domain you are authorised to test (your own domain, a dedicated lab domain, or an in-scope program asset):
- Run
subfinder+ a crt.sh pull +purednsbrute force and merge into a single de-duplicated list. Record how many unique subdomains you found from each source. - Resolve the list with
dnsx -cname -respand grep for third-party service pointers. For each hit, fetch it withhttpxand note the status code and title. - Run the
nucleitakeover templates over the candidates. For any hit, open the can-i-take-over-xyz entry for that service and confirm whether it is currently exploitable and what the claimability steps are. Do not claim anything you are not authorised to claim. - Set up a safe practice takeover on a domain you own: point a test subdomain’s CNAME at a GitHub Pages site, delete the repo, confirm the fingerprint appears, then re-claim it with a harmless proof file. This gives you the end-to-end muscle memory without touching anyone else’s assets.
Rating severity by trust
Two takeovers of identical technical difficulty can have wildly different severity. The driver is the trust the subdomain carries. Ask: do cookies get scoped to the parent domain and therefore sent to this subdomain? Is the subdomain in any OAuth redirect allowlist? Is it trusted as a script or frame source in a Content Security Policy? Is it used in any authentication or SSO flow? Each “yes” escalates the finding, because control of the subdomain now lets you steal sessions, complete OAuth flows, or inject trusted scripts — not just host a page.
Writing the report that pays
A subdomain takeover report is reproducible in seconds if you give the triager the three facts: the dangling record, the fingerprint, and the proof URL on the victim subdomain. Then make the impact case explicit by naming the trust relationship — don’t make the reviewer guess whether cookies are shared. Lead with the proof URL, because one curl confirms the whole finding.
Severity: High (CVSS 8.1) — attacker controls content served on a brand-owned subdomain; escalates to Critical if cookies are shared (see impact)
Affected Host: promo.target.com
Summary: promo.target.com has a dangling CNAME record pointing to target.github.io. The backing GitHub Pages repository has been deleted, so GitHub serves its “There isn’t a GitHub Pages site here” page. The repository name is unclaimed, allowing any GitHub user to create it, attach promo.target.com as a custom domain, and control all content served on the subdomain.
Steps to Reproduce:
1. dig promo.target.com → CNAME target.github.io
2. curl https://promo.target.com → “There isn’t a GitHub Pages site here.” (unclaimed fingerprint)
3. Verified the backing repo is unregistered and claimable
4. Created a GitHub Pages repo, set custom domain = promo.target.com, committed a single harmless file
5. Confirmed: curl https://promo.target.com/bugbounty-poc.txt returns my proof string
[Proof URL and screenshot attached; resource will be released on your confirmation]
Impact: An attacker controls all content on promo.target.com, a hostname browsers and users treat as belonging to target.com. This enables highly convincing phishing on a trusted hostname. Critical escalation: the parent application sets session cookies scoped to .target.com [evidence attached], which are therefore transmitted to promo.target.com. An attacker-controlled page on the subdomain can read those cookies, enabling session hijacking of any user who visits the attacker’s page while authenticated.
Remediation: Remove the dangling CNAME record for promo.target.com from DNS, or re-provision the GitHub Pages resource under the organization’s control. As a systemic fix, add a DNS hygiene check to decommissioning runbooks: whenever a third-party-hosted resource is deleted, delete its DNS record in the same change. Periodically scan all CNAMEs for dangling third-party pointers.
⚡ EXERCISE 3 — WRITE THE REPORT (15 MIN)
Turn your safe self-owned takeover (from Exercise 2) into a full report:
- Write the report using the template above. Use your actual dig output, the actual fingerprint string, and your actual proof URL. Make the PoC one copy-paste
curlfor the triager. - Write two versions of the Impact section: one for a bare marketing subdomain (Medium) and one for a subdomain that shares cookies with the parent (Critical). For the Critical version, describe exactly what evidence you would attach to prove the cookie scope.
- Write the systemic remediation — not just “delete this record” but the process change that prevents the whole class: tying DNS record deletion to resource decommissioning. Triagers reward hunters who fix the class, not just the instance.
💰 Quick check: you find cdn.target.com with a CNAME to a CloudFront distribution that returns a generic CloudFront error page. The nuclei takeover template flagged it. What should you do before reporting?
📋 Day 37 reference card
✅ Mark Day 37 complete
You can enumerate a target’s full subdomain surface, resolve CNAME chains, fingerprint vulnerable services, confirm claimability, claim a resource with a harmless proof, and write a report whose severity is driven by a proven trust relationship.
❓ Frequently asked questions
What is a subdomain takeover?
What is a dangling CNAME record?
How do I confirm a subdomain is actually takeover-able?
Which services are most commonly vulnerable?
What severity does a subdomain takeover get?
Is claiming the resource legal in a bug bounty?
📚 Further reading
- OAuth Token Leakage — Day 32 — a subdomain takeover becomes Critical when the subdomain sits in an OAuth redirect_uri allowlist; this is the escalation path.
- CORS Misconfiguration — Day 31 — a taken-over subdomain that’s trusted by a permissive CORS policy chains into cross-origin data theft.
- External: can-i-take-over-xyz — the authoritative community catalog of takeover-able services, fingerprints, and current exploitability.
- External: Nuclei Takeover Templates — the automated fingerprint set used for first-pass detection across large subdomain lists.

