Home / Market / hunt subdomain

hunt subdomain

Hunting skill for subdomain takeover vulnerabilities.

skill★ 508430 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: hunt-subdomain description: Hunting skill for subdomain takeover vulnerabilities. category: security risk: offensive source: https://github.com/elementalsouls/Claude-BugHunter source_repo: elementalsouls/Claude-BugHunter source_type: community date_added: '2026-09-20' license: MIT license_source: https://github.com/elementalsouls/Claude-BugHunter/blob/main/LICENSE compatibility: Requires explicit written authorization for a target scope plus the relevant testing tools for this technique. Docs-only; helper scripts and commands not bundled. sources: github, hackerone_public, binarysecurity_research, can-i-take-over-xyz_research report_count: 3

--- > ⚠️ AUTHORIZED USE ONLY > This skill is for educational purposes or authorized security assessments only. > You must have explicit, written permission from the system owner before using this tool. > Misuse of this tool is illegal and strictly prohibited.

> Mandatory confirmation gate > Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target: > 1. Ask the user to state the exact target URL, IP, account, or resource. > 2. Ask the user to confirm written authorization and the permitted scope. > 3. Show the exact command(s) and explain their expected effect. > 4. Wait for explicit confirmation in the current conversation. > > Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

Verification boundaries

Provider fingerprints, historical cases and payout claims below are hypotheses unless supported by current primary documentation and engagement evidence. DNS errors or 404s do not prove claimability; ownership verification may prevent claims. A subdomain is a different origin from siblings even with parent-Domain cookies. HttpOnly cookies are not JavaScript-readable. A CSP allowlist alone does not cause script loading; OAuth codes may remain protected by PKCE, client authentication and redirect binding. Assess prerequisites rather than promising ATO. Use designated test identities and harmless markers, never real users’ sessions, emails or credentials. Resource registration, spend and persistence need explicit authorization and agreed cleanup; do not claim resources merely to check availability.

Subdomain takeover is high-value because it allows an attacker to serve content from a trusted, company-owned domain — creating a trusted-host content risk whose impact depends on application and browser boundaries.

Highest payout contexts:

Asset types that matter most:

---

Attack Surface Signals

DNS signals:

HTTP response signals:

Tech stack signals:

---

Step-by-Step Hunting Methodology

  1. Enumerate all subdomains for the target using passive + active sources:
  1. Resolve all subdomains and flag those with:
   cat subdomains.txt | dnsx -a -cname -o resolved.txt
  1. Cross-reference CNAMEs against known vulnerable provider fingerprints using nuclei or subjack:
   subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c fingerprints.json
   nuclei -l subdomains.txt -t takeovers/
  1. Manual verification for each flagged subdomain:
  1. Confirm claimability — attempt to register the resource:
  1. Claim the resource (only enough to prove control — do NOT serve malicious content):
  1. Document the chain: CNAME record → provider target → unclaimed resource → your content
  1. Assess impact escalation:
  1. Write report before releasing the claim (some programs want to verify first)

---

Payload & Detection Patterns

Bulk CNAME extraction and NXDOMAIN detection:

# Extract CNAMEs and check if target resolves
while read sub; do
  cname=$(dig +short CNAME "$sub" | head -1)
  if [ -n "$cname" ]; then
    result=$(dig +short A "$cname")
    if [ -z "$result" ]; then
      echo "[POTENTIAL] $sub -> $cname (NXDOMAIN)"
    fi
  fi
done < subdomains.txt

Nuclei takeover scan:

nuclei -l subdomains.txt -t ~/nuclei-templates/http/takeovers/ -severity medium,high,critical

subjack with SSL:

subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c $GOPATH/src/github.com/haccer/subjack/fingerprints.json -v

Provider fingerprint grep patterns:

curl -sk "https://$subdomain" | grep -iE \
  "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"

Check if subdomain is in scope for cookies (shared parent domain):

curl -Isk "https://target.com" | grep -i "set-cookie" | grep "domain=.target.com"

Fastly-specific detection:

curl -sI "https://subdomain.target.com" -H "Host: subdomain.target.com" | grep -i "fastly\|x-served-by\|x-cache"
curl -sk "https://subdomain.target.com" | grep -i "fastly error"

S3 unclaimed bucket check:

aws s3api head-bucket --bucket <extracted-bucket-name> 2>&1 | grep -i "NoSuchBucket\|403\|404"

GitLab Pages specific:

dig CNAME sub.target.com
# If pointing to *.gitlab.io — visit the gitlab.io URL directly
# 404 is only a candidate signal; verify provider ownership controls.

---

Common Root Causes

  1. 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.
  1. Staging/preview 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.
  1. 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.
  1. 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.
  1. GitHub/GitLab Pages namespace not reserved — Organization renames, user accounts deleted, or repos made private/deleted while the Pages CNAME still points to the old namespace.
  1. Wildcard DNS entries — *.target.com pointing to a cloud provider means *any* unclaimed subdomain potentially resolves to claimable infrastructure.
  1. Acquired/divested company DNS not cleaned — Post-acquisition, former brand subdomains (like oberlo.com under Shopify) retain CNAMEs to services that are no longer paid for.

---

Bypass Techniques

Defense: Manual fingerprint review before publishing

Scope restrictions: A discovered sibling/provider account is not implicitly authorized. Obtain scope expansion before testing it.

Defense: "Can't reproduce" responses due to timing

Defense: HTTPS certificate mismatch blocking proof

Defense: Provider-side validation (Fastly verifying domain ownership)

Defense: Rate limiting on subdomain enumeration

Defense: Program claims "low severity / no impact"

---

Gate 0 Validation

  1. What can the attacker DO right now?

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?

  1. What does the victim LOSE?

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/SSO flows hijacked. Depending on CSP configuration, XSS against the main application may be possible.

  1. Can it be reproduced in 10 minutes from scratch?