deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

Researchers took over five US Treasury subdomains for $3 each via unclaimed AWS Elastic IPs

Intruder researchers took control of five US Treasury subdomains for $3 each by claiming unclaimed AWS Elastic IPs, showing a dangling-DNS takeover that still works despite AWS account bans.

Researchers took over five US Treasury subdomains for $3 each via unclaimed AWS Elastic IPs

What happened

Security researchers at Intruder have demonstrated that a long-known DNS takeover technique still works, and used it to take control of five US Treasury subdomains: ftp.treasury.gov, irssearch.treasury.gov, pcp.treasury.gov, rdgw.treasury.gov and ww5.treasury.gov. The affected records were reported and fixed through a bug bounty program, but the underlying weakness remains exploitable, and each successful takeover cost the researchers just $3.

The technique targets dangling DNS records — A records that still point at AWS Elastic IP addresses which have since been released. Elastic IPs are publicly routable addresses that any AWS customer can allocate, so once an organisation lets one go without cleaning up its DNS, whoever claims that address next effectively inherits the hostname pointing at it.

How the attack works

According to Intruder, the main obstacle is that Elastic IPs are handed out at random from a pool AWS publishes as roughly 80 million IPv4 addresses, so an attacker cannot simply request a specific one. Instead they have to cycle through allocations and compare each address against a list of target DNS records.

The researchers built their target list from public bug bounty scopes, enumerating subdomains with subfinder and storing resolved A records in DynamoDB. A Python script then repeatedly allocated Elastic IPs, checked each against that database, kept any matches and released the rest. AWS accounts start with a quota of five Elastic IPs per region, but Service Quotas automatically approves an increase to 25 per region without a support case, so the researchers raised their quota everywhere and rotated between regions to avoid being handed the same recycled addresses.

In 48 hours the automation cycled through 450,000 unique addresses — about 0.56% of the published EC2 space — before AWS banned the account. That was enough to find 28 live takeovers, almost half belonging to government bodies. Other affected targets included a university, two government bodies, a financial services company and a large networking vendor, with the remainder belonging to Intruder customers who were notified directly.

The ban, and how to get around it

Amazon responded with an abuse notice that blocked the account from allocating or associating Elastic IPs in any region. But AWS allows Elastic IPs to be transferred between accounts, so the researchers moved their matched addresses to a new account inside the same organisation, which worked without issue. Because new accounts under an organisation skip the verification process, Intruder notes that a banned attacker could simply spin up a fresh account and carry on.

Intruder suggested two mitigations to AWS: a hard monthly cap on Elastic IP allocations, and applying abuse restrictions at the organisation level rather than per account. AWS, the researchers say, replied that it has no plans to change anything.

What an attacker gains

Whoever holds the address behind a dangling record controls what that subdomain serves. As Intruder points out, US government guidance tells visitors they can trust a .gov site that uses HTTPS, and an attacker can pass a certificate authority's domain validation to obtain a legitimate TLS certificate for the hijacked name. That makes the domain convincing for phishing, and also useful for harvesting incoming traffic from old automations that still point at it — credentials which could then grant access to unrelated systems.

There is also a cookie risk. Cookies set with Domain=treasury.gov are sent to every subdomain, including attacker-controlled ones, which could enable session theft in other Treasury applications.

Why it matters

The research shows a cheap, still-live attack path built on a basic hygiene failure: DNS records that outlive the cloud resources they point to. At roughly 9,400 addresses per hour, Intruder calculates that a single account would need about a year to sweep the full address space, while ten accounts could manage it in around five weeks — and the practically acquirable space is smaller than these figures suggest, since much of it is held long-term by other customers. Even at 0.56% coverage, the researchers landed 28 hijackable subdomains in two days, and a wider scope than bug bounty programs would likely yield many more. With AWS declining to change the allocation model, the onus is on organisations to audit their DNS and remove dangling records before someone else claims the addresses behind them.

  • #dns
  • #aws
  • #cloud-security
  • #subdomain-takeover
  • #security-research

Related posts