subdomain-takeover
Skill1 starsChanged 14 days agoMITView on GitHub
Hunt for dangling DNS records pointing to deprovisioned cloud resources (CNAME to an unclaimed S3 bucket, Azure/Heroku/GitHub Pages/Fastly/Netlify endpoint, etc.) allowing an attacker to claim the resource and serve content under the victim's subdomain. Use during recon on any in-scope domain with many subdomains. Keywords: subdomain takeover, dangling CNAME, NXDOMAIN, fingerprint, CNAME chain. Do NOT use for takeover of expired top-level domains (different legal/ scope considerations) — flag separately and get explicit operator authorization before any registration action.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- SubhiSec/claude-ai-cyber-security-skillstheir own version, first seen Oct 25, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Kur1sulab/blackboxtheir own version, first seen Aug 12, 2026
- JustineDevs/premortemtheir own version, first seen Jun 9, 2026
- 0xGhostCAT/claude-ai-cyber-security-skillstheir own version, first seen Jun 2, 2026
- yaklang/hack-skillstheir own version, first seen Apr 29, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- yaklang/hack-skills★ 2.4ksame name
- SubhiSec/claude-ai-cyber-security-skills★ 45same name
- 0xGhostCAT/claude-ai-cyber-security-skills★ 41same name
- Kur1sulab/blackbox★ 3same name
- JustineDevs/premortem★ 2same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-agent-reconSkill
- ai-supply-chainSkill
- exfiltration-via-aiSkill
- indirect-injectionSkill
- llm-fuzzingSkill
- prompt-injectionSkill
- rag-poisoningSkill
- tool-abuseSkill
- chain-analysisSkill
- chain-auth-to-takeoverSkill
- chain-customSkill
- chain-graph-walkSkill
- chain-idor-to-mass-dataSkill
- chain-info-to-exploitSkill
- chain-multi-appSkill
- chain-ssrf-to-cloudSkill
- chain-web-to-rceSkill
- chain-xss-to-account-takeoverSkill
- email-securitySkill
- engagement-flowSkill
- finding-disciplineSkill
- http-headers-securitySkill
- oob-interactionsSkill
- opsec-disciplineSkill
- research-firstSkill
- scope-disciplineSkill
- scope-importSkill
- session-contextSkill
- 2fa-bypassSkill
- api-abuseSkill
- auth-bypassSkill
- broken-access-controlSkill
- business-logicSkill
- cache-poisoningSkill
- clickjackingSkill
- corsSkill
- credential-testingSkill
- crlf-injectionSkill
- cryptographic-oracleSkill
- csrfSkill
- css-injectionSkill
- data-exfiltration-testSkill
- deserializationSkill
- email-injectionSkill
- file-uploadSkill
- fuzzingSkill
- graphqlSkill
- grpcSkill
- host-headerSkill
- http-smugglingSkill
- idorSkill
- info-disclosureSkill
- jwtSkill
- lateral-movementSkill
- lfi-rfiSkill
- mass-assignmentSkill
- oauthSkill
- open-redirectSkill
- parameter-pollutionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
Look for these classic fingerprint strings in the body:
- Distinctive: line 97
No periodic DNS hygiene process (zone diffing against active cloud inventory) at the target org.
- Distinctive: line 116
Before declaring this finding complete, probe these escalation paths:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Signals
- Subdomain resolves via CNAME to a known cloud/SaaS domain pattern (
*.s3.amazonaws.com,*.azurewebsites.net,*.github.io,*.herokuapp.com,*.fastly.net,*.netlify.app,*.wordpress.com,*.zendesk.com,*.shopify.com,*.unbouncepages.com,*.readme.io,*.statuspage.io). - HTTP request to the subdomain returns a provider-specific "not found"/"no such app" error page distinct from a generic 404.
- Subdomain appears in old marketing material, DNS zone exports, or
security.txt/CAA/certificate transparency logs but the service it pointed to has been decommissioned.
Prerequisites
- Full subdomain enumeration for the in-scope domain(s) — passive first, active only within scope.
- A list of known "vulnerable CNAME fingerprint" services (maintained community list, e.g.
can-i-take-over-xyzproject) to pattern-match error responses. - Before claiming any resource, explicit operator authorization — claiming a bucket/app, even for PoC, creates a real external resource and must be cleaned up; this is a human-gated action per project rules.
Methodology
- Enumerate subdomains (passive).
subfinder -d target.com -all -silent -o subs.txt amass enum -passive -d target.com -o subs_amass.txt cat subs.txt subs_amass.txt | sort -u > all_subs.txt - Resolve and grab CNAME chains.
dnsx -l all_subs.txt -cname -resp -silent -o cnames.txt # flag anything resolving to NXDOMAIN but still having a CNAME record dnsx -l all_subs.txt -cname -silent | while read -r line; do host=$(echo "$line" | awk '{print $1}') cname=$(echo "$line" | awk '{print $2}') dig +short "$cname" | grep -q . || echo "DANGLING: $host -> $cname" done - Probe live HTTP/HTTPS responses for provider fingerprints.
Look for these classic fingerprint strings in the body:httpx -l all_subs.txt -silent -status-code -title -location -o http_probe.txt- S3:
NoSuchBucket/The specified bucket does not exist - GitHub Pages:
There isn't a GitHub Pages site here. - Heroku:
No such app - Azure:
404 Web Site not found - Fastly:
Fastly error: unknown domain - Shopify:
Sorry, this shop is currently unavailable. - Unbounce:
The requested URL was not found on this server.+ Unbounce branding - Netlify:
Not Found - Request ID:
- S3:
- Cross-reference against a maintained fingerprint database (manually or scripted) rather than relying on memory — fingerprints and vulnerable/non-vulnerable status change as providers patch:
grep -i -f fingerprints.txt http_probe_bodies/*.html - Confirm exploitability (not just the fingerprint). Many providers now require domain verification before serving content for an unclaimed CNAME — a fingerprint match is Inferred, not Demonstrated, until you actually attempt the claim:
For GitHub Pages / Heroku / Netlify-style takeovers, confirm by registering the exact matching free-tier resource name under a test account you control, pointing nothing public at it, and verifying the subdomain now serves your test page — then immediately document and tear it down.# S3 example: check if the bucket name (from the CNAME) is unclaimed and creatable aws s3 ls s3://dangling-bucket-name --no-sign-request # "NoSuchBucket" + ability to `aws s3 mb` it (in a controlled, authorized test AWS account) # confirms takeover is live; do NOT leave attacker content hosted there. - Check wildcard DNS masking — some orgs have
*.target.comwildcarded to a catch-all, which can hide or create false positives for individual dangling records; verify each candidate individually, not just via wildcard response.
Tooling
subfinder,amass(passive enumeration).dnsx(bulk CNAME/A resolution, dangling detection).httpx(bulk HTTP probing with status/title/fingerprint extraction).- Community fingerprint list (
can-i-take-over-xyz/ EdOverflow's list) kept current — providers patch takeover vectors over time, always re-verify against the latest list rather than a cached one.
Root Causes
- DNS CNAME record left pointing at a cloud resource (bucket, app, page) after that resource was deleted/unsubscribed, with the DNS record never cleaned up.
- Provider allows any new customer to claim a resource name that matches an existing, still-pointed-to CNAME, without verifying DNS ownership first.
- No periodic DNS hygiene process (zone diffing against active cloud inventory) at the target org.
Validation Gate (minimum proof)
- DNS resolution output showing the dangling CNAME (
dig/dnsxoutput with timestamp). - HTTP response body showing the provider's distinct "unclaimed" fingerprint.
- Demonstrated tier requires an actual controlled claim-and-serve test (own content, immediately torn down) with before/after screenshots — do only with explicit operator authorization given the external footprint created.
- Without the claim step, label the finding Inferred and say so explicitly in the report.
Gotchas
- Minimum proof: a fingerprint match alone is Inferred — providers change takeover eligibility frequently (e.g. AWS now requires bucket region/ownership checks in many cases); don't claim Demonstrated without the claim test.
- Common N/A: CNAME points to a resource that still resolves and serves the target's own content (not dangling) — this is just a normal third-party integration, not a finding.
- Overclaim trap: reporting every
*.cloudfront.net/*.amazonaws.comCNAME as "potential takeover" without checking the specific fingerprint and current provider patch status creates noise — verify each one. - Claiming a resource, even temporarily, is an action with real-world footprint (billing, abuse reports, DNS propagation delay) — get sign-off, document start/end time, and tear down immediately after capturing evidence.
- Wildcard DNS and load-balanced CNAMEs with health checks can produce false "dangling" signals that self-heal — re-test before reporting.
Chain Anchors
Before declaring this finding complete, probe these escalation paths:
- Full takeover confirmation — Can you actually claim the dangling resource (register on the unclaimed service) and serve content from the subdomain, not just observe a dangling CNAME?
- Cookie/session scope abuse — Does the takeover let you set or read cookies scoped to the parent domain, stealing session data from sibling subdomains?
- CORS/CSP trust abuse — Is the taken-over subdomain listed as a trusted origin in CORS or CSP policy elsewhere in the app, enabling a further chain?
- Phishing/malware hosting — Can the takeover host convincing phishing content under the trusted domain?
A finding without chain anchor results is INCOMPLETE. Record each anchor as tested/not-applicable/blocked with the reason.
Chains & Compositions
- Claimed subdomain → host arbitrary content under victim's domain → phishing/credential harvesting with a trusted-looking origin, or OAuth
redirect_uriregistered to that subdomain (chain with oauth). - Claimed subdomain → set permissive CORS/cookies scoped to the parent domain → session/token theft from the real app if cookies are scoped
Domain=.target.com(chain with session-management). - Claimed subdomain hosting a clickjacking frame of the real login page (chain with clickjacking).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

