Takeover 标志

Takeover

社区热门
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.

Add to TypingMind

概览

发布者PentesterFlow
代码仓库agent
技能名称takeover
星标数
1.4K
复刻数
248
附带文件
1
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 PentesterFlow 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Takeover AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/PentesterFlow/agent/tree/main/skills/takeover
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

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
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Takeover,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Takeover。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Takeover 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

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.
  • status — vulnerable / 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.
  • nuclei — nuclei -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.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Takeover AI 技能有什么作用?

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.

为什么在 TypingMind 中使用 Takeover?

因为您只需安装一次,就能搭配任何模型使用。Takeover 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Takeover?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/PentesterFlow/agent/tree/main/skills/takeover。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Takeover?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Takeover 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Takeover 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Takeover AI 技能免费吗?

是的。PentesterFlow 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇