跳到正文
Skillpedia
安全6.5k · #14156

web-subdomain-takeover

它能做什么

它介绍如何找出 DNS 指向已删除或无人认领的云服务的子域名。适用于希望清理自己名下被遗忘记录的安全团队。

适用场景

  • ✓当一家公司想检查旧的子域名是否仍指向它已不再拥有的服务时。
  • ✓当 IT 团队更换托管服务商后需要清理 DNS 记录时。
  • ✓当安全审查人员需要将悬空的 DNS 条目标记为风险时。

技能链接

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/recon/web-recon/subdomain-takeover/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/recon/web-recon/subdomain-takeover/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查我们的旧子域名中是否有指向我们已不再使用的服务的。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能告诉 AI 收集子域名,查询每个子域名的指向目标,并将这些目标与已知允许被认领的服务进行比对。匹配的条目会被标记以供审查。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Subdomain Takeover (Dangling DNS / CNAME)

A subdomain CNAMEs to a SaaS provider (GitHub Pages, Heroku, S3, etc.) but the underlying tenant has been deleted, expired, or never claimed. Whoever registers the orphaned tenant name controls a trusted *.<TARGET> origin. Severity is almost always High → Critical because the attacker inherits the parent domain's cookie scope, CORS allowlist, OAuth redirect_uri whitelist, CSP *.<TARGET> allowance, and reputation.

1. Asset surface — enumerate every subdomain

# Passive (no traffic to target)
subfinder -d <TARGET> -all -silent -o subs.txt
amass enum -passive -d <TARGET> -o subs.amass.txt
assetfinder --subs-only <TARGET> >> subs.txt
findomain -t <TARGET> -q >> subs.txt
curl -s "https://crt.sh/?q=%25.<TARGET>&output=json" | jq -r '.[].name_value' | tr '\n' '\n' | sort -u >> subs.txt
sort -u subs.txt -o subs.txt

# Active resolution + CNAME extraction
dnsx -l subs.txt -cname -resp -silent -o subs.cname.txt
# subs.cname.txt format:  app.<TARGET>  [cname.provider.net]

2. CNAME → provider fingerprints

Resolve each subdomain, capture the CNAME, and match against the dangling-provider table below.

while read sub; do
  cname=$(dig +short CNAME "$sub" | head -n1)
  [ -z "$cname" ] && continue
  echo "$sub -> $cname"
done < subs.txt | tee cname.map
Provider CNAME pattern Vulnerable fingerprint in HTTP body
GitHub Pages *.github.io There isn't a GitHub Pages site here.
Heroku *.herokuapp.com, *.herokussl.com No such app / herokucdn.com/error-pages/no-such-app.html
AWS S3 *.s3*.amazonaws.com NoSuchBucket
AWS Elastic Beanstalk *.elasticbeanstalk.com NXDOMAIN on CNAME target
Azure CloudApp *.cloudapp.net, *.cloudapp.azure.com NXDOMAIN
Azure Traffic Manager *.trafficmanager.net NXDOMAIN
Azure Edge / Front Door *.azureedge.net, *.azurefd.net NXDOMAIN
Azure Websites *.azurewebsites.net 404 Web Site not found
Fastly *.fastly.net Fastly error: unknown domain
Shopify shops.myshopify.com Sorry, this shop is currently unavailable.
Netlify *.netlify.app, *.netlify.com Not Found - Request ID (and the site is unclaimed)
Surge.sh *.surge.sh project not found
Tumblr domains.tumblr.com Whatever you were looking for doesn't currently exist at this address.
Read the Docs readthedocs.io unknown to Read the Docs
Zendesk *.zendesk.com Help Center Closed
Unbounce unbouncepages.com The requested URL was not found on this server.
Pantheon *.pantheonsite.io The gods are wise, but do not know of the site which you seek.
Help Scout *.helpscoutdocs.com No settings were found for this company
Cargo cargocollective.com 404 Not Found + Cargo branding
Tilda *.tilda.ws Please renew your subscription
Webflow proxy-ssl.webflow.com The page you are looking for doesn't exist or has been moved.
Smartling *.smartling.com Domain is not configured
Worksites.net *.worksites.net Hello! Sorry, but the website you're looking for doesn't exist.
Ghost *.ghost.io Site unavailable / The thing you were looking for is no longer here, or never was
LaunchRock *.launchrock.com It looks like you may have taken a wrong turn somewhere.

Canonical reference (updated by EdOverflow community): can-i-take-over-xyz.

3. Detection — body fingerprint

# Single subdomain
curl -sk -H 'Host: app.<TARGET>' "https://app.<TARGET>/" -o body.html -w '%{http_code}\n'
grep -iEf <(printf '%s\n' \
  "There isn't a GitHub Pages site here" \
  "no such app" "NoSuchBucket" "Fastly error: unknown domain" \
  "Sorry, this shop is currently unavailable" "project not found" \
  "Help Center Closed" "unknown to Read the Docs" \
  "The gods are wise" "Whatever you were looking for doesn't currently exist" \
  ) body.html

NXDOMAIN cases (Azure, Beanstalk) are detected at DNS layer — no HTTP body:

cname=$(dig +short CNAME "app.<TARGET>" | head -n1)
[ -n "$cname" ] && dig +short "$cname" | grep -q . || echo "DANGLING: $cname"

4. Mass detection

# subjack — fingerprints + claim hints
subjack -w subs.txt -t 50 -timeout 30 -ssl -c ~/go/pkg/mod/github.com/haccer/subjack/fingerprints.json -v -o subjack.out

# subzy — newer, maintained, more providers
subzy run --targets subs
常见问题

什么是悬空的 DNS 记录?

它是指向已被移除服务的子域名,因此该名称可能被他人认领。

为什么这很重要?

被认领的子域名可能被用来误导访问者,或绕过依赖主域名的信任设置。

团队通常如何修复?

通常是删除旧的 DNS 记录,或将该服务认领到自己的账户下。

详情

作者的原始描述

Subdomain takeover via dangling DNS/CNAME — GitHub Pages, Heroku, Azure, Fastly, Shopify, Netlify, Surge, Tumblr, Beanstalk, Zendesk, etc.

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#14156
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能