Dangling DNS Records Handed Five treasury.gov Subdomains to Whoever Rented the AWS Elastic IP Next

Dangling DNS Records Handed Five treasury.gov Subdomains to Whoever Rented the AWS Elastic IP Next

On November 24, the security company Intruder described how it took control of five hostnames under treasury.gov without touching a Treasury system. The report, written by Tom Steer, describes a script that allocated AWS Elastic IP addresses, compared each one with the A records of organizations that run bug bounty programs, and released the ones that matched nothing. In 48 hours the script went through 450,000 unique addresses, and 28 of them were the target of a live DNS record, among them ftp, irssearch, pcp, rdgw and ww5.treasury.gov. Intruder puts its bill at $3 per hostname. AWS told it on November 17 that it plans no change.

Each of those 28 was a dangling DNS record: an A record that still pointed at a cloud address its owner had given back. AWS hands a released address to another customer, and from then on that customer's server answers for the hostname and can obtain a TLS certificate for it. The DNS record does not change when the tenant does, and neither does anything an IP database knows about the address. If your zone holds A records that point into AWS, Azure or Google Cloud, the only way to know they are still yours is to compare them with what you rent today.

Address released Address reallocated DNS record app.example.com A 203.0.113.25 Address held by The domain owner AWS regional pool Another AWS customer Visitors reach The owner's service No answer New tenant's server time
The record never changes while the address behind it changes hands twice, and DNS keeps no trace of either event. Example name and address are documentation values.

Intruder reported its findings to the bug bounty programs on August 25. When we queried the five Treasury names on November 28 at 23:47 UTC, none of them returned an A, AAAA or CNAME record.

Forty-eight hours of allocate, compare, release

The target list came from public bug bounty scopes. Intruder pulled the wildcard entries with bbscope, enumerated subdomains with subfinder and stored every A record that resolved to a public address in a DynamoDB table. All 28 hits come from that list, which covers a thin slice of the DNS.

A new AWS account may hold five Elastic IPs per region, and Intruder found that Service Quotas approves a raise to 25 without a support case. Its loop allocated 25 addresses in one region, looked each of them up in the table, kept any match, released the rest and moved on to the next region, a rotation it needed because releasing and reallocating in a single region "often returned the same address".

That ran at about 9,400 addresses per hour. After 48 hours AWS sent an abuse notice and "Blocked the ability to allocate and associate Elastic IP in all regions", which also froze the 28 matched addresses. Intruder moved them to a new account inside the same AWS organization so that it could host its proofs of concept, and did not restart the loop.

Intruder gives no breakdown for the $3. AWS has charged $0.005 per hour for every public IPv4 address since February 1, 2024, and bills it by the second with a 60-second minimum. If the whole bill was address rental, 28 takeovers at $3 make $84, which buys 16,800 address-hours, or a little over two minutes for each of the 450,000 addresses.

A regional lottery with published odds

Nobody can ask AWS for a specific address they have never held. An allocation returns whatever the region's pool gives out, and an Elastic IP "is for use in a specific Region only". What AWS does publish is the list of ranges each region draws from. The copy of ip-ranges.json dated November 28, 16:57 UTC, lists 1,910 IPv4 prefixes for the EC2 service: 80,391,741 addresses across 42 regions and a GLOBAL bucket. Intruder's 450,000 addresses are 0.56% of that.

EC2 public IPv4 addresses per region, in millions us-east-1 us-west-2 eu-west-1 eu-central-1 us-east-2 ap-northeast-1 ap-southeast-1 ap-southeast-2 ap-south-1 eu-west-2 All 33 others 21.55 10.76 5.60 5.07 4.97 4.30 2.60 2.44 2.19 2.16, the region in Intruder's example 18.76
Source: AWS ip-ranges.json published November 28, 2026 at 16:57 UTC, prefixes with service EC2, overlaps collapsed. "All 33 others" is the remaining 32 regions plus the GLOBAL bucket.

us-east-1 alone has 21.6 million addresses, 27% of the total. The ten largest regions hold 77%. An attacker who wants one particular hostname reads the region of its address from the file and plays that pool only: 2,158,608 addresses for eu-west-2, the example Intruder uses, and 134,928 for sa-west-1, the smallest region listed. At 9,400 addresses per hour that is under ten days for the first and about 14 hours for the second, although Intruder saw "a much higher duplicate rate" when it stayed in one region.

The published ranges also overstate the pool, because an address attached to a running instance cannot be drawn. In 2021 Eric Pauley and five colleagues at Penn State launched over 3 million servers in us-east-1 across 101 days and received 1.5 million unique addresses, which they put at 56% of that region's pool. Intruder guesses that the Elastic IP space is "probably half" of the 80 million.

What a subdomain takeover is worth to the new tenant

The new tenant decides everything the hostname serves, and can prove control of it to a certificate authority. Domain validation over HTTP consists of asking the server at the name's address to return a token, so holding the address is enough to pass. Kevin Borgolte and four co-authors measured this for Cloud Strife, the 2018 paper that named the problem "IP address use-after-free". Out of more than 130 million domains pointing at cloud networks, over 700,000 pointed at addresses that were free, and an attacker in a hurry could run the whole attack in under 70 seconds.

For a .gov name the certificate matters more than usual, since federal sites tell visitors to trust a domain that ends in .gov and uses HTTPS. Intruder adds that a cookie set with Domain=treasury.gov is sent to every subdomain, the hijacked one included, and that old automations still connecting to the name hand their credentials to whoever answers.

A CAA record with the accounturi parameter of RFC 8657, which Let's Encrypt honors, restricts issuance to one ACME account, so an address alone no longer gets a certificate. One record at the apex covers every subdomain that has none of its own. When we queried treasury.gov on November 28, it returned no CAA record.

Eleven years of reports, one answer from AWS

Matt Bryant described the technique at Bishop Fox on October 7, 2015. Pauley's team found 5,446 exploitable domains, contacted AWS in June 2021 and proposed an allocation scheme, IP Tagging, that in their evaluation cut an adversary's access to tenants' addresses by 99.94%. Amazon answered, according to the paper, by updating its best practices and adding guidance inside some services. In February 2022 Assetnote wrote that "Historically the approach AWS has taken is to effectively treat this as abuse of their public APIs and simply ban accounts."

Intruder received the same answer. AWS sees the takeover as depending on a customer's DNS record, treats rapid allocation and release as a policy violation, and has controls against it. All of that is true, but the control took 48 hours to trigger and stopped one account. AWS's own guide to subdomain takeover, published on June 16, 2026, covers CNAME records that point to S3, CloudFront and Elastic Beanstalk and never mentions Elastic IP addresses.

The stale record is the customer's mistake, and no change at AWS removes the need to clean it up. But AWS is the only party that knows who held an address last, and what Intruder asked for is modest: a monthly cap on Elastic IP allocations, and bans that apply to the whole AWS organization. Its loop requested some 376 batches of 25 addresses an hour, a pattern that a cap sized for ordinary customers would cut off within the first hour.

What IP data knows about a cloud address, and where it stops

We looked up one address from each of the twelve largest EC2 regions. Every answer described the same thing: AS16509 or AS14618, Amazon, a hosting connection, the cloud provider flag set, and a location in AWS's metro for the region (Ashburn for us-east-1, Boardman for us-west-2). For 3.10.0.7, which sits in eu-west-2's 3.8.0.0/14, the trimmed response reads:

{
  "company": {
    "domain": "amazon.com",
    "name": "Amazon Data Services UK",
    "type": "hosting"
  },
  "connection": {
    "asn": 16509,
    "organization": "Amazon.com, Inc.",
    "route": "3.8.0.0/14",
    "type": "hosting"
  },
  "ip": "3.10.0.7",
  "location": {
    "city": "City of London",
    "country": { "code": "GB" }
  },
  "security": {
    "is_cloud_provider": true
  }
}

That is all a third party can know. The reverse DNS is the generated ec2-3-10-0-7.eu-west-2.compute.amazonaws.com, and the response would be identical whether the address belongs tonight to its tenant of last year or to someone who allocated it an hour ago. IP data identifies who owns a block and where it is used, but which customer occupies one address of a shared pool at a given hour is known to AWS and to that customer.

Auditing a zone for dangling A records

Export every A and AAAA record from the zone itself Is the address in a cloud provider's published range? Public IP data can answer this no Not a shared pool Lower priority, check last yes Is the address in your own cloud inventory today? Only your inventory knows yes The record is live Keep it, and recheck on a schedule no Dangling record Delete it first, investigate after
Anyone can answer the first question from outside. The second takes your own inventory. An attacker does not have it and has to play the lottery instead.

Start from the zone file or your DNS provider's API. Subdomain enumeration is what an attacker uses for lack of anything better, and you have the complete list. Follow CNAME chains down to the addresses they end on.

Then sort the addresses. AWS, Azure and Google Cloud publish their ranges as JSON files, and for hosts that publish nothing, the hosting and cloud flags of an IP lookup do the same job. Every address in a cloud range is then compared with what you hold: for AWS, the Elastic IPs and the public addresses of network interfaces in every account and every region, including the accounts a team opened on its own. Assetnote's Ghostbuster automates the comparison. A record whose address is in a cloud range and absent from your inventory should be deleted the same day.

To keep new ones from forming, AWS's guide gives the teardown order in one line: "Always delete DNS first, wait for the TTL to expire, then delete the resource." An A record should also never carry an instance's auto-assigned address, because AWS releases it "when the instance is stopped, hibernated, or terminated". Route 53 alias records follow a resource instead of an address, but the documented targets do not include an Elastic IP.

Azure and Google Cloud recycle addresses the same way

Microsoft's documentation says of a static public IP that "The IP address is released when the resource is deleted and can't be recovered." Google's says that "In general, an ephemeral IP address is released if you stop or delete the resource". Azure DNS does have something for this case that Route 53 lacks: an alias record set can reference a public IP resource, which in Microsoft's words prevents dangling references "by coupling the lifecycle of a DNS record with an Azure resource".

Ipregistry returns the connection type, the operating company and a cloud provider flag for any IPv4 or IPv6 address, which is the sorting step of that audit for the providers that publish no range file. You can run a zone through the API with 20,000 free lookups to get started.

Engage customers with in-app updates using Noticeable Keep users in the loop Ship release notes that get read. Try Noticeable

Get started with 20,000 free lookups: sign up