# Subdomain takeover of fr1.vpn.zomans.com

Dangling DNS record for fr1.vpn.zomans.com pointed to a released AWS EC2 IP; researcher re-acquired the IP and served content on the domain.

- Payout: $350
- Severity: medium
- Program: Eternal
- Found by: ian
- Disclosed: 2021-09-17
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1182864
- Library page: https://bugbountylibrary.com/r/h1%3A1182864
- Tags: area:cloud domain:cloud impact:integrity kind:bounty platform:hackerone sev:medium tech:aws technique:recon vuln:misconfiguration vuln:subdomain-takeover

**Target:** DNS subdomain / AWS EC2 elastic IP
**Root cause:** DNS A record for fr1.vpn.zomans.com still pointed to an EC2 IP (52.47.57.107) whose instance was terminated and IP released back to AWS pool, allowing anyone to claim it.
**Steps:**
1. `dig +short fr1.vpn.zomans.com` returns `52.47.57.107`
2. Confirm no service responds / instance is gone
3. Allocate an EC2 instance and associate the released IP 52.47.57.107
4. Serve content and observe `curl fr1.vpn.zomans.com` returns attacker-controlled page (`<!-- hackerone.com/ian -->`)
**How found:** Noticed the subdomain resolved to an EC2 IP; checked whether the instance still existed and whether the IP was reclaimable from AWS.
**Exploitation:** Researcher claimed the dangling EC2 IP, ran their own instance, and served arbitrary content on the victim subdomain; could also obtain a TLS cert for the domain.
**Escalation:** Potential OAuth domain-whitelist abuse, domain-scoped cookie theft, and phishing of employees/clients connecting to the VPN hostname.
**Insight:** Dangling A records to cloud IPs (EC2/EIP, Azure, GCP) are takeover-able by re-allocating the released IP, not just dangling CNAMEs to SaaS — check whether the pointed-to IP is still owned by the target.

## Proof of concept (copied exactly from the original report)

**DNS lookup and curl proving subdomain takeover**

```
% dig +short fr1.vpn.zomans.com
52.47.57.107

% curl fr1.vpn.zomans.com
<!-- hackerone.com/ian -->
```

