Researchers Took Over US Treasury Subdomains for $3
Security researchers at Intruder recently took control of five official US Treasury subdomains.
They didn't use zero-days. They didn't crack credentials. They spent about $3 per domain using a standard AWS account.
Here is how the bug works, why it happened, and how to stop it in your own infrastructure.
What Is a Dangling DNS Record?
When an engineering team builds an app on AWS, they typically assign a public IPv4 address (an Elastic IP) to an EC2 instance or load balancer. Then they point a DNS record like portal.example.gov directly to that IP.
Months or years later, someone shuts down the server. They release the Elastic IP back to Amazon.
The problem? Nobody deleted the DNS A record.
The domain name still points to that specific IP address. But your team no longer owns the IP. It sits in Amazon's public pool, waiting for anyone else to claim it.
That is a dangling DNS record.
The $3 Attack Method
Amazon Web Services owns millions of public IPv4 addresses. When customers request an Elastic IP, AWS hands one out at random.
Amazon charges a fraction of a cent per hour for allocated IPs, plus a nominal fee if an IP is allocated and left idle.
The Intruder team automated a loop:
- Gather public domain names in target bug bounty scopes (including US government agencies).
- Request a batch of Elastic IPs across AWS regions.
- Check if any assigned IP matched an active DNS record in their target list.
- Release the IPs that didn't match and repeat.
Over a 48-hour run, the researchers tested roughly 450,000 IP addresses. That is less than 1% of Amazon's total IPv4 space.
The run netted 28 hijacked subdomains. Five belonged to the US Department of the Treasury, alongside other government bodies and enterprise companies.
Because AWS IP allocation costs pennies per cycle, the total bill came out to roughly $3 for every hijacked subdomain.
Why This Is Dangerous
Once an attacker's server catches that IP, they own the traffic to that subdomain.
- Automatic TLS Certificates: Anyone controlling the IP for a live domain can request free certificates through Let's Encrypt. Browsers show a valid padlock icon.
- High-Trust Phishing: Emails and login links pointing to a legitimate
.govor corporate address easily pass email inspection rules and human scrutiny. - Session Theft: If parent domain cookies do not restrict their domain scope, an attacker on a subdomain can read authentication cookies meant for the primary app.
How to Fix It
The fix requires better hygiene between cloud operations and DNS management.
- Delete the DNS record before releasing the IP: Never release an AWS Elastic IP, Azure Public IP, or GCP external address while a DNS record still points to it. Update your decommissioning checklists.
- Use Alias records where possible: In AWS Route 53, use
ALIASrecords pointed to resources like ALBs or CloudFront distributions instead of bareArecords with static IPs whenever you can. - Scan your external perimeter: Run continuous monitoring on your external DNS zones. Flag any
AorCNAMErecords pointing to IPs or hostnames outside your current cloud inventory. - Clean up old staging records: Abandoned test environments and migration artifacts cause most of these leaks. If a service is dead, delete the DNS record immediately.