subdomain-takeover-hunt
Agent skill fromuphiago/recon-skills
Detect and verify subdomain takeover via dangling CNAME to unclaimed services.
How to install subdomain-takeover-hunt
install subdomain-takeover-hunt
# install the recon-skills pack with the skills CLI
npx skills add uphiago/recon-skills# or add only this skill to Claude Code: copy the folder
recon/subdomain-takeover-hunt/
# into
~/.claude/skills/subdomain-takeover-hunt/ (all projects)
.claude/skills/subdomain-takeover-hunt/ (one project)
1# Subdomain Takeover Detection23Detect 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.45## When to Use67- Subdomain enumeration produces a large list — scan for lingering DNS records.8- Target uses cloud services with shared-namespace identifiers (Heroku, S3, Azure, Zendesk, Shopify).9- A subdomain returns NXDOMAIN, 404, or "no such app" error pages.10- The CNAME target is a service with user-registrable names.1112## Prerequisites1314- `terminal` with curl, dnsx, subfinder.15- `subzy` or `subjack` installed for automated detection.16- List of alive subdomains from `subdomain-enumeration`.1718## How to Run1920```bash21# DNS resolution with CNAME extraction22dnsx -retry 3 -a -cname -resp -silent -l alive_subs.txt | tee dns_records.txt2324# Automated takeover scan25subzy run --targets alive_subs.txt --hide_fails --vuln26```2728## Quick Detection2930```bash31# DNS resolution with CNAME extraction32dnsx -retry 3 -a -cname -resp -silent -l alive_subs.txt | tee dns_records.txt3334# Automated takeover scan35subzy run --targets alive_subs.txt --hide_fails --vuln36```3738## Procedure3940### Phase 1 — Extract CNAME Records4142```bash43# Get all CNAME records44cat alive_subs.txt | dnsx -silent -cname -resp-only > cname_targets.txt4546# Filter to suspicious services47…
Excerpt shown under the repository's MIT license.
