本文へスキップ
Skillpedia
セキュリティ48k · #4907

hunt-subdomain

できること

このツールは、企業に属しているように見えるものの、もう使われていない「ゴーストサブドメイン」を探します。悪意のある人物がこれらのサブドメインを乗っ取る可能性があります。

使う場面

  • ✓Webサイトのセキュリティを確認するとき。
  • ✓ドメインの権限設定をテストするとき。
  • ✓サブドメインのセキュリティ上の欠陥を見つけるとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-subdomain/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-subdomain/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ドメイン 'example.com' でゴーストサブドメインを探して、見つかったら教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

ツールは、外部サービスを指しているDNSレコード(CNAMEなど)を確認します。そのサービスが企業と紐づかなくなっている場合、攻撃者がその領域を登録して乗っ取れる可能性があります。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

Crown Jewel Targets

Subdomain takeover is high-value because it allows an attacker to serve content from a trusted, company-owned domain — bypassing browser same-origin trust, phishing filters, and user skepticism simultaneously.

Highest payout contexts:

  • Subdomains of major SaaS brands (Shopify, Snapchat, Mozilla, Yelp) where the trusted domain has user session context
  • CDN-backed subdomains (Fastly, CloudFront) where CNAME points to unclaimed origins
  • Third-party service integrations: UserVoice, WordPress.com, GitHub Pages, GitLab Pages, Heroku, Zendesk
  • Preview/staging/dev subdomains (new., preview., course., delivery., addons-preview.) — abandoned after feature launches
  • Subdomains used for OAuth redirect URIs or SSO endpoints — these pay highest

Asset types that matter most:

  • CNAME records pointing to deprovisioned third-party services
  • NS delegations to abandoned zones
  • A records pointing to unallocated cloud IPs (less common)
  • GitLab/GitHub Pages with unclaimed project namespaces

Attack Surface Signals

DNS signals:

  • CNAME pointing to *.github.io, *.gitlab.io, *.fastly.net, *.herokudns.com, *.wordpress.com, *.uservoice.com, *.zendesk.com, *.s3.amazonaws.com, *.azurewebsites.net, *.netlify.app
  • NXDOMAIN or SERVFAIL on the CNAME target while the parent record still exists
  • NS records delegating to registrars where the zone is no longer registered

HTTP response signals:

  • "There isn't a GitHub Pages site here"
  • "NoSuchBucket" (S3)
  • "The specified bucket does not exist"
  • "No such app" (Heroku)
  • "Sorry, this shop is currently unavailable" (Shopify)
  • "This UserVoice subdomain is available"
  • "Do you want to register" (any domain parking page)
  • HTTP 404 with provider-specific error templates
  • Fastly: "Fastly error: unknown domain"
  • "404 Web Site not found" (Azure App Service)

Tech stack signals:

  • Response headers: X-Served-By: cache-* (Fastly), X-GitHub-Request-Id, Server: Netlify
  • CNAME chain resolving to provider infrastructure but returning provider 404
  • SSL cert issued to provider wildcard (*.fastly.net) rather than company domain

Step-by-Step Hunting Methodology

  1. Enumerate all subdomains for the target using passive + active sources:

    • subfinder -d target.com -all
    • amass enum -passive -d target.com
    • assetfinder --subs-only target.com
    • Certificate transparency: crt.sh/?q=%.target.com
  2. Resolve all subdomains and flag those with:

    • NXDOMAIN responses
    • CNAME pointing to a third-party provider
    cat subdomains.txt | dnsx -a -cname -o resolved.txt
    
  3. Cross-reference CNAMEs against known vulnerable provider fingerprints using nuclei or subjack:

    subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c fingerprints.json
    nuclei -l subdomains.txt -t takeovers/
    
  4. Manual verification for each flagged subdomain:

    • dig CNAME subdomain.target.com — confirm CNAME exists
    • dig A <cname-target> — confirm NXDOMAIN or no resolution
    • curl -sk https://subdomain.target.com — check for provider error string
  5. Confirm claimability — attempt to register the resource:

    • GitHub Pages: check if <username>.github.io/<repo> or org page is unclaimed
    • GitLab Pages: check project namespace
    • S3: attempt aws s3api create-bucket --bucket <bucketname>
    • UserVoice/Zendesk/WordPress: visit registration URL
    • Fastly: check if origin hostname is unregistered

…

よくある質問

「ゴーストサブドメイン」とは何ですか?

「shop.company.com」のように企業のものに見えるインターネット上のアドレスですが、正しく設定されておらず、誰でも登録できてしまう状態のものです。

なぜ危険なのですか?

攻撃者が信頼できる企業のアドレスを使ってユーザーをだましたり、情報を盗んだり、マルウェアを広めたりできる可能性があるためです。ブラウザなどのシステムは元のドメインを信頼するため、被害が広がりやすくなります。

このツールを使うには許可が必要ですか?

はい、使用前にシステムの所有者から明示的な書面による許可を得ることが非常に重要です。悪用すると違法行為に使われる可能性があります。

詳細

作者による元の説明

Hunting skill for subdomain takeover vulnerabilities.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#4907
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル