NEWS

6 min read

Researchers take over US Treasury subdomains for $3 by exploiting orphaned IP on AWS

Researchers take over US Treasury subdomains for $3 by exploiting orphaned IP on AWS
Image: Redação iMasters
News
Reading
6 min
Tables
1
In short

Security firm Intruder showed that it is still possible to hijack entire subdomains on AWS by recycling abandoned Elastic IPs, and found five US Treasury addresses vulnerable to the attack.

Five Treasury subdomains for $3

Security firm Intruder published research on November 24, 2026, showing that it is still possible to hijack entire subdomains on AWS by exploiting a classic DNS misconfiguration. The team found 28 real takeover cases in public bug bounty programs, five of them belonging to the United States Treasury: ftp.treasury.gov, irssearch.treasury.gov, pcp.treasury.gov, rdgw.treasury.gov, and ww5.treasury.gov.

Flowchart of Intruder's research shows the automated process of allocating and testing Elastic IPs, checking for matches in a DynamoDB database before releasing the address
Flowchart of Intruder's research shows the automated process of allocating and testing Elastic IPs, checking for matches in a DynamoDB database before releasing the address. Reprodução: intruder.io.

The cost of the entire operation was about $3 per address acquired, the price of allocating and releasing Elastic IPs (EIPs) on AWS until landing on one that already had a DNS record pointing to it. All findings were reported through bug bounty channels and responsible disclosure, and the Treasury has already fixed the affected records.

How Elastic IP hijacking works

An Elastic IP is a publicly routable address that AWS assigns to an account and can release at any time. The problem arises when someone points a DNS A record to that IP and then deallocates the instance but forgets to delete the record: the address goes back into AWS's general pool and can be picked up by any other account, including an attacker's, who then gains control over everything that subdomain serves.

AWS's EIP space for EC2 is about 80 million addresses, allocated essentially at random, so there's no way to simply request the specific IP that still has DNS pointing to it. Intruder's strategy was to allocate and release addresses in bulk, cross-checking each one against a target list, until finding a match.

The automation: 450,000 IPs in 48 hours

To build the target list, the team used the bbscope API to pull wildcard scopes from public bug bounty programs, ran the domains through subfinder to enumerate subdomains, and resolved the A records for each host, storing the ones that fell outside private or reserved ranges in a DynamoDB table.

The Python script then repeated this cycle in each AWS region:

  1. Allocate 25 Elastic IPs in the current region.
  2. Check for duplicates and log each address.
  3. Query the target database for matches.
  4. Keep and log any address that matched a monitored A record.
  5. Release all addresses with no match and move on to the next region.

A new AWS account has a default limit of 5 Elastic IPs per region, but Service Quotas automatically approves an increase to 25 per region without needing to open a support ticket, which Intruder used to speed up the cycle. In 48 hours, the team went through 450,000 unique IPs (0.56% of the total published space) at a rate of about 9,400 addresses per hour, until AWS banned the account for abuse. Even covering less than 1% of the space, 28 high-impact takeovers turned up, nearly half of them on government agency domains.

The ban that doesn't stop anything

After the block, Intruder's account received an abuse notice from AWS that suspended its ability to allocate and associate Elastic IPs in all regions, including the already-captured addresses that the team needed to keep live to prove the findings to the bug bounty programs. The solution came through another path: AWS allows transferring Elastic IPs between accounts in the same organization, and Intruder simply created a second account and moved the captured IPs to it, without any extra verification.

In short: the ban acts only at the account level, not the organization level. An attacker who gets flagged for abuse can open another account in the same org and pick up right where they left off, which hollows out much of the punishment's practical effect.

Intruder suggested two concrete changes to AWS: a hard monthly limit on how many Elastic IPs an account can allocate, and applying abuse restrictions at the organization level instead of the account level. Neither was adopted.

What an attacker can do with a .gov subdomain

The impact of a takeover like this goes beyond defacing a page. US government sites tell the public to trust any domain that ends in .gov and uses HTTPS; an attacker who controls the IP behind the subdomain can even complete domain validation with a certificate authority and issue a legitimate TLS certificate, making the page look genuine in every technical sense.

This opens the door to credential phishing using a real government domain, collection of data sent by old automations that still point to that host, and even session theft: if the parent domain, such as treasury.gov, sets cookies with Domain=treasury.gov, those cookies get sent to every subdomain, including the one the attacker now controls.

How long a real attack would take

Intruder also calculated the feasibility of a larger-scale attack. A single account would take about a year to cover the entire 80-million-IP space published by AWS for EC2, but multiple accounts reduce this drastically.

ScenarioSearch spaceEstimated time
Full scan (1 account)~80 million IPs~1 year
Full scan (10 accounts)~80 million IPs~5 weeks
Targeted attack on eu-west-2~2.2 million IPsfaster, but with more duplicates

An attacker targeting a specific organization doesn't need to scan the entire space: it's enough to enumerate the target's subdomains, find which ones point to unused EC2 addresses, and since AWS publishes each region's IP range, search only there. Intruder noted, however, that repeated allocations within the same region return more duplicate addresses, which makes this targeted search slower in practice, even with a smaller space.

AWS's response

Intruder contacted AWS on October 8, 2026, with the mitigation suggestions and received an initial response the same day. After a follow-up on November 10, AWS confirmed on November 17 that it does not plan any changes: for the company, the problem stems from poorly maintained DNS records on the customer's side, not a flaw in the AWS service. AWS also stated that it treats rapid IP allocation and release as a policy violation and already has controls against it, which Intruder acknowledges is true but considers insufficient given what its own research demonstrated.

What to check in your own DNS

For anyone running infrastructure on AWS, the practical point is simple to check and easy to ignore: every A record pointing to an Elastic IP needs to be removed the moment the instance or associated resource is shut down. It's worth auditing:

  • A or CNAME records pointing to IPs that no longer respond or that don't belong to any active resource in your account.
  • Staging subdomains, internal tools, or old integrations that nobody remembers to deactivate.
  • Automations and scripts that still have credentials or webhooks configured for old hosts.
  • Use of a fixed Elastic IP versus dynamic association, which eliminates the risk of dangling DNS by design.

Intruder's research doesn't rely on a new AWS vulnerability, but on a DNS hygiene mistake that any team can make, including banks, universities, and, as the Treasury case showed, government agencies with strong public exposure.

Translated from the Brazilian Portuguese original · Read the original