Lesson 2 of 9 · 24m
Dangling Records: How Takeovers Actually Begin
The asset inventory problem behind subdomain takeover: deleted cloud resources, stale CNAMEs, abandoned IPs, and delegated zones nobody remembers.
The classic subdomain takeover story starts with good intentions. A team creates campaign.acme-corp.com, points it at a hosted service, ships the launch, and moves on. Months later the service subscription expires. DNS still points at the vendor. The vendor namespace becomes claimable again. Now anyone who registers that tenant controls what your subdomain serves.
The dangling CNAME pattern
dig +short campaign.acme-corp.com CNAME
# acme-campaign.azurewebsites.net.
dig +short acme-campaign.azurewebsites.net A
# no answer, NXDOMAIN, or provider-specific parking behaviorThe exact failure mode depends on the provider. Some return NXDOMAIN. Some return a branded 'not found' page. Some still resolve to shared edge infrastructure while no tenant owns the name. Resolution alone cannot tell you whether the resource is safe.
The dangling A record pattern
Cloud IP addresses can be reused. If a VM, load balancer, or elastic IP is released but DNS still points at the old address, an attacker who receives the same allocation may inherit your traffic.
Before decommission:
status.acme-corp.com. 300 IN A 203.0.113.44
After decommission:
- VM deleted
- public IP released
- DNS record unchangedThis is harder to exploit at scale than a SaaS CNAME because IP reassignment is not deterministic, but the blast radius is the same: traffic for your trusted hostname reaches someone else's listener.
Delegation rot is worse
A dangling CNAME affects one name. A dangling NS delegation can affect every record below a delegated zone:
lab.acme-corp.com. IN NS ns1.old-dns-provider.net.
lab.acme-corp.com. IN NS ns2.old-dns-provider.net.If the old provider account is deleted, expired, or claimable, vpn.lab.acme-corp.com and every sibling can fall with it. Teams often inspect leaf records and forget the delegation above them.
Why inventory drifts
- Infrastructure is created by Terraform but campaign microsites are created by hand.
- SaaS integrations are owned by marketing, while DNS is owned by infrastructure.
- Test systems become permanent because nobody wrote down an owner or expiry.
- Vendors change backend hostnames without breaking old DNS entries.
Field notes
- Treat every DNS record as a reference to an asset. If the asset has no owner, the record is already suspicious.
- Decommission in reverse dependency order: remove traffic, remove DNS, wait out the TTL, then delete the backing resource.
- Put expiry metadata in ticket text or infrastructure tags; DNS itself has no reliable 'owner' field.
- Do not assume NXDOMAIN means safe. It often means the provider resource no longer exists, which is exactly why the name may be claimable.
Was this lesson helpful?