[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6P6B7XXE640Q3MA0X2JW72K":3,"skill-same:01M6P6B7XXE640Q3MA0X2JW72K":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":21,"commitSha":50,"skillDirectory":51,"forksCount":13,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6P6B7XXE640Q3MA0X2JW72K","hunt-subdomain",null,"Hunting skill for subdomain takeover vulnerabilities.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fhunt-subdomain\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"hunt subdomain","subdomain","hunt","main","for","hunting","relevant","helper","offensive","scripts","scope","commands","testing","community","take","only","takeover","Tools","license","security","2026-11-10 10:12:30",false,"---\nname: hunt-subdomain\ndescription: Hunting skill for subdomain takeover vulnerabilities.\ncategory: security\nrisk: offensive\nsource: https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\nsource_repo: elementalsouls\u002FClaude-BugHunter\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires explicit written authorization for a target scope plus the\n  relevant testing tools for this technique. Docs-only; helper scripts and commands\n  not bundled.\nsources: github, hackerone_public, binarysecurity_research, can-i-take-over-xyz_research\nreport_count: 3\n---\n> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## Crown Jewel Targets\n\nSubdomain takeover is high-value because it allows an attacker to serve content from a **trusted, company-owned domain** — bypassing browser same-origin trust, phishing filters, and user skepticism simultaneously.\n\n**Highest payout contexts:**\n- Subdomains of major SaaS brands (Shopify, Snapchat, Mozilla, Yelp) where the trusted domain has user session context\n- CDN-backed subdomains (Fastly, CloudFront) where CNAME points to unclaimed origins\n- Third-party service integrations: UserVoice, WordPress.com, GitHub Pages, GitLab Pages, Heroku, Zendesk\n- Preview\u002Fstaging\u002Fdev subdomains (`new.`, `preview.`, `course.`, `delivery.`, `addons-preview.`) — abandoned after feature launches\n- Subdomains used for OAuth redirect URIs or SSO endpoints — these pay highest\n\n**Asset types that matter most:**\n- CNAME records pointing to deprovisioned third-party services\n- NS delegations to abandoned zones\n- A records pointing to unallocated cloud IPs (less common)\n- GitLab\u002FGitHub Pages with unclaimed project namespaces\n\n---\n\n## Attack Surface Signals\n\n**DNS signals:**\n- `CNAME` pointing to `*.github.io`, `*.gitlab.io`, `*.fastly.net`, `*.herokudns.com`, `*.wordpress.com`, `*.uservoice.com`, `*.zendesk.com`, `*.s3.amazonaws.com`, `*.azurewebsites.net`, `*.netlify.app`\n- NXDOMAIN or `SERVFAIL` on the CNAME target while the parent record still exists\n- NS records delegating to registrars where the zone is no longer registered\n\n**HTTP response signals:**\n- `\"There isn't a GitHub Pages site here\"`\n- `\"NoSuchBucket\"` (S3)\n- `\"The specified bucket does not exist\"`\n- `\"No such app\"` (Heroku)\n- `\"Sorry, this shop is currently unavailable\"` (Shopify)\n- `\"This UserVoice subdomain is available\"`\n- `\"Do you want to register\"` (any domain parking page)\n- HTTP 404 with provider-specific error templates\n- Fastly: `\"Fastly error: unknown domain\"`\n- `\"404 Web Site not found\"` (Azure App Service)\n\n**Tech stack signals:**\n- Response headers: `X-Served-By: cache-*` (Fastly), `X-GitHub-Request-Id`, `Server: Netlify`\n- `CNAME` chain resolving to provider infrastructure but returning provider 404\n- SSL cert issued to provider wildcard (`*.fastly.net`) rather than company domain\n\n---\n\n## Step-by-Step Hunting Methodology\n\n1. **Enumerate all subdomains** for the target using passive + active sources:\n   - `subfinder -d target.com -all`\n   - `amass enum -passive -d target.com`\n   - `assetfinder --subs-only target.com`\n   - Certificate transparency: `crt.sh\u002F?q=%.target.com`\n\n2. **Resolve all subdomains** and flag those with:\n   - NXDOMAIN responses\n   - CNAME pointing to a third-party provider\n   ```bash\n   cat subdomains.txt | dnsx -a -cname -o resolved.txt\n   ```\n\n3. **Cross-reference CNAMEs** against known vulnerable provider fingerprints using `nuclei` or `subjack`:\n   ```bash\n   subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c fingerprints.json\n   nuclei -l subdomains.txt -t takeovers\u002F\n   ```\n\n4. **Manual verification** for each flagged subdomain:\n   - `dig CNAME subdomain.target.com` — confirm CNAME exists\n   - `dig A \u003Ccname-target>` — confirm NXDOMAIN or no resolution\n   - `curl -sk https:\u002F\u002Fsubdomain.target.com` — check for provider error string\n\n5. **Confirm claimability** — attempt to register the resource:\n   - GitHub Pages: check if `\u003Cusername>.github.io\u002F\u003Crepo>` or org page is unclaimed\n   - GitLab Pages: check project namespace\n   - S3: attempt `aws s3api create-bucket --bucket \u003Cbucketname>`\n   - UserVoice\u002FZendesk\u002FWordPress: visit registration URL\n   - Fastly: check if origin hostname is unregistered\n\n6. **Claim the resource** (only enough to prove control — do NOT serve malicious content):\n   - Create a minimal index page with your HackerOne username and a timestamp\n   - Take screenshot showing your content served on `subdomain.target.com`\n\n7. **Document the chain**: CNAME record → provider target → unclaimed resource → your content\n\n8. **Assess impact escalation**:\n   - Does the subdomain appear in OAuth redirect allowlists?\n   - Does it share cookies with parent domain (`domain=.target.com`)?\n   - Is it referenced in the app's CSP?\n   - Can it receive authenticated API calls?\n\n9. **Write report** before releasing the claim (some programs want to verify first)\n\n---\n\n## Payload & Detection Patterns\n\n**Bulk CNAME extraction and NXDOMAIN detection:**\n```bash\n# Extract CNAMEs and check if target resolves\nwhile read sub; do\n  cname=$(dig +short CNAME \"$sub\" | head -1)\n  if [ -n \"$cname\" ]; then\n    result=$(dig +short A \"$cname\")\n    if [ -z \"$result\" ]; then\n      echo \"[POTENTIAL] $sub -> $cname (NXDOMAIN)\"\n    fi\n  fi\ndone \u003C subdomains.txt\n```\n\n**Nuclei takeover scan:**\n```bash\nnuclei -l subdomains.txt -t ~\u002Fnuclei-templates\u002Fhttp\u002Ftakeovers\u002F -severity medium,high,critical\n```\n\n**subjack with SSL:**\n```bash\nsubjack -w subdomains.txt -t 100 -timeout 30 -ssl -c $GOPATH\u002Fsrc\u002Fgithub.com\u002Fhaccer\u002Fsubjack\u002Ffingerprints.json -v\n```\n\n**Provider fingerprint grep patterns:**\n```bash\ncurl -sk \"https:\u002F\u002F$subdomain\" | grep -iE \\\n  \"there isn't a github pages|no such bucket|no such app|this uservoice|fastly error: unknown domain|do you want to register|sorry, this shop|project not found|404 not found|unclaimed\"\n```\n\n**Check if subdomain is in scope for cookies (shared parent domain):**\n```bash\ncurl -Isk \"https:\u002F\u002Ftarget.com\" | grep -i \"set-cookie\" | grep \"domain=.target.com\"\n```\n\n**Fastly-specific detection:**\n```bash\ncurl -sI \"https:\u002F\u002Fsubdomain.target.com\" -H \"Host: subdomain.target.com\" | grep -i \"fastly\\|x-served-by\\|x-cache\"\ncurl -sk \"https:\u002F\u002Fsubdomain.target.com\" | grep -i \"fastly error\"\n```\n\n**S3 unclaimed bucket check:**\n```bash\naws s3api head-bucket --bucket \u003Cextracted-bucket-name> 2>&1 | grep -i \"NoSuchBucket\\|403\\|404\"\n```\n\n**GitLab Pages specific:**\n```bash\ndig CNAME sub.target.com\n# If pointing to *.gitlab.io — visit the gitlab.io URL directly\n# 404 from gitlab.io project = claimable\n```\n\n---\n\n## Common Root Causes\n\n1. **Service offboarding without DNS cleanup** — Developer removes a Heroku app, UserVoice account, or WordPress site but never deletes the CNAME record. DNS lives forever; service does not.\n\n2. **Staging\u002Fpreview infrastructure abandoned post-launch** — `course.`, `new.`, `preview.`, `beta.` subdomains provisioned for a product launch, pointed at a third-party, then forgotten when the campaign ends.\n\n3. **Subdomain provisioned by a third-party team** — Marketing sets up a UserVoice or Zendesk subdomain via IT, product sunset kills it, but DNS is owned by engineering who doesn't know.\n\n4. **CDN misconfiguration without origin validation** — Fastly and similar CDNs historically allowed any domain to \"claim\" a backend hostname by creating a service pointing to it. Unregistered origin hostnames become claimable.\n\n5. **GitHub\u002FGitLab Pages namespace not reserved** — Organization renames, user accounts deleted, or repos made private\u002Fdeleted while the Pages CNAME still points to the old namespace.\n\n6. **Wildcard DNS entries** — `*.target.com` pointing to a cloud provider means *any* unclaimed subdomain potentially resolves to claimable infrastructure.\n\n7. **Acquired\u002Fdivested company DNS not cleaned** — Post-acquisition, former brand subdomains (like `oberlo.com` under Shopify) retain CNAMEs to services that are no longer paid for.\n\n---\n\n## Bypass Techniques\n\n**Defense: Manual fingerprint review before publishing**\n- Bypass: Use alternative error strings — providers change their 404 pages. Maintain an up-to-date fingerprint list. Some providers show *different* errors on HTTP vs HTTPS. Test both.\n\n**Defense: Scope restrictions (only main domain in scope)**\n- Bypass: Check program's asset list carefully — `*.target.com` wildcards often include subdomains implicitly. Escalate impact to get it in scope.\n\n**Defense: \"Can't reproduce\" responses due to timing**\n- Bypass: Screenshot immediately after claiming. Record a video walkthrough. The window can be short for popular subdomains.\n\n**Defense: HTTPS certificate mismatch blocking proof**\n- Bypass: Some providers (GitHub Pages, Netlify) auto-provision TLS for claimed domains. Others don't — show HTTP takeover and note TLS would be resolved by provider on claim.\n\n**Defense: Provider-side validation (Fastly verifying domain ownership)**\n- Bypass: Some Fastly configurations don't validate origin hostnames. Check if the CNAME target is a generic Fastly backend hostname vs. a customer-verified one. Try claiming anyway and observe behavior.\n\n**Defense: Rate limiting on subdomain enumeration**\n- Bypass: Use passive-only sources (SecurityTrails, Shodan, crt.sh, VirusTotal) to avoid triggering WAF\u002FIDS. DNS resolution doesn't touch the web server.\n\n**Defense: Program claims \"low severity \u002F no impact\"**\n- Bypass: Demonstrate same-origin cookie theft, OAuth redirect abuse, or CSP bypass to escalate. Find if the subdomain is listed in any `postMessage` `targetOrigin` checks in JS.\n\n---\n\n## Gate 0 Validation\n\n1. **What can the attacker DO right now?**\n   Can you register the unclaimed resource (GitHub repo, S3 bucket, Heroku app, UserVoice account) and serve arbitrary content — including phishing pages, credential harvesters, or malicious scripts — under the target's trusted domain name?\n\n2. **What does the victim LOSE?**\n   Users lose trust and safety: they see a company-branded URL serving attacker content. The company loses brand integrity, potentially leaks session cookies if the subdomain is in `domain=.target.com` scope, and may have OAuth\u002FSSO flows hijacked. Depending on CSP configuration, XSS against the main application may be possible.\n\n3. **Can it be reproduced in 10 minutes from scratch?**\n   - `dig CNAME subdomain.target.com` → confirms CNAME to provider\n   - `curl -sk https:\u002F\u002Fsubdomain.target.com` → confirms provider error string\n   - Visit provider registration page → confirms namespace is available\n   - Screenshots of all three steps = reproducible in under 10 minutes\n\nIf you cannot show the provider resource is *currently unclaimed and claimable*, it is not a valid report.\n\n---\n\n## Real Impact Examples\n\n**Scenario A — Trusted Brand Phishing via Abandoned SaaS (Snapchat\u002FUserVoice)**\nAn attacker finds `feedback.snapchat.com` CNAME pointing to a UserVoice subdomain. The UserVoice account was cancelled but the DNS record remained. The attacker registers the matching UserVoice subdomain for free, gaining control of `feedback.snapchat.com`. Any user navigating to that URL — perhaps from old bookmarks or Google results — sees attacker-controlled content on a Snapchat-branded domain. Since the domain is trusted by browsers, phishing campaigns sent from this subdomain bypass email security filters that check domain reputation.\n\n**Scenario B — CDN Origin Takeover Enabling Same-Origin Attacks (Mozilla\u002FFastly)**\n`addons-preview-cdn.mozilla.net` had a CNAME pointing to a Fastly origin hostname that was no longer registered to Mozilla's Fastly account. An attacker could create a Fastly service claiming that origin hostname, causing all requests to `addons-preview-cdn.mozilla.net` to be routed to attacker-controlled Fastly infrastructure. Since the subdomain shares the `mozilla.net` domain, it could be leveraged to serve malicious CDN assets that appear to come from Mozilla's infrastructure, potentially bypassing CSP rules that allowlist `*.mozilla.net`.\n\n**Scenario C — Staging Subdomain Abandoned Post-Product Migration (Rails\u002FGitHub Pages)**\n`new.rubyonrails.org` was pointed at a GitHub Pages deployment for a website redesign project. After the new site launched and the old GitHub repo was deleted or made private, the DNS CNAME remained. An attacker could fork or create a matching GitHub Pages repository and claim the namespace, serving content under `new.rubyonrails.org`. Because this is the official Ruby on Rails domain, any content served there — including fake download links or malicious gems — carries the full trust of the Rails brand.\n\n---\n\n## Disclosed Report Citations (2022-2023)\n\nThe following coordinated-disclosure \u002F writeup cases extend this skill with **modern provider fingerprints** (Vercel\u002FAzure cloudapp\u002FZendesk era) and explicit ATO-chain examples. Citations #12 and #13 are external writeups (not disclosed HackerOne reports) — treat their payout figures as unverified; only #14 has a public H1 report ID.\n\n12. **Microsoft Azure DevOps — Two `cloudapp.azure.com` subdomains + wildcard `*.visualstudio.com` OAuth reply_to → 1-click ATO** ([Binary Security writeup](https:\u002F\u002Fwww.binarysecurity.no\u002Fposts\u002F2022\u002F11\u002Fazure-devops-takeover))\n    - Subclass: Azure `cloudapp.azure.com` regional-pool dangling CNAME — chained to ATO\n    - ATO chain: **YES** — `app.vssps.visualstudio.com\u002F_signin?reply_to=https:\u002F\u002Ffeedsprodwcus0dr.feeds.visualstudio.com\u002F` whitelisted any `*.visualstudio.com`. Attacker claimed the dangling Azure VM hostnames, then crafted sign-in URLs that returned JWT + FedAuth tokens to attacker-controlled endpoints\n    - Claim flow: identify dangling `cloudapp.azure.com` CNAME, deploy a free-tier VM in the same Azure region requesting the exact released hostname, Azure re-issues the name first-come-first-serve\n    - Year: reported Feb 2021, disclosed Nov 2022 — MSRC explicitly out-of-scope (relied on subdomain takeover), $0\n\n13. **Anonymous H1 — `admin-support.xyz.com` → unclaimed Zendesk → email interception → ATO** ([Writeup by 0xprial](https:\u002F\u002F0xprial.com\u002Fthe-art-of-zendesk-hijacking\u002F))\n    - Subclass: Zendesk help-desk takeover via `xyzdocs.zendesk.com` host-mapping\n    - ATO chain: **YES** — researcher configured email forwarding on the hijacked Zendesk instance, intercepted `support@xyz.com` tickets containing payment info + password-reset emails, then triggered password resets on customer accounts that delivered reset links into the attacker's Zendesk inbox\n    - Claim flow: `dig CNAME` returns `xyzdocs.zendesk.com` (unregistered) → register free Zendesk trial → add `xyzdocs` as subdomain → enable host-mapping for `admin-support.xyz.com`\n    - Year: 2023 — payout per the 0xprial writeup (blog source; no public HackerOne report ID, treat as unverified)\n\n14. **Vercel deleted-project takeover** — a dangling `cname.vercel-dns.com` CNAME pointing to a removed Vercel project can be re-claimed by deploying a new project under that name.\n    - Subclass: Vercel dangling CNAME (`cname.vercel-dns.com`) after project deletion\n    - Impact: crypto-DEX phishing — `proxies.` subdomain trusted for RPC proxy routing; attacker could serve malicious wallet-drain JS under a \"trusted\" subdomain\n    - Claim flow: subdomain returns Vercel 404 `DEPLOYMENT_NOT_FOUND` → create free Vercel project → Settings → Domains → add `proxies.sifchain.finance` — Vercel verifies the existing CNAME and auto-issues TLS without out-of-band ownership proof\n    - Year: 2022 — Sifchain treated as Critical (web3 phishing vector)\n\n**Fastly CDN dangling-service technique (general, not a single disclosed report):**\n- Fingerprint: subdomain returns `Fastly error: unknown domain. Please check that this domain has been added to a service`\n- Claim flow: sign up for Fastly free trial → create new CDN service → attach the dangling hostname as the service domain\n- Root cause: Fastly historically does not verify CNAME ownership on service-creation; any CNAME pointing into Fastly's anycast can be attached to a fresh service\n- Potential ATO chain: chains to CSP-bypass + JS-injection if the parent domain trusts the `assets.`\u002FCDN host for `script-src`\n\n---\n\n## Chains & Compositions (Senior Hunting)\n\nSubdomain takeover by itself is Low-Medium \u002F Informational on most mature programs — defacement of a non-business-critical subdomain is unsexy. The chain payout is 10-100x the standalone. **Every takeover should be evaluated against the five chains below before submission.** If none apply, you have a Low; if one applies, you have a High; if two compose, you have a Critical.\n\n### Chain 1 — Takeover + OAuth `redirect_uri` Whitelist → Auth-Code Theft → 1-Click ATO\n\n- **A.** Enumerate the OAuth `redirect_uri` allowlist via `\u002Foauth\u002Fauthorize` flow. Look for any wildcard `*.target.com` or any takeover-candidate hostname in the static list (e.g., `feedsprod.feeds.visualstudio.com`, `legacy.target.com`).\n- **B.** Find a takeover-able subdomain in that allowlist. Claim it via the provider's onboarding (Vercel project, Azure cloudapp regional pool, S3 bucket, Heroku app, Zendesk, Shopify storefront — see the Disclosed Report Citations above).\n- **C.** Host an OAuth callback receiver on the claimed subdomain. Send victim to `\u002Foauth\u002Fauthorize?redirect_uri=https:\u002F\u002Flegacy.target.com\u002Fcb&response_type=code&client_id=\u003Clegit>`. Victim's browser already has session → auth happens transparently → auth code lands on attacker host. Exchange via token endpoint → ATO.\n- **Impact:** Persistent 1-click ATO across every user of the target. OAuth flow is implicit-to-the-user (no consent screen if previously consented), so requires only a single click on attacker's link.\n- **Real shape:** Microsoft Azure DevOps `cloudapp.azure.com` + wildcard `*.visualstudio.com` reply_to chain (Binary Security, Nov 2022 — Disclosed Report Citation #12). Multiple H1 disclosures on SaaS programs with permissive OAuth allowlists.\n\n### Chain 2 — Takeover at Sibling Subdomain + Cookie-Domain Wildcard → Session Fixation on Parent App\n\n- **A.** Inspect cookies set by the main app (`app.target.com`). If `Set-Cookie` has `Domain=.target.com` (parent-scoped) instead of host-only, cookies bleed to every sibling subdomain — including taken-over ones.\n- **B.** Take over any sibling (`legacy.target.com`, `feedback.target.com`, `assets.target.com`). The taken-over host can now `Set-Cookie` for the parent domain.\n- **C.** Plant `Set-Cookie: SESSIONID=\u003Cattacker_session>; Domain=.target.com` via a script on the taken-over host. Victim visits `app.target.com` with attacker's session cookie attached. Server treats them as the attacker's account → session-fixation ATO.\n- **Impact:** ATO without OAuth or password reset — pure cookie-domain bleed. Especially effective when the parent app uses a non-`__Host-` prefixed session cookie.\n- **Real shape:** Discussed extensively in `hunt-auth-bypass` Duende BFF Attack Class 2 (cookie-domain wildcarding turns subdomain takeover into session fixation). Pattern class: S3-bucket-takeover combined with parent-scoped (`Domain=.target.com`) cookies.\n\n### Chain 3 — Takeover + CSP `script-src` Includes the Taken-Over Host → Persistent Stored XSS on Main App\n\n- **A.** Inspect CSP header on the main app's HTML response. Look for `script-src 'self' assets.target.com cdn.target.com legacy.target.com ...`.\n- **B.** Take over one of the CSP-allowlisted subdomains (especially common: stale CNAMEs to deleted CDNs, deleted Vercel\u002FNetlify projects, archived analytics services).\n- **C.** Host attacker-controlled JavaScript at the takeover host. Every page load on the main app fetches `\u003Cscript src=\"\u002F\u002Ftaken-over-host\u002Fx.js\">` because the host is on the CSP allowlist. JS executes with main-app origin — full session access, can call any same-origin API.\n- **Impact:** Stored XSS-equivalent on every page of the main app, persistent until the CSP is updated. Bypasses every input sanitiser because the JS source is \"trusted\" per CSP.\n- **Real shape:** Sifchain `proxies.sifchain.finance` Vercel takeover — Disclosed Report Citation #14 (web3 phishing); pattern documented in multiple H1 disclosures 2020-2024.\n\n### Chain 4 — Takeover + CORS `Access-Control-Allow-Origin` Regex Match → Credentialed Cross-Origin API Read\n\n- **A.** Inspect the API's CORS configuration. Look for any regex \u002F wildcard \u002F suffix-match in `Access-Control-Allow-Origin` that includes `*.target.com` or `target.com.*` (the second is a common bug).\n- **B.** Take over any subdomain that the CORS regex would accept (or register a new `target.com.attacker.com` host if suffix-match is broken).\n- **C.** Attacker page hosted on the taken-over subdomain issues `fetch('https:\u002F\u002Fapi.target.com\u002Faccount', {credentials:'include'})`. CORS preflight passes. Server returns credentialed response. Attacker's JS reads it.\n- **Impact:** Mass cross-tenant API read with credentials — sessions, PATs, account data, billing records — all reachable from a single attacker page.\n- **Real shape:** Multiple disclosed cases; cross-refs `hunt-api-misconfig` CORS subsection. Pairs with `hunt-misc` step 1 (CORS regex enumeration).\n\n### Chain 5 — Takeover at Email DNS (DKIM \u002F SPF \u002F MX) → Email Spoofing → Phishing Trusted by Parent Brand\n\n- **A.** Enumerate the target's email DNS — DKIM selectors (`selector1._domainkey.target.com`), SPF includes (`include:_spf.takeover-candidate.com`), MX records (`mx.target.com → defunct-provider.example`).\n- **B.** Take over any DKIM-selector or SPF-include host. Now the attacker can publish DKIM\u002FSPF records that authorise their own server to send mail \"from\" `@target.com`.\n- **C.** Send phishing email `From: support@target.com` to victim. Recipient mail server passes SPF + DKIM checks (because the takeover server is now authorised). Email lands in inbox with `target.com` brand, no security warning.\n- **Impact:** Highly-effective phishing campaign exploiting the parent brand. Victims trust the email because every authentication check passes. Credential harvesting, BEC fraud, supply-chain access.\n- **Real shape:** Multiple historical disclosures on DKIM selector takeover \u002F SPF include chain hijacking. Cross-refs DMARC \u002F SPF \u002F DKIM section in `offensive-osint`.\n\n### Operator-level pattern\n\nThe five chains above are exhaustive in practice — virtually every senior-tier subdomain-takeover payout maps to one of them. Before reporting any takeover, run through the checklist:\n\n1. **OAuth `redirect_uri` allowlist** — does the taken-over host appear? → Chain 1, Critical.\n2. **Parent-domain cookies** — does the main app set `Domain=.target.com`? → Chain 2, High.\n3. **CSP `script-src`** — does the taken-over host appear in the allowlist? → Chain 3, Critical.\n4. **CORS allowlist** — does any regex match the taken-over host? → Chain 4, High.\n5. **Email DNS (DKIM selector \u002F SPF include)** — does the taken-over host appear? → Chain 5, High.\n\nIf none apply, file at Low\u002FInformational. **Do not file at Critical without demonstrating one of these chains** — triagers downgrade fast otherwise.\n\nCross-references:\n- `hunt-oauth` — Chain 1 (`redirect_uri` bypass class)\n- `hunt-auth-bypass` Duende BFF Attack Class 2 — Chain 2 (cookie scoping)\n- `hunt-xss` Chain 4 — Chain 3 (CSP bypass via trusted-origin JS)\n- `hunt-api-misconfig` CORS section — Chain 4\n- `offensive-osint` email-security section — Chain 5\n\n---\n\n## Related Skills & Chains\n\n- **`hunt-cloud-misconfig`** — Most stale CNAMEs point at deleted cloud assets (S3, CloudFront, Heroku). Chain primitive: Cloud misconfig (S3 deleted) + `hunt-subdomain` → unclaimed CNAME points to bucket → claim bucket name → full subdomain control.\n- **`hunt-oauth`** — A takeover on an OAuth `redirect_uri` host = persistent ATO across the entire SSO surface. Chain primitive: Subdomain takeover at `auth.target.com` + OAuth redirect_uri allowlist → auth code theft → ATO every user that re-authenticates.\n- **`hunt-api-misconfig`** — CORS regexes routinely allowlist a takeoverable subdomain. Chain primitive: Subdomain takeover + CORS `*.target.com` with credentials → credentialed cross-origin API read → mass IDOR.\n- **`hunt-xss`** — A claimed subdomain is same-origin to session-cookie-domain siblings. Chain primitive: Subdomain takeover at `feedback.target.com` + cookie scope `.target.com` → JS hosted on takeover host reads main-app cookies → session hijack.\n- **`security-arsenal`** — Load the 27+ Subdomain Takeover Fingerprint Table (NoSuchBucket, \"no such app\", GitHub Pages 404 strings, Heroku, Shopify, Fastly) and the `subzy`\u002F`subjack` automation patterns.\n- **`triage-validation`** — Apply the Unique-Marker gate: takeover claim is informational on its own; submit only after publishing a unique HTML marker on the claimed host AND demonstrating a downstream impact (cookie read, OAuth chain, CSP bypass).\n\n## When to Use\n\n- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.\n- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.\n\n## Limitations\n\n- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.\n- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.\n- Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab.\n\n### Example\n\n```bash\n# Read-only first step; confirm scope before anything active.\ncat scope.txt  # target list from the authorized engagement brief\n```\n\n> Adapted from [elementalsouls\u002FClaude-BugHunter](https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.\n","> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## Crown Jewel Targets\n\nSubdomain takeover is high-value because it allows an attacker to serve content from a **trusted, company-owned domain** — bypassing browser same-origin trust, phishing filters, and user skepticism simultaneously.\n\n**Highest payout contexts:**\n- Subdomains of major SaaS brands (Shopify, Snapchat, Mozilla, Yelp) where the trusted domain has user session context\n- CDN-backed subdomains (Fastly, CloudFront) where CNAME points to unclaimed origins\n- Third-party service integrations: UserVoice, WordPress.com, GitHub Pages, GitLab Pages, Heroku, Zendesk\n- Preview\u002Fstaging\u002Fdev subdomains (`new.`, `preview.`, `course.`, `delivery.`, `addons-preview.`) — abandoned after feature launches\n- Subdomains used for OAuth redirect URIs or SSO endpoints — these pay highest\n\n**Asset types that matter most:**\n- CNAME records pointing to deprovisioned third-party services\n- NS delegations to abandoned zones\n- A records pointing to unallocated cloud IPs (less common)\n- GitLab\u002FGitHub Pages with unclaimed project namespaces\n\n---\n\n## Attack Surface Signals\n\n**DNS signals:**\n- `CNAME` pointing to `*.github.io`, `*.gitlab.io`, `*.fastly.net`, `*.herokudns.com`, `*.wordpress.com`, `*.uservoice.com`, `*.zendesk.com`, `*.s3.amazonaws.com`, `*.azurewebsites.net`, `*.netlify.app`\n- NXDOMAIN or `SERVFAIL` on the CNAME target while the parent record still exists\n- NS records delegating to registrars where the zone is no longer registered\n\n**HTTP response signals:**\n- `\"There isn't a GitHub Pages site here\"`\n- `\"NoSuchBucket\"` (S3)\n- `\"The specified bucket does not exist\"`\n- `\"No such app\"` (Heroku)\n- `\"Sorry, this shop is currently unavailable\"` (Shopify)\n- `\"This UserVoice subdomain is available\"`\n- `\"Do you want to register\"` (any domain parking page)\n- HTTP 404 with provider-specific error templates\n- Fastly: `\"Fastly error: unknown domain\"`\n- `\"404 Web Site not found\"` (Azure App Service)\n\n**Tech stack signals:**\n- Response headers: `X-Served-By: cache-*` (Fastly), `X-GitHub-Request-Id`, `Server: Netlify`\n- `CNAME` chain resolving to provider infrastructure but returning provider 404\n- SSL cert issued to provider wildcard (`*.fastly.net`) rather than company domain\n\n---\n\n## Step-by-Step Hunting Methodology\n\n1. **Enumerate all subdomains** for the target using passive + active sources:\n   - `subfinder -d target.com -all`\n   - `amass enum -passive -d target.com`\n   - `assetfinder --subs-only target.com`\n   - Certificate transparency: `crt.sh\u002F?q=%.target.com`\n\n2. **Resolve all subdomains** and flag those with:\n   - NXDOMAIN responses\n   - CNAME pointing to a third-party provider\n   ```bash\n   cat subdomains.txt | dnsx -a -cname -o resolved.txt\n   ```\n\n3. **Cross-reference CNAMEs** against known vulnerable provider fingerprints using `nuclei` or `subjack`:\n   ```bash\n   subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c fingerprints.json\n   nuclei -l subdomains.txt -t takeovers\u002F\n   ```\n\n4. **Manual verification** for each flagged subdomain:\n   - `dig CNAME subdomain.target.com` — confirm CNAME exists\n   - `dig A \u003Ccname-target>` — confirm NXDOMAIN or no resolution\n   - `curl -sk https:\u002F\u002Fsubdomain.target.com` — check for provider error string\n\n5. **Confirm claimability** — attempt to register the resource:\n   - GitHub Pages: check if `\u003Cusername>.github.io\u002F\u003Crepo>` or org page is unclaimed\n   - GitLab Pages: check project namespace\n   - S3: attempt `aws s3api create-bucket --bucket \u003Cbucketname>`\n   - UserVoice\u002FZendesk\u002FWordPress: visit registration URL\n   - Fastly: check if origin hostname is unregistered\n\n6. **Claim the resource** (only enough to prove control — do NOT serve malicious content):\n   - Create a minimal index page with your HackerOne username and a timestamp\n   - Take screenshot showing your content served on `subdomain.target.com`\n\n7. **Document the chain**: CNAME record → provider target → unclaimed resource → your content\n\n8. **Assess impact escalation**:\n   - Does the subdomain appear in OAuth redirect allowlists?\n   - Does it share cookies with parent domain (`domain=.target.com`)?\n   - Is it referenced in the app's CSP?\n   - Can it receive authenticated API calls?\n\n9. **Write report** before releasing the claim (some programs want to verify first)\n\n---\n\n## Payload & Detection Patterns\n\n**Bulk CNAME extraction and NXDOMAIN detection:**\n```bash\n# Extract CNAMEs and check if target resolves\nwhile read sub; do\n  cname=$(dig +short CNAME \"$sub\" | head -1)\n  if [ -n \"$cname\" ]; then\n    result=$(dig +short A \"$cname\")\n    if [ -z \"$result\" ]; then\n      echo \"[POTENTIAL] $sub -> $cname (NXDOMAIN)\"\n    fi\n  fi\ndone \u003C subdomains.txt\n```\n\n**Nuclei takeover scan:**\n```bash\nnuclei -l subdomains.txt -t ~\u002Fnuclei-templates\u002Fhttp\u002Ftakeovers\u002F -severity medium,high,critical\n```\n\n**subjack with SSL:**\n```bash\nsubjack -w subdomains.txt -t 100 -timeout 30 -ssl -c $GOPATH\u002Fsrc\u002Fgithub.com\u002Fhaccer\u002Fsubjack\u002Ffingerprints.json -v\n```\n\n**Provider fingerprint grep patterns:**\n```bash\ncurl -sk \"https:\u002F\u002F$subdomain\" | grep -iE \\\n  \"there isn't a github pages|no such bucket|no such app|this uservoice|fastly error: unknown domain|do you want to register|sorry, this shop|project not found|404 not found|unclaimed\"\n```\n\n**Check if subdomain is in scope for cookies (shared parent domain):**\n```bash\ncurl -Isk \"https:\u002F\u002Ftarget.com\" | grep -i \"set-cookie\" | grep \"domain=.target.com\"\n```\n\n**Fastly-specific detection:**\n```bash\ncurl -sI \"https:\u002F\u002Fsubdomain.target.com\" -H \"Host: subdomain.target.com\" | grep -i \"fastly\\|x-served-by\\|x-cache\"\ncurl -sk \"https:\u002F\u002Fsubdomain.target.com\" | grep -i \"fastly error\"\n```\n\n**S3 unclaimed bucket check:**\n```bash\naws s3api head-bucket --bucket \u003Cextracted-bucket-name> 2>&1 | grep -i \"NoSuchBucket\\|403\\|404\"\n```\n\n**GitLab Pages specific:**\n```bash\ndig CNAME sub.target.com\n# If pointing to *.gitlab.io — visit the gitlab.io URL directly\n# 404 from gitlab.io project = claimable\n```\n\n---\n\n## Common Root Causes\n\n1. **Service offboarding without DNS cleanup** — Developer removes a Heroku app, UserVoice account, or WordPress site but never deletes the CNAME record. DNS lives forever; service does not.\n\n2. **Staging\u002Fpreview infrastructure abandoned post-launch** — `course.`, `new.`, `preview.`, `beta.` subdomains provisioned for a product launch, pointed at a third-party, then forgotten when the campaign ends.\n\n3. **Subdomain provisioned by a third-party team** — Marketing sets up a UserVoice or Zendesk subdomain via IT, product sunset kills it, but DNS is owned by engineering who doesn't know.\n\n4. **CDN misconfiguration without origin validation** — Fastly and similar CDNs historically allowed any domain to \"claim\" a backend hostname by creating a service pointing to it. Unregistered origin hostnames become claimable.\n\n5. **GitHub\u002FGitLab Pages namespace not reserved** — Organization renames, user accounts deleted, or repos made private\u002Fdeleted while the Pages CNAME still points to the old namespace.\n\n6. **Wildcard DNS entries** — `*.target.com` pointing to a cloud provider means *any* unclaimed subdomain potentially resolves to claimable infrastructure.\n\n7. **Acquired\u002Fdivested company DNS not cleaned** — Post-acquisition, former brand subdomains (like `oberlo.com` under Shopify) retain CNAMEs to services that are no longer paid for.\n\n---\n\n## Bypass Techniques\n\n**Defense: Manual fingerprint review before publishing**\n- Bypass: Use alternative error strings — providers change their 404 pages. Maintain an up-to-date fingerprint list. Some providers show *different* errors on HTTP vs HTTPS. Test both.\n\n**Defense: Scope restrictions (only main domain in scope)**\n- Bypass: Check program's asset list carefully — `*.target.com` wildcards often include subdomains implicitly. Escalate impact to get it in scope.\n\n**Defense: \"Can't reproduce\" responses due to timing**\n- Bypass: Screenshot immediately after claiming. Record a video walkthrough. The window can be short for popular subdomains.\n\n**Defense: HTTPS certificate mismatch blocking proof**\n- Bypass: Some providers (GitHub Pages, Netlify) auto-provision TLS for claimed domains. Others don't — show HTTP takeover and note TLS would be resolved by provider on claim.\n\n**Defense: Provider-side validation (Fastly verifying domain ownership)**\n- Bypass: Some Fastly configurations don't validate origin hostnames. Check if the CNAME target is a generic Fastly backend hostname vs. a customer-verified one. Try claiming anyway and observe behavior.\n\n**Defense: Rate limiting on subdomain enumeration**\n- Bypass: Use passive-only sources (SecurityTrails, Shodan, crt.sh, VirusTotal) to avoid triggering WAF\u002FIDS. DNS resolution doesn't touch the web server.\n\n**Defense: Program claims \"low severity \u002F no impact\"**\n- Bypass: Demonstrate same-origin cookie theft, OAuth redirect abuse, or CSP bypass to escalate. Find if the subdomain is listed in any `postMessage` `targetOrigin` checks in JS.\n\n---\n\n## Gate 0 Validation\n\n1. **What can the attacker DO right now?**\n   Can you register the unclaimed resource (GitHub repo, S3 bucket, Heroku app, UserVoice account) and serve arbitrary content — including phishing pages, credential harvesters, or malicious scripts — under the target's trusted domain name?\n\n2. **What does the victim LOSE?**\n   Users lose trust and safety: they see a company-branded URL serving attacker content. The company loses brand integrity, potentially leaks session cookies if the subdomain is in `domain=.target.com` scope, and may have OAuth\u002FSSO flows hijacked. Depending on CSP configuration, XSS against the main application may be possible.\n\n3. **Can it be reproduced in 10 minutes from scratch?**\n   - `dig CNAME subdomain.target.com` → confirms CNAME to provider\n   - `curl -sk https:\u002F\u002Fsubdomain.target.com` → confirms provider error string\n   - Visit provider registration page → confirms namespace is available\n   - Screenshots of all three steps = reproducible in under 10 minutes\n\nIf you cannot show the provider resource is *currently unclaimed and claimable*, it is not a valid report.\n\n---\n\n## Real Impact Examples\n\n**Scenario A — Trusted Brand Phishing via Abandoned SaaS (Snapchat\u002FUserVoice)**\nAn attacker finds `feedback.snapchat.com` CNAME pointing to a UserVoice subdomain. The UserVoice account was cancelled but the DNS record remained. The attacker registers the matching UserVoice subdomain for free, gaining control of `feedback.snapchat.com`. Any user navigating to that URL — perhaps from old bookmarks or Google results — sees attacker-controlled content on a Snapchat-branded domain. Since the domain is trusted by browsers, phishing campaigns sent from this subdomain bypass email security filters that check domain reputation.\n\n**Scenario B — CDN Origin Takeover Enabling Same-Origin Attacks (Mozilla\u002FFastly)**\n`addons-preview-cdn.mozilla.net` had a CNAME pointing to a Fastly origin hostname that was no longer registered to Mozilla's Fastly account. An attacker could create a Fastly service claiming that origin hostname, causing all requests to `addons-preview-cdn.mozilla.net` to be routed to attacker-controlled Fastly infrastructure. Since the subdomain shares the `mozilla.net` domain, it could be leveraged to serve malicious CDN assets that appear to come from Mozilla's infrastructure, potentially bypassing CSP rules that allowlist `*.mozilla.net`.\n\n**Scenario C — Staging Subdomain Abandoned Post-Product Migration (Rails\u002FGitHub Pages)**\n`new.rubyonrails.org` was pointed at a GitHub Pages deployment for a website redesign project. After the new site launched and the old GitHub repo was deleted or made private, the DNS CNAME remained. An attacker could fork or create a matching GitHub Pages repository and claim the namespace, serving content under `new.rubyonrails.org`. Because this is the official Ruby on Rails domain, any content served there — including fake download links or malicious gems — carries the full trust of the Rails brand.\n\n---\n\n## Disclosed Report Citations (2022-2023)\n\nThe following coordinated-disclosure \u002F writeup cases extend this skill with **modern provider fingerprints** (Vercel\u002FAzure cloudapp\u002FZendesk era) and explicit ATO-chain examples. Citations #12 and #13 are external writeups (not disclosed HackerOne reports) — treat their payout figures as unverified; only #14 has a public H1 report ID.\n\n12. **Microsoft Azure DevOps — Two `cloudapp.azure.com` subdomains + wildcard `*.visualstudio.com` OAuth reply_to → 1-click ATO** ([Binary Security writeup](https:\u002F\u002Fwww.binarysecurity.no\u002Fposts\u002F2022\u002F11\u002Fazure-devops-takeover))\n    - Subclass: Azure `cloudapp.azure.com` regional-pool dangling CNAME — chained to ATO\n    - ATO chain: **YES** — `app.vssps.visualstudio.com\u002F_signin?reply_to=https:\u002F\u002Ffeedsprodwcus0dr.feeds.visualstudio.com\u002F` whitelisted any `*.visualstudio.com`. Attacker claimed the dangling Azure VM hostnames, then crafted sign-in URLs that returned JWT + FedAuth tokens to attacker-controlled endpoints\n    - Claim flow: identify dangling `cloudapp.azure.com` CNAME, deploy a free-tier VM in the same Azure region requesting the exact released hostname, Azure re-issues the name first-come-first-serve\n    - Year: reported Feb 2021, disclosed Nov 2022 — MSRC explicitly out-of-scope (relied on subdomain takeover), $0\n\n13. **Anonymous H1 — `admin-support.xyz.com` → unclaimed Zendesk → email interception → ATO** ([Writeup by 0xprial](https:\u002F\u002F0xprial.com\u002Fthe-art-of-zendesk-hijacking\u002F))\n    - Subclass: Zendesk help-desk takeover via `xyzdocs.zendesk.com` host-mapping\n    - ATO chain: **YES** — researcher configured email forwarding on the hijacked Zendesk instance, intercepted `support@xyz.com` tickets containing payment info + password-reset emails, then triggered password resets on customer accounts that delivered reset links into the attacker's Zendesk inbox\n    - Claim flow: `dig CNAME` returns `xyzdocs.zendesk.com` (unregistered) → register free Zendesk trial → add `xyzdocs` as subdomain → enable host-mapping for `admin-support.xyz.com`\n    - Year: 2023 — payout per the 0xprial writeup (blog source; no public HackerOne report ID, treat as unverified)\n\n14. **Vercel deleted-project takeover** — a dangling `cname.vercel-dns.com` CNAME pointing to a removed Vercel project can be re-claimed by deploying a new project under that name.\n    - Subclass: Vercel dangling CNAME (`cname.vercel-dns.com`) after project deletion\n    - Impact: crypto-DEX phishing — `proxies.` subdomain trusted for RPC proxy routing; attacker could serve malicious wallet-drain JS under a \"trusted\" subdomain\n    - Claim flow: subdomain returns Vercel 404 `DEPLOYMENT_NOT_FOUND` → create free Vercel project → Settings → Domains → add `proxies.sifchain.finance` — Vercel verifies the existing CNAME and auto-issues TLS without out-of-band ownership proof\n    - Year: 2022 — Sifchain treated as Critical (web3 phishing vector)\n\n**Fastly CDN dangling-service technique (general, not a single disclosed report):**\n- Fingerprint: subdomain returns `Fastly error: unknown domain. Please check that this domain has been added to a service`\n- Claim flow: sign up for Fastly free trial → create new CDN service → attach the dangling hostname as the service domain\n- Root cause: Fastly historically does not verify CNAME ownership on service-creation; any CNAME pointing into Fastly's anycast can be attached to a fresh service\n- Potential ATO chain: chains to CSP-bypass + JS-injection if the parent domain trusts the `assets.`\u002FCDN host for `script-src`\n\n---\n\n## Chains & Compositions (Senior Hunting)\n\nSubdomain takeover by itself is Low-Medium \u002F Informational on most mature programs — defacement of a non-business-critical subdomain is unsexy. The chain payout is 10-100x the standalone. **Every takeover should be evaluated against the five chains below before submission.** If none apply, you have a Low; if one applies, you have a High; if two compose, you have a Critical.\n\n### Chain 1 — Takeover + OAuth `redirect_uri` Whitelist → Auth-Code Theft → 1-Click ATO\n\n- **A.** Enumerate the OAuth `redirect_uri` allowlist via `\u002Foauth\u002Fauthorize` flow. Look for any wildcard `*.target.com` or any takeover-candidate hostname in the static list (e.g., `feedsprod.feeds.visualstudio.com`, `legacy.target.com`).\n- **B.** Find a takeover-able subdomain in that allowlist. Claim it via the provider's onboarding (Vercel project, Azure cloudapp regional pool, S3 bucket, Heroku app, Zendesk, Shopify storefront — see the Disclosed Report Citations above).\n- **C.** Host an OAuth callback receiver on the claimed subdomain. Send victim to `\u002Foauth\u002Fauthorize?redirect_uri=https:\u002F\u002Flegacy.target.com\u002Fcb&response_type=code&client_id=\u003Clegit>`. Victim's browser already has session → auth happens transparently → auth code lands on attacker host. Exchange via token endpoint → ATO.\n- **Impact:** Persistent 1-click ATO across every user of the target. OAuth flow is implicit-to-the-user (no consent screen if previously consented), so requires only a single click on attacker's link.\n- **Real shape:** Microsoft Azure DevOps `cloudapp.azure.com` + wildcard `*.visualstudio.com` reply_to chain (Binary Security, Nov 2022 — Disclosed Report Citation #12). Multiple H1 disclosures on SaaS programs with permissive OAuth allowlists.\n\n### Chain 2 — Takeover at Sibling Subdomain + Cookie-Domain Wildcard → Session Fixation on Parent App\n\n- **A.** Inspect cookies set by the main app (`app.target.com`). If `Set-Cookie` has `Domain=.target.com` (parent-scoped) instead of host-only, cookies bleed to every sibling subdomain — including taken-over ones.\n- **B.** Take over any sibling (`legacy.target.com`, `feedback.target.com`, `assets.target.com`). The taken-over host can now `Set-Cookie` for the parent domain.\n- **C.** Plant `Set-Cookie: SESSIONID=\u003Cattacker_session>; Domain=.target.com` via a script on the taken-over host. Victim visits `app.target.com` with attacker's session cookie attached. Server treats them as the attacker's account → session-fixation ATO.\n- **Impact:** ATO without OAuth or password reset — pure cookie-domain bleed. Especially effective when the parent app uses a non-`__Host-` prefixed session cookie.\n- **Real shape:** Discussed extensively in `hunt-auth-bypass` Duende BFF Attack Class 2 (cookie-domain wildcarding turns subdomain takeover into session fixation). Pattern class: S3-bucket-takeover combined with parent-scoped (`Domain=.target.com`) cookies.\n\n### Chain 3 — Takeover + CSP `script-src` Includes the Taken-Over Host → Persistent Stored XSS on Main App\n\n- **A.** Inspect CSP header on the main app's HTML response. Look for `script-src 'self' assets.target.com cdn.target.com legacy.target.com ...`.\n- **B.** Take over one of the CSP-allowlisted subdomains (especially common: stale CNAMEs to deleted CDNs, deleted Vercel\u002FNetlify projects, archived analytics services).\n- **C.** Host attacker-controlled JavaScript at the takeover host. Every page load on the main app fetches `\u003Cscript src=\"\u002F\u002Ftaken-over-host\u002Fx.js\">` because the host is on the CSP allowlist. JS executes with main-app origin — full session access, can call any same-origin API.\n- **Impact:** Stored XSS-equivalent on every page of the main app, persistent until the CSP is updated. Bypasses every input sanitiser because the JS source is \"trusted\" per CSP.\n- **Real shape:** Sifchain `proxies.sifchain.finance` Vercel takeover — Disclosed Report Citation #14 (web3 phishing); pattern documented in multiple H1 disclosures 2020-2024.\n\n### Chain 4 — Takeover + CORS `Access-Control-Allow-Origin` Regex Match → Credentialed Cross-Origin API Read\n\n- **A.** Inspect the API's CORS configuration. Look for any regex \u002F wildcard \u002F suffix-match in `Access-Control-Allow-Origin` that includes `*.target.com` or `target.com.*` (the second is a common bug).\n- **B.** Take over any subdomain that the CORS regex would accept (or register a new `target.com.attacker.com` host if suffix-match is broken).\n- **C.** Attacker page hosted on the taken-over subdomain issues `fetch('https:\u002F\u002Fapi.target.com\u002Faccount', {credentials:'include'})`. CORS preflight passes. Server returns credentialed response. Attacker's JS reads it.\n- **Impact:** Mass cross-tenant API read with credentials — sessions, PATs, account data, billing records — all reachable from a single attacker page.\n- **Real shape:** Multiple disclosed cases; cross-refs `hunt-api-misconfig` CORS subsection. Pairs with `hunt-misc` step 1 (CORS regex enumeration).\n\n### Chain 5 — Takeover at Email DNS (DKIM \u002F SPF \u002F MX) → Email Spoofing → Phishing Trusted by Parent Brand\n\n- **A.** Enumerate the target's email DNS — DKIM selectors (`selector1._domainkey.target.com`), SPF includes (`include:_spf.takeover-candidate.com`), MX records (`mx.target.com → defunct-provider.example`).\n- **B.** Take over any DKIM-selector or SPF-include host. Now the attacker can publish DKIM\u002FSPF records that authorise their own server to send mail \"from\" `@target.com`.\n- **C.** Send phishing email `From: support@target.com` to victim. Recipient mail server passes SPF + DKIM checks (because the takeover server is now authorised). Email lands in inbox with `target.com` brand, no security warning.\n- **Impact:** Highly-effective phishing campaign exploiting the parent brand. Victims trust the email because every authentication check passes. Credential harvesting, BEC fraud, supply-chain access.\n- **Real shape:** Multiple historical disclosures on DKIM selector takeover \u002F SPF include chain hijacking. Cross-refs DMARC \u002F SPF \u002F DKIM section in `offensive-osint`.\n\n### Operator-level pattern\n\nThe five chains above are exhaustive in practice — virtually every senior-tier subdomain-takeover payout maps to one of them. Before reporting any takeover, run through the checklist:\n\n1. **OAuth `redirect_uri` allowlist** — does the taken-over host appear? → Chain 1, Critical.\n2. **Parent-domain cookies** — does the main app set `Domain=.target.com`? → Chain 2, High.\n3. **CSP `script-src`** — does the taken-over host appear in the allowlist? → Chain 3, Critical.\n4. **CORS allowlist** — does any regex match the taken-over host? → Chain 4, High.\n5. **Email DNS (DKIM selector \u002F SPF include)** — does the taken-over host appear? → Chain 5, High.\n\nIf none apply, file at Low\u002FInformational. **Do not file at Critical without demonstrating one of these chains** — triagers downgrade fast otherwise.\n\nCross-references:\n- `hunt-oauth` — Chain 1 (`redirect_uri` bypass class)\n- `hunt-auth-bypass` Duende BFF Attack Class 2 — Chain 2 (cookie scoping)\n- `hunt-xss` Chain 4 — Chain 3 (CSP bypass via trusted-origin JS)\n- `hunt-api-misconfig` CORS section — Chain 4\n- `offensive-osint` email-security section — Chain 5\n\n---\n\n## Related Skills & Chains\n\n- **`hunt-cloud-misconfig`** — Most stale CNAMEs point at deleted cloud assets (S3, CloudFront, Heroku). Chain primitive: Cloud misconfig (S3 deleted) + `hunt-subdomain` → unclaimed CNAME points to bucket → claim bucket name → full subdomain control.\n- **`hunt-oauth`** — A takeover on an OAuth `redirect_uri` host = persistent ATO across the entire SSO surface. Chain primitive: Subdomain takeover at `auth.target.com` + OAuth redirect_uri allowlist → auth code theft → ATO every user that re-authenticates.\n- **`hunt-api-misconfig`** — CORS regexes routinely allowlist a takeoverable subdomain. Chain primitive: Subdomain takeover + CORS `*.target.com` with credentials → credentialed cross-origin API read → mass IDOR.\n- **`hunt-xss`** — A claimed subdomain is same-origin to session-cookie-domain siblings. Chain primitive: Subdomain takeover at `feedback.target.com` + cookie scope `.target.com` → JS hosted on takeover host reads main-app cookies → session hijack.\n- **`security-arsenal`** — Load the 27+ Subdomain Takeover Fingerprint Table (NoSuchBucket, \"no such app\", GitHub Pages 404 strings, Heroku, Shopify, Fastly) and the `subzy`\u002F`subjack` automation patterns.\n- **`triage-validation`** — Apply the Unique-Marker gate: takeover claim is informational on its own; submit only after publishing a unique HTML marker on the claimed host AND demonstrating a downstream impact (cookie read, OAuth chain, CSP bypass).\n\n## When to Use\n\n- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.\n- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.\n\n## Limitations\n\n- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.\n- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.\n- Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab.\n\n### Example\n\n```bash\n# Read-only first step; confirm scope before anything active.\ncat scope.txt  # target list from the authorized engagement brief\n```\n\n> Adapted from [elementalsouls\u002FClaude-BugHunter](https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.\n",{"name":5,"risk":26,"source":43,"license":14,"sources":44,"category":37,"date_added":45,"description":7,"source_repo":46,"source_type":31,"report_count":47,"compatibility":48,"license_source":49},"https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter","github, hackerone_public, binarysecurity_research, can-i-take-over-xyz_research","2026-09-20","elementalsouls\u002FClaude-BugHunter",3,"Requires explicit written authorization for a target scope plus the relevant testing tools for this technique. Docs-only; helper scripts and commands not bundled.","https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fhunt-subdomain","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill hunt-subdomain",{"tool":61,"command":62},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill hunt-subdomain",{"tool":64,"command":65},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill hunt-subdomain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fhunt-subdomain\u002FSKILL.md",true,[],[70,95,119,143,171,195],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":81,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[76],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[82,83,84,85,86,87,72,88,89,90,91,33,31,21,92,93,28,27,24,94],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","devops-security","access","configure","active","critical","implementing",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[102,103,104,105,106,107,108,109,110,111,112,113,114,33,115,31,116,117,93,118],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[126,127,128,129,130,131,132,36,133,134,135,136,137,31,21,138,139,140,141,142],"transcript","youtube transcript","youtube","safe","github","codex","research","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":160,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[149,152,155],{"categoryNo":150,"categoryName":151,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":153,"categoryName":154,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":156,"categoryName":157,"taxonomyType":158,"taxonomyTypeDesc":159},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[126,127,128,161,129,162,130,131,36,163,164,165,166,135,167,31,21,168,169,170],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":181,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[177,180],{"categoryNo":178,"categoryName":179,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":153,"categoryName":154,"taxonomyType":79,"taxonomyTypeDesc":80},[128,182,183,106,129,184,185,186,187,36,165,188,189,190,191,21,192,138,193,194],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":202,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[201],{"categoryNo":150,"categoryName":151,"taxonomyType":79,"taxonomyTypeDesc":80},[203,128,204,205,129,162,163,206,207,164,165,166,135,208,167,31,21,168,209,141],"youtube full","full","google","server","dlp","credits","automatic"]