AWS Elastic IP subdomain takeover: find dangling DNS records
Intruder researchers allocated and released AWS Elastic IPs until they matched DNS records that pointed at addresses their owners had given up, taking over 28 subdomains in 48 hours at about $3 each. AWS has no plans to change this, so the fix is yours: find and remove A records pointing at IPs you no longer hold.
Intruder security consultant Tom Steer published research on 24 November 2026 showing how cheaply a forgotten DNS record can be turned against its owner. By repeatedly allocating and releasing AWS Elastic IPs, the team captured addresses that other organisations' A records still pointed at, and took over 28 subdomains in bug bounty scope in 48 hours, five of them on treasury.gov. AWS told the researchers it has no plans to change anything, since the problem is in the customer's DNS. That makes this your problem to find and fix, and it is a short job once you know what to look for.
How the attack works
An Elastic IP is a public IPv4 address you allocate to your AWS account and attach to resources. When you release it, it returns to AWS's pool, and anyone can be allocated it next. If a DNS record still points at that address, whoever holds the IP now controls what that hostname serves.
The attacker can't choose which address they get, because allocation is random. So the technique is brute force, done cheaply:
- Build a target list. The team pulled wildcard scopes from public bug bounty programmes, enumerated subdomains with subfinder, resolved their A records and stored the public addresses.
- Raise the quota. New accounts get five Elastic IPs per region; they used Service Quotas to raise it to 25.
- Allocate, compare, release. Each cycle allocated 25 addresses, kept any that matched a target and released the rest.
- Rotate regions. Reallocating in one region often returned the address just released, so moving between regions let each pool change.
In 48 hours they cycled through 450,000 unique addresses before AWS banned the account, and found 28 live takeovers. Almost half belonged to government bodies. The five Treasury hostnames were ftp, irssearch, pcp, rdgw and ww5 under treasury.gov. The researchers put the cost at about $3 per valid takeover.
AWS publishes about 80 million IPv4 addresses for EC2, so 450,000 is 0.56% of the space. The write-up estimates a single account would need about a year to sweep it all, or about five weeks with 10 accounts if bans apply only per account. A targeted attack on one region is smaller: eu-west-2 is about 2.2 million addresses.
Why a stale subdomain is worth taking
The post lists three consequences, and each one is worse than "someone put up a defaced page":
- Phishing with a real certificate. Whoever controls the IP can pass a certificate authority's domain validation for that hostname and serve HTTPS on a trusted domain.
- Credential leaks. Old scripts, webhooks or integrations that still call the hostname will send their requests, and possibly their credentials, to the new owner.
- Cookie exposure. Cookies set with
Domain=example.comare sent to every subdomain, including the one you've lost. That can mean session theft on the main application.
The last point is the one engineers tend to miss. A forgotten ftp. or staging. host can leak sessions for your production app if your cookies are scoped to the parent domain.
What AWS said
According to the disclosure timeline, Intruder contacted AWS on 8 October, followed up on 10 November, and on 17 November AWS confirmed it had no plans to fix. AWS treats rapid allocation and release as a policy violation and sees the takeover as depending on customer-side DNS records. The researchers suggest AWS add a monthly hard cap on Elastic IP allocations and apply abuse restrictions at the organisation level, since they moved captured addresses to a new account in the same organisation after the ban.
Whatever AWS decides later, the practical position today is that dangling records are exploitable and the cleanup is yours.
How to find dangling A records
The goal is a list of A records whose target address your organisation no longer holds. On AWS with Route 53 that's two lists and a comparison. The commands below need the AWS CLI and jq, and read-only permissions for EC2 and Route 53.
First, collect every Elastic IP the account holds, across all regions:
for r in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
aws ec2 describe-addresses --region "$r" --query 'Addresses[].PublicIp' --output text
done | tr '\t' '\n' | sed '/^$/d' | sort -u > held-ips.txtNext, export every A record from your hosted zones as name address pairs:
for z in $(aws route53 list-hosted-zones --query 'HostedZones[].Id' --output text); do
aws route53 list-resource-record-sets --hosted-zone-id "$z" --output json |
jq -r '.ResourceRecordSets[]
| select(.Type == "A" and .ResourceRecords != null)
| .Name as $n | .ResourceRecords[].Value | "\($n) \(.)"'
done | sort -u > a-records.txtAlias records to load balancers or CloudFront have no ResourceRecords and are skipped. They resolve to AWS-managed targets, not addresses you allocate.
Finally, list records that point at an address not in your held list:
awk 'NR == FNR { held[$1]; next } !($2 in held)' held-ips.txt a-records.txtTreat the output as a review queue, not a verdict. It will also include records for addresses outside AWS (your own data centre, another cloud), and for EC2 instances using auto-assigned public IPs rather than Elastic IPs. The latter deserve a look anyway: an auto-assigned public IP changes when the instance stops and starts, so a hard-coded A record for one can end up in the same state.
Run the comparison across every account in your organisation, not just one, because a record in one account's zone often points at an address owned by another. If your DNS lives somewhere other than Route 53, export the zone file and feed the A records into the same awk step.
Stopping it happening again
A one-off audit fixes today's records. To keep them from coming back:
- Delete DNS before releasing the IP. Make it the order of operations in runbooks and infrastructure code. If the record and the address are managed in the same Terraform or CloudFormation stack, destroying one destroys the other.
- Prefer aliases where you can. Alias and CNAME records to managed endpoints don't leave a raw address behind when a resource goes away.
- Run the comparison on a schedule. The three commands above fit in a nightly CI job that fails when the list contains anything not on an allowlist.
- Scope cookies tightly. Set cookies on the exact host that needs them rather than the parent domain, so a lost subdomain can't receive them.
- Watch certificate transparency logs for certificates issued on your domains that you didn't request.
For more security fixes and advisories explained for working engineers, see the developer ecosystem topic.
Sources
- Taking over US Treasury subdomains for $3 each, Intruder, 24 November 2026
FAQ
What is an Elastic IP subdomain takeover?
It happens when a DNS A record still points at an AWS Elastic IP that its owner has released. Anyone who is later allocated that address controls what the hostname serves. Intruder showed it can be done at scale by allocating and releasing addresses until one matches a target.
Is AWS going to fix Elastic IP takeovers?
According to Intruder's disclosure timeline, AWS confirmed on 17 November 2026 that it has no plans to fix it. AWS treats rapid allocation and release as a policy violation and considers the root cause to be customer DNS records. Protection is up to the domain owner.
How do I check my domains for dangling DNS records?
List every public IP your accounts hold, list every A record in your DNS zones, and review records pointing at addresses you don't hold. On AWS this takes three short AWS CLI and jq commands, shown above. Repeat it across all accounts and on a schedule.
Why is a taken-over subdomain dangerous if nothing important runs there?
The attacker can get a valid HTTPS certificate for it, receive traffic from old integrations that still call it, and receive cookies scoped to your parent domain. That can mean credential leaks or session theft on your main application.
Written by the CodeBeast Team with AI assistance. Spotted a mistake? Email support@codebeast.ai.