Subdomain Takeover Hunt logo

Subdomain Takeover Hunt

CommunityPopular
uphiago
subdomain-takeover-hunt

Detect and verify subdomain takeover via dangling CNAME to unclaimed services.

Overview

Publisheruphiago
Repositoryrecon-skills
Skill namesubdomain-takeover-hunt
Stars
1.3K
Forks
213
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by uphiago on GitHub. Read the source before you install it.

Installation

Install the Subdomain Takeover Hunt AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/uphiago/recon-skills.git /tmp/recon-skills
mkdir -p .claude/skills
cp -r /tmp/recon-skills/recon/subdomain-takeover-hunt .claude/skills/subdomain-takeover-hunt
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Subdomain Takeover Hunt in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Subdomain Takeover Hunt on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Subdomain Takeover Hunt is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

bash
# DNS resolution with CNAME extraction
dnsx -retry 3 -a -cname -resp -silent -l alive_subs.txt | tee dns_records.txt

# Automated takeover scan
subzy run --targets alive_subs.txt --hide_fails --vuln

Procedure

Phase 1 — Extract CNAME Records

bash
# Get all CNAME records
cat alive_subs.txt | dnsx -silent -cname -resp-only > cname_targets.txt

# Filter to suspicious services
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

bash
# subzy — fast, shows vulnerable + fingerprint
subzy run --targets alive_subs.txt --hide_fails --vuln

# subjack — with custom fingerprints
subjack -w alive_subs.txt -t 100 -timeout 30 -o takeover_results.txt \
  -ssl -c ~/subjack/fingerprints.json -v

# nuclei — takeover templates
nuclei -l alive_subs.txt \
  -t nuclei-templates/takeovers/ \
  -o nuclei_takeover_results.txt

Phase 3 — Manual Verification

bash
# For each candidate, verify the service is claimable
CANDIDATE="api.target.com"

# Check what the CNAME points to
dig $CANDIDATE CNAME +short

# Check HTTP response
curl --max-time 30 --connect-timeout 10 -skI "https://$CANDIDATE" | head -10

# Key service-specific verification:

# Heroku: visit https://CANDIDATE — "no such app" = claimable
# S3: curl -s https://BUCKET_NAME.s3.amazonaws.com — 404 NoSuchBucket = claimable
# Zendesk: visit https://CANDIDATE — "account not found" = claimable
# GitHub Pages: dig CNAME returns user.github.io — 404 = claimable
# Azure: visit https://CANDIDATE — "tenant not found" = claimable
# Shopify: visit https://CANDIDATE — "Sorry, this shop is currently unavailable"

Phase 4 — S3 Takeover Pipeline

bash
subfinder -d target.com -silent \
  | dnsx -silent -cname \
  | grep "s3.amazonaws" \
  | while read line; do
      sub=$(echo "$line" | awk '{print $1}' | sed 's/\.$//')
      curl --max-time 30 --connect-timeout 10 -sk "https://$sub" | grep -q "NoSuchBucket" && echo "CLAIMABLE: $sub"
    done

Phase 5 — Service Fingerprint Reference

ServiceError message or indicatorClaimable signal
Heroku"No such app" / "There's nothing here"Yes
S3"NoSuchBucket" / "The specified bucket does not exist"Yes
Azure"tenant not found" / "This tenant is not found"Yes
Zendesk"account not found" / "Help Center Closed"Yes
GitHub Pages404 "There isn't a GitHub Pages site here"Yes
Shopify"Sorry, this shop is currently unavailable"Yes
Netlify"Not Found" / "Site not found"Yes
Vercel404 — "DEPLOYMENT_NOT_FOUND"Yes
Bitbucket"Repository not found"Yes
Surge.sh"project not found"Yes
Readme.io"Project not found"Yes
Statuspage404 — status page not foundYes
Desk.com"This site is currently not available"Yes
Campaign Monitor"Trying to get your email from"Yes
Intercom"This page is reserved for Intercom customers"Yes
Unbounce"The requested URL was not found"Yes
WordPress.com"Do you want to register domain.wordpress.com?"Yes

Pitfalls

  • Resolving CNAME to a CDN service is not a finding. Cloudflare/CloudFront/Akamai subdomains are not claimable.
  • The CNAME may point to a valid, in-use service. Always verify the error page before claiming a finding.
  • Some services block automated scanners. Visit the URL in a browser to confirm.
  • Subdomain takeover requires registration of the target resource. Never register resources without explicit authorization.
  • Wildcard DNS (*.target.com → IP) produces false positives. Filter out wildcard responses before scanning for takeover.

Verification

  1. dig SUBDOMAIN CNAME +short returns a service with user-registrable namespace.
  2. curl --max-time 30 --connect-timeout 10 -sk https://SUBDOMAIN returns the service-specific error page indicating the resource is available.
  3. The CNAME target is NOT resolving to a CDN or load balancer.
  4. Document the exact error message and service type before reporting.

Related Skills

  • subdomain-enumeration — Generate the subdomain list for takeover scanning.
  • origin-ip-discovery — If takeover is found, check if the same IP hosts other services.
  • port-service-discovery — Scan the CNAME-resolved IP for additional exposed services.

Frequently asked questions

What does the Subdomain Takeover Hunt AI skill do?

Detect and verify subdomain takeover via dangling CNAME to unclaimed services.

Why use Subdomain Takeover Hunt on TypingMind?

Because you install it once and use it with any model. Subdomain Takeover Hunt is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Subdomain Takeover Hunt in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/uphiago/recon-skills/tree/main/recon/subdomain-takeover-hunt. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Subdomain Takeover Hunt?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Subdomain Takeover Hunt?

As many as you like. As long as a model supports skills, you can use Subdomain Takeover Hunt with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Subdomain Takeover Hunt AI skill free?

Yes. It is published on GitHub by uphiago under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇