The Orphaned Internet – Taking Over 120K Domains via a DNS Vulnerability in AWS, Google Cloud, Rackspace and Digital Ocean
Managed DNS providers let anyone create a zone for a domain without proving ownership, so when a customer deleted a zone but left the provider's nameservers in place, an attacker could claim that domain. This gave the attacker full control of DNS for over 120,000 domains, allowing them to host websites, obtain certificates and run email.
Published on thehackerblog.com
Recently, I found that Digital Ocean suffered from a security vulnerability in their domain import system which allowed for the takeover of 20K domain names. If you haven’t given that post a read I recommend doing so before going through this write up.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The provider allowed a domain to be added to an account without verifying ownership, and a deleted zone left the domain's nameservers still pointing at the provider.
Impact
An attacker could take full control of a vulnerable domain, setting up websites, issuing certificates and hosting email, and over 120,000 domains were found to be exposed; Google patched the issue, AWS added warnings and documentation, while Rackspace declined to fix it.
What the attacker needed
A free account at the DNS provider; target domain still points at provider nameservers; target zone has been deleted
The fix
Providers should record the nameservers a domain was verified with and refuse to hand those same nameservers to any later zone for that domain, so only the real owner can complete the setup.
How it was found
- Query the domain's nameservers and look for a SERVFAIL or REFUSED response, which indicates the zone no longer exists.
- Query the TLD nameservers directly to learn which nameservers the domain is actually pointed at.
- Create a new zone for the domain in the provider's panel and check the nameservers returned.
- If the returned nameservers do not match the target's, delete the zone and repeat until they do.
- Once the nameservers match, create the DNS records you want for the domain.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Every domain points to nameservers, which are the computers that answer questions about where its website and email live. Some cloud services let you add a domain to your account without checking that you own it, and if the real owner later removes their zone but leaves those nameservers configured, anyone can re-add the domain and answer for it. That means the attacker controls where the domain's traffic and mail go.
What is Subdomain takeover?
A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.