Takeover logo

Takeover

CommunityPopular
PentesterFlow
takeover

Subdomain takeover playbook — sweep subdomains for dangling CNAMEs / NS records pointing at unclaimed third-party resources (GitHub Pages, S3, Heroku, Azure, Netlify, Shopify, ...), confirm with the engine's HTTP fingerprint, then prove impact by claiming the resource in scope. Use when enumerating subdomains for dangling CNAME/NS records pointing at unclaimed third-party services.

Overview

PublisherPentesterFlow
Repositoryagent
Skill nametakeover
Stars
1.4K
Forks
248
Bundled files
1
LicenseApache-2.0
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Takeover 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/PentesterFlow/agent.git /tmp/agent
mkdir -p .claude/skills
cp -r /tmp/agent/skills/takeover .claude/skills/takeover
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Takeover 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 Takeover 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 Takeover 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 playbook

A subdomain points (via CNAME, NS, or an A record on a shared host) at a third-party service. The resource on that service was deleted, expired, or never claimed — but the DNS record still exists. An attacker registers the same resource on the provider and serves arbitrary content on the victim's hostname. Severity is usually high to critical because the takeover puts the attacker inside the victim's origin (cookie scope, CSP allowlists, OAuth redirect_uri allowlists, SAML SP entity IDs, email DKIM/SPF includes, ...).

Stay in scope. Only test takeovers against domains the program explicitly authorizes. A successful takeover is serving content on someone else's host — drop a benign HTML file (takeover proof for <handle>, contact <email>) and stop.

Execution rule: operate on real subdomains and provider fingerprints from the scoped program. Never write literal placeholders such as <provider>, <handle>, or <email> to files; ask once for proof text if a provider requires a claim page.

1. Enumerate every subdomain

Use whatever recon you have. Curl-first sources you can hit without extra tooling:

sh
# CT logs via crt.sh
curl -s 'https://crt.sh/?q=%25.target.example.com&output=json' \
  | jq -r '.[].name_value' | sed 's/^\*\.//' | sort -u > subs.txt

# Anubis-DB
curl -s 'https://jldc.me/anubis/subdomains/target.example.com' \
  | jq -r '.[]' >> subs.txt

# Hackertarget (rate-limited)
curl -s 'https://api.hackertarget.com/hostsearch/?q=target.example.com' \
  | cut -d, -f1 >> subs.txt

sort -u subs.txt -o subs.txt

If [[recon]] is loaded, prefer those flows for the enumeration step.

2. Resolve each name — CNAME first, then A/AAAA

sh
# Pull CNAMEs in one batch (works on macOS/Linux with dig)
while read -r sub; do
  cname=$(dig +short CNAME "$sub" | head -n1)
  if [ -n "$cname" ]; then printf '%s\tCNAME\t%s\n' "$sub" "$cname"; fi
done < subs.txt > resolved.tsv

# NS delegation (rare but high-severity)
while read -r sub; do
  ns=$(dig +short NS "$sub")
  if [ -n "$ns" ]; then printf '%s\tNS\t%s\n' "$sub" "$(echo "$ns" | tr '\n' ',')"; fi
done < subs.txt >> resolved.tsv

You're looking for:

  • CNAME → third-party provider (e.g. app.target.com → app.elasticbeanstalk.com) where the resource at that provider is unclaimed.
  • NS → vanished zone (zone.target.com NS ns1.dnsmadeeasy.com where the zone no longer exists on dnsmadeeasy).
  • CNAME → NXDOMAIN — the cleanest signal: the CNAME target itself doesn't resolve. Always investigate.
sh
# Find CNAMEs whose target doesn't resolve at all
awk -F'\t' '$2=="CNAME" {print $3}' resolved.tsv | while read -r t; do
  dig +short "$t" >/dev/null 2>&1 || echo "$t (NXDOMAIN target)"
done

3. Match HTTP fingerprints

Pull the full fingerprint database:

read_payloads(skill="takeover", file="fingerprints.json")

The JSON Lines file lists, for each provider:

  • service — human label.
  • cname — regex of the target hostname.
  • statusvulnerable / edge-case / not-vulnerable.
  • fingerprint — string to grep for in the HTTPS response body.
  • http_status — typical status code (404, 200, etc.).
  • notes — claim-flow gotchas.

For each CNAME match, fetch the response and grep:

sh
# Example: subdomain points at GitHub Pages
curl -sk -H "Host: lost.target.com" https://lost.target.com/ \
  | grep -F "There isn't a GitHub Pages site here."

A hit on status: vulnerable plus the fingerprint in the response body is the takeover signal. Don't trust the fingerprint alone — many providers serve the same string on a legitimately-not-yet-deployed site that's still claimed by the owner. Confirm-step (4) is mandatory.

4. Confirm before reporting

The trap: the resource may be unclaimed by anyone visible to you, but the legitimate owner may still hold it via an account you can't see (e.g. the Heroku app exists in their account but is paused). False-positive report rates on subdomain takeover are notorious.

Confirmation paths, in order of preference:

  1. Out-of-band canary. Attempt to register the resource (e.g. create a Heroku app named lost-target). If the provider says "name taken" without serving you the fingerprint, it's a false positive — someone has it.

  2. Successful claim + benign content. When the registration succeeds, serve a static HTML file proving ownership:

    html
    <!doctype html>
    <title>Subdomain Takeover PoC</title>
    <h1>Subdomain Takeover</h1>
    <p>This subdomain (<code>lost.target.com</code>) was claimable on
       <em>&lt;provider&gt;</em> by anyone. Reported by &lt;handle&gt;
       to &lt;program&gt;. Contact: &lt;email&gt;.</p>

    Fetch the subdomain again over HTTPS — your content must come back.

  3. Screenshot + curl response in the report.

Do NOT:

  • Serve real-looking content (login forms, fake updates).
  • Run any script in the page.
  • Hold the resource beyond what's needed for the PoC; release it after the report is triaged.
  • Use takeovers to phish, even for "research."

5. NS takeover (variant)

If a subdomain delegates DNS to a third-party provider via NS records and the zone is unclaimed on that provider, you control all records under the subdomain — far more dangerous than a single CNAME takeover. Common providers seen here: DNSMadeEasy, Bizland, EasyDNS, Yahoo Small Business, NS1, Hurricane Electric, MyDomain, Domain.com.

Detection: dig NS sub.target.com returns a provider's nameservers, but querying those nameservers for the zone returns REFUSED or SERVFAIL.

sh
for ns in $(dig +short NS sub.target.com); do
  echo "=== $ns ==="
  dig @"$ns" sub.target.com SOA
done

A REFUSED/SERVFAIL from all of the listed nameservers, combined with the provider being one that lets you create zones with arbitrary names, is the takeover primitive.

6. Key engines (quick reference — full DB in payloads)

ServiceCNAME patternFingerprint substringStatus
GitHub Pages*.github.ioThere isn't a GitHub Pages site here.vulnerable
Heroku*.herokuapp.com, *.herokudns.comNo such app / There's nothing here, yet.vulnerable
AWS S3 (website)*.s3-website-*.amazonaws.com, *.s3.amazonaws.comNoSuchBucketvulnerable
Azure App Service*.azurewebsites.net404 Web Site not found.vulnerable
Azure Cloud Service*.cloudapp.net, *.cloudapp.azure.com404 Web Site not found.vulnerable
Azure Traffic Manager*.trafficmanager.netNXDOMAIN on profilevulnerable
Azure Storage*.blob.core.windows.netNXDOMAINvulnerable
Azure CDN*.azureedge.netNXDOMAIN / Bad Requestedge-case
Netlify*.netlify.app, *.netlify.comNot Found - Request IDvulnerable
Heroku SSL endpoint*.herokussl.comvariesedge-case
Vercel / Now*.vercel.app, cname.vercel-dns.com404: NOT_FOUND / The deployment could not be foundedge-case
Shopify*.myshopify.comSorry, this shop is currently unavailable.vulnerable
Tumblr*.tumblr.com (custom domain)Whatever you were looking for doesn't currently exist at this address.vulnerable
Surge.sh*.surge.shproject not foundvulnerable
Ghost*.ghost.ioThe thing you were looking for is no longer here, or never wasvulnerable
Pantheon*.pantheonsite.ioThe gods are wise, but do not know of the site which you seek.vulnerable
SquarespacevariousNo Such Account / Squarespace - No Such Accountedge-case
Tilda*.tilda.wsPlease renew your subscriptionvulnerable
Unbounce*.unbouncepages.comThe requested URL was not found on this server.vulnerable
UserVoice*.uservoice.comThis UserVoice subdomain is currently available!vulnerable
Strikingly*.s.strikinglydns.comPAGE NOT FOUND.vulnerable
Helpjuice*.helpjuice.comWe could not find what you're looking for.vulnerable
HelpScout*.helpscoutdocs.comNo settings were found for this company:vulnerable
Bitbucket*.bitbucket.ioRepository not foundvulnerable
Cargo Collective*.cargocollective.comIf you're moving your domain away from Cargovulnerable
Statuspage*.statuspage.ioYou are being redirected. (302 to statuspage 404)edge-case
Acquia*.acquia-sites.comThe site you are looking for could not be found.vulnerable
Aha*.aha.ioThere is no portal here ... sending you back to Aha!vulnerable
Anima*.animaapp.ioIf this is your website and you've just created itvulnerable
Brightcovevarious<p class="bc-gallery-error-code">Error Code: 404</p>vulnerable
Campaign Monitorcreatesend.comTrying to access your account?vulnerable
Canny*.canny.ioCompany Not Foundvulnerable
Fastly*.fastly.netFastly error: unknown domainedge-case
Frontify*.frontify.comBrand not foundvulnerable
Gemfury*.fury.site404: This page could not be found.vulnerable
GetResponsevariesWith GetResponse Landing Pages, lead generation has never been easiervulnerable
Hatena Bloghatenablog.comJapanese error stringvulnerable
HelpRescue*.helprace.comHelp Center Closededge-case
JetBrains*.youtrack.cloudis not a registered InCloud YouTrackvulnerable
Kinsta*.kinsta.cloudNo Site For Domainedge-case
LaunchRock*.launchrock.comIt looks like you may have taken a wrong turn somewhere.vulnerable
Mashery*.mashery.comUnrecognized domainedge-case
Pingdom*.stats.pingdom.compingdom pageedge-case
Proposify*.proposify.comIf you need immediate assistancevulnerable
Readme*.readme.ioProject doesnt exist... yet!vulnerable
SendGridvariesparked landingedge-case
ShortIO*.shortio.app404, please check the URL.vulnerable
Smartling*.smartling.comDomain is not configuredvulnerable
Thinkific*.thinkific.comYou may have mistyped the address or the page may have moved.vulnerable
Uberflip*.uberflip.comThe page you are looking for is not foundvulnerable
Vend*.vendecommerce.comLooks like you've traveled too far into cyberspace.vulnerable
Webflowproxy-ssl.webflow.comThe page you are looking for doesn't exist or has been moved.vulnerable
Wishpondvarieshttps://www.wishpond.com/404?campaign=vulnerable
Wordpress*.wordpress.comDo you want to registeredge-case
WP Engine*.wpengine.comThe site you were looking for couldn't be found.edge-case
WorksitesvariesHello! Sorry, but the website you’re looking for doesn’t exist.vulnerable
Cloudfront*.cloudfront.netThe request could not be satisfiededge-case
Google Cloud Storage*.storage.googleapis.comNoSuchBucketvulnerable

The full database — including HTTP status codes, claim notes, and edge-case explanations for every entry — is in payloads/fingerprints.json (see the read_payloads invocation in section 3).

7. Tooling shortcuts (when available)

If you have these installed, they automate sections 1–3:

  • subjack — Go scanner with built-in fingerprints. subjack -w subs.txt -t 100 -timeout 30 -ssl -c fingerprints.json -v
  • subzy — newer alternative.
  • nucleinuclei -l subs.txt -tags takeover runs the community templates.
  • tko-subs — also script-based.
  • aquatone — screenshots + detection in one pass.

You do not need any of these to do the work; sections 2–4 are do-able with dig + curl + the JSON fingerprint file.

8. Reporting

For each confirmed takeover:

  • Vulnerable subdomain (lost.target.com).
  • DNS resolution path (lost.target.com CNAME bucket.s3.amazonaws.com → unclaimed).
  • The exact provider + service.
  • HTTP response showing the fingerprint (curl one-liner + body excerpt).
  • PoC: your claimed resource serving a benign proof file.
  • Impact paragraph specific to the engagement: which cookies, CSP rules, OAuth redirect_uri lists, SAML entity IDs, mail SPF/DKIM, or session domains include the parent — that's where the severity comes from.
  • Remediation: remove the dangling DNS record OR re-claim the resource.
  • Suggested severity: critical when the parent's auth cookies / SSO / payment flows reach the subdomain; high otherwise.

Release the claimed resource after the program triages.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Takeover AI skill do?

Subdomain takeover playbook — sweep subdomains for dangling CNAMEs / NS records pointing at unclaimed third-party resources (GitHub Pages, S3, Heroku, Azure, Netlify, Shopify, ...), confirm with the engine's HTTP fingerprint, then prove impact by claiming the resource in scope. Use when enumerating subdomains for dangling CNAME/NS records pointing at unclaimed third-party services.

Why use Takeover on TypingMind?

Because you install it once and use it with any model. Takeover 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 Takeover in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/PentesterFlow/agent/tree/main/skills/takeover. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Takeover?

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 Takeover?

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

Is the Takeover AI skill free?

Yes. It is published on GitHub by PentesterFlow under the Apache-2.0 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 👇