Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #14156

web-subdomain-takeover

Skill này làm gì

Skill giải thích cách tìm subdomain có DNS trỏ đến dịch vụ đám mây đã bị xóa hoặc chưa ai nhận. Dành cho đội bảo mật muốn dọn các bản ghi bị bỏ quên mà họ sở hữu.

Khi nào nên dùng

  • ✓Khi một công ty muốn kiểm tra xem các subdomain cũ có còn trỏ đến dịch vụ mà họ không còn sở hữu không.
  • ✓Khi đội IT đang dọn bản ghi DNS sau khi chuyển nhà cung cấp hosting.
  • ✓Khi người rà soát bảo mật cần đánh dấu các bản ghi DNS treo như một rủi ro.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/recon/web-recon/subdomain-takeover/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra xem có subdomain cũ nào của chúng tôi đang trỏ đến dịch vụ mà chúng tôi không dùng nữa không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill yêu cầu AI thu thập các subdomain, tra xem mỗi subdomain trỏ đến đâu, rồi so sánh đích đó với các dịch vụ được biết là cho phép chiếm lấy. Các trường hợp khớp được đánh dấu để xem xét.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Bản ghi DNS treo là gì?

Đó là subdomain trỏ đến một dịch vụ đã bị gỡ bỏ, nên người khác có thể chiếm tên đó.

Vì sao điều này quan trọng?

Một subdomain bị chiếm có thể dùng để đánh lừa khách truy cập hoặc vượt qua các thiết lập tin cậy dựa vào tên miền chính.

Các đội thường sửa thế nào?

Thường họ xóa bản ghi DNS cũ hoặc tự lấy lại dịch vụ đó dưới tài khoản của mình.

Chi tiết

Mô tả gốc của tác giả

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

repo: BitterSecurity/Decepticon

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#14156
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự