Skip to content
Skillpedia
Security48k · #3293

hunt-subdomain

Teaches your AI agent to protect apps against attacks.

What it does

This tool searches for 'ghost subdomains' that belong to a company but are no longer in use by them. This could allow a malicious actor to take control of these subdomains.

When to use it

  • ✓When checking a website's security.
  • ✓When testing a domain's permissions.
  • ✓To find security flaws in subdomains.

Example of what to ask your AI

“Hunt for ghost subdomains on the domain 'example.com' and tell me if you find any.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-subdomain/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool checks DNS records (like CNAMEs) that point to external services. If the service is no longer associated with the company, an attacker might be able to register that space and take over control.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill hunt-subdomain

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/hunt-subdomain/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from 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

…

FAQ

What is a 'ghost subdomain'?

It's an internet address (like 'shop.company.com') that seems to belong to a company, but is no longer configured correctly and can be registered by anyone.

Why is this dangerous?

It allows an attacker to use a trusted company address to trick users, steal information, or spread malware, as browsers and other systems trust the original domain.

Do I need permission to use this tool?

Yes, it is crucial to have explicit, written permission from the system owner before using this tool, as it can be used for illegal purposes if misused.

Details

Original description by the author

Hunting skill for subdomain takeover vulnerabilities.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3293
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills