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
Ready-to-paste message
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-subdomainOr 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.mdTechnical 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:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- 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:
CNAMEpointing to*.github.io,*.gitlab.io,*.fastly.net,*.herokudns.com,*.wordpress.com,*.uservoice.com,*.zendesk.com,*.s3.amazonaws.com,*.azurewebsites.net,*.netlify.app- NXDOMAIN or
SERVFAILon 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 CNAMEchain 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
Enumerate all subdomains for the target using passive + active sources:
subfinder -d target.com -allamass enum -passive -d target.comassetfinder --subs-only target.com- Certificate transparency:
crt.sh/?q=%.target.com
Resolve all subdomains and flag those with:
- NXDOMAIN responses
- CNAME pointing to a third-party provider
cat subdomains.txt | dnsx -a -cname -o resolved.txtCross-reference CNAMEs against known vulnerable provider fingerprints using
nucleiorsubjack:subjack -w subdomains.txt -t 100 -timeout 30 -ssl -c fingerprints.json nuclei -l subdomains.txt -t takeovers/Manual verification for each flagged subdomain:
dig CNAME subdomain.target.com— confirm CNAME existsdig A <cname-target>— confirm NXDOMAIN or no resolutioncurl -sk https://subdomain.target.com— check for provider error string
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
- GitHub Pages: check if
…
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.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3293
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC