| name | subdomain-takeover-hunt |
| description | Detect and verify subdomain takeover via dangling CNAME to unclaimed services. |
| version | 1.1.0 |
| revision_date | "2026-07-25T00:00:00.000Z" |
| license | MIT |
| platforms | ["linux"] |
| compatibility | Requires curl, python3, subfinder, dnsx |
| tags | ["recon","subdomain","takeover","CNAME","DNS","cloud","Heroku","S3","Azure"] |
| category | recon |
| related_skills | ["subdomain-enumeration","origin-ip-discovery","port-service-discovery"] |
Subdomain Takeover Detection
Detect subdomains pointing to unregistered or unclaimed third-party cloud services. When a CNAME record points to a service that no longer exists, an attacker can register that resource and serve arbitrary content under the target's subdomain — enabling phishing, cookie theft, and full origin impersonation.
When to Use
- Subdomain enumeration produces a large list — scan for lingering DNS records.
- Target uses cloud services with shared-namespace identifiers (Heroku, S3, Azure, Zendesk, Shopify).
- A subdomain returns NXDOMAIN, 404, or "no such app" error pages.
- The CNAME target is a service with user-registrable names.
Prerequisites
terminal with curl, dnsx, subfinder.
subzy or subjack installed for automated detection.
- List of alive subdomains from
subdomain-enumeration.
Quick Detection
dnsx -retry 3 -a -cname -resp -silent -l alive_subs.txt | tee dns_records.txt
subzy run --targets alive_subs.txt --hide_fails --vuln
Procedure
Phase 1 — Extract CNAME Records
cat alive_subs.txt | dnsx -silent -cname -resp-only > cname_targets.txt
grep -iE "heroku|s3\.amazonaws|azure|zendesk|shopify|github\.io|bitbucket|surge\.sh|netlify|vercel|ghost\.io|readme|statuspage|pantheon|desk\.com|campaignmonitor|intercom|unbounce|wordpress\.com|cargo\.collective" \
cname_targets.txt > takeover_candidates.txt
Phase 2 — Automated Detection
subzy run --targets alive_subs.txt --hide_fails --vuln
subjack -w alive_subs.txt -t 100 -timeout 30 -o takeover_results.txt \
-ssl -c ~/subjack/fingerprints.json -v
nuclei -l alive_subs.txt \
-t nuclei-templates/takeovers/ \
-o nuclei_takeover_results.txt
Phase 3 — Manual Verification
CANDIDATE=
dig CNAME +short
curl --max-time 30 --connect-timeout 10 -skI | -10