Skip to content
Back to skills

Subdomain Takeover

ASecurity

Detection and safe proof of subdomain takeover via dangling CNAME/A/NS records pointing to unclaimed cloud services, using provider fingerprints, NXDOMAIN/SERVFAIL signals and nuclei takeover templates. Tier 1. Use when recon finds CNAMEs to third-party services or unresolving records.

  • 16 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 17, 2026
securityrustgonodegcpazuregitbackend

Works with

  • cli

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill subdomain-takeover --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Subdomain Takeover?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Subdomain Takeover
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-subdomain-takeover/badge)](https://www.skillsdirectory.com/skills/anandjogawade-subdomain-takeover)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: subdomain-takeover
description: Detection and safe proof of subdomain takeover via dangling CNAME/A/NS records pointing to unclaimed cloud services, using provider fingerprints, NXDOMAIN/SERVFAIL signals and nuclei takeover templates. Tier 1. Use when recon finds CNAMEs to third-party services or unresolving records.
---

# Subdomain Takeover (dangling DNS)

A subdomain that still points to a deprovisioned service lets an attacker claim that resource and serve content on the victim's hostname (cookie theft, phishing, OAuth/CSP abuse).

## Trigger phrases
`subdomain takeover, dangling cname, dangling dns, nxdomain takeover, can i take over xyz, subzy, baddns, ns takeover`

## Method
1. Pull all records for every subdomain: `dnsx -a -cname -resp -l subs.txt` (A/AAAA/CNAME/NS/MX). Flag CNAMEs to third-party providers and records that fail to resolve.
2. Fingerprint the target of each dangling CNAME against known patterns (`can-i-take-over-xyz`): S3 "NoSuchBucket", GitHub Pages "There isn't a GitHub Pages site here", Heroku "No such app", Azure "Web App not found", Fastly, Shopify, Zendesk, Readthedocs, Surge, Netlify, Cargo, etc.
3. Automated sweep: `nuclei -t http/takeovers/ -l subs.txt`; `subzy run --targets subs.txt`; `baddns -t ALL sub.target.com` (also catches NS/MX/signature cases).
4. **NXDOMAIN tell**: CNAME resolves to a provider hostname that returns NXDOMAIN → service deleted, often claimable.
5. **NS-record / zone takeover (RARE, higher impact)**: on `SERVFAIL`/`REFUSED`, `dig +trace sub.target.com` to see authoritative NS; query each NS directly — if one returns `NOERROR` it's served, if the hosted zone was deleted at the provider the zone may be recreatable (DO, GCP, Linode, NS1, Yahoo SBS historically). Full zone control = forge any subdomain/mail.
6. Safe PoC: register/claim the resource and host a harmless marker file (`/zazy-poc-<rand>.txt`) — do NOT serve content that could phish or capture; or, where ToS forbids claiming, document the exact claimable name + provider fingerprint as proof.

## Modern / rare techniques
- **Dangling A → released elastic IP**: A record to a cloud IP you can re-request on the same provider.
- **baddns signature+NS modes** catch cases `can-i-take-over-xyz` misses.
- **Second-order**: takeover a subdomain referenced in a victim's JS/CSP/`crossdomain.xml` to pivot into the main app → see `broken-link-hijack`.

## Escalation / chaining
Owned subdomain → cookie scoping/`cookie-tossing` session attacks, OAuth `redirect_uri`/CSP whitelist abuse (`oauth`), stored content for `stored-xss` on parent trust. Feeds `broken-link-hijack`.

## Backend & tooling
Kali/HexStrike (dnsx/nuclei/subzy/baddns/dig). Provider CLI only to register the claim within RoE.

## Verification (background, before reporting)
Re-resolve from a second vantage/resolver to rule out caching/geo; confirm the provider actually serves the claimed resource (fetch your marker). Use OAST only to prove reachability, never user-facing content.

## Evidence
Subdomain, record type + target, provider fingerprint, proof of claim (marker file) or exact claimable name, impact + remediation (remove dangling record top-down: DNS → zone → asset).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.