Skip to content
Subdomain takeover Disclosed report Intermediate

DNS Miconfiguration Leads to Subdomain Takeover - max1.liveplan.com

The subdomain max1.liveplan.com was configured with a CNAME pointing to an EC2 public DNS name, which could become dangling if the instance was terminated. An attacker could then claim the released IP and take over the subdomain, as evidenced by a mismatched SSL certificate.

melbadry9 Follow

Originally disclosed on HackerOne

  • Triaged in 2 days
  • Fixed in 2 days
  • Disclosed after 32 days

Summary

The issue happens due to using EC2 public DNS instead of using Elastic IPs as CNAME record. This report is simliar to report #1069795

Misconfiguration

  • DNS Records
JSON
{
  "host": "max1.liveplan.com",
  "resolver": [
    "1.0.0.1:53"
  ],
  "a": [
    "54.68.121.128"
  ],
  "cname": [
    "ec2-54-68-121-128.us-west-2.compute.amazonaws.com"
  ],
  "status_code": "NOERROR",
  "timestamp": "2021-08-07T13:41:48.3522806+02:00"     
}
  • If the EC2 instance is killed or terminated and the DNS was not updated this will lead to creating a dangling DNS record for the subdomain.
  • The EC2 IP will be released to AWS IPs pool, This mean it's possible to assign the IP to new EC2 instance.

PoC

  • SSL Certificate Data pulled from https://max1.liveplan.com on date 7/8/2021 - 1:40PM.
  • Data was pulled using SSLEnum
JSON
{
  "name": "max1.liveplan.com",
  "org": [],
  "cn": [
    "*.test.tugo.com"
  ],
  "alt_doms": [
    "*.test.tugo.com",        
    "*.dev.tugo.com",
    "*.uat.tugo.com"
  ],
  "dangling": true
}
  • This does prove that max1.liveplan.com is currently taken over by someone.
Screenshot_1.png
Screenshot_1.png From the original on HackerOne

Fix

  • Use Elastic IPs instead of the public DNS of EC2 instance or clear DNS records for mentioned subdomain

Supporting Material/References:

Impact

  • This could allow the takeover of the EC2 instance IP that will lead to subdomain takeover.

The original report as published on HackerOne, by melbadry9. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the use of an EC2 public DNS name in a CNAME record instead of a stable Elastic IP, which can become dangling when the instance is terminated.

Impact

This could allow the takeover of the EC2 instance IP that will lead to subdomain takeover.

What the attacker needed

EC2 instance terminated; DNS record not updated; Attacker can claim released IP

The fix

Use Elastic IPs instead of the public DNS of EC2 instance or clear DNS records for mentioned subdomain.

How it was found

  1. Query DNS records for max1.liveplan.com and observe a CNAME to an EC2 public DNS name.
  2. Retrieve the SSL certificate from the subdomain and note it is for a different domain, indicating takeover.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A subdomain is a part of a website address, like blog.example.com. Here, the subdomain was set to point to a temporary cloud server address. If that server is deleted, the address can be reused by someone else, letting them control the subdomain. The report shows this already happened because the security certificate didn't match.

What is Subdomain takeover?

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.

More by melbadry9

View all

5 more disclosed reports, best first.

More from Palo Alto Software

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Subdomain takeover

The lesson behind this report.

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.