Skip to content
Subdomain takeover Disclosed report Beginner

Hosted Zone Takeover at *.pushbox.prod.cloudops.mozgcp.net

The subdomain *.pushbox.prod.cloudops.mozgcp.net was vulnerable to a hosted zone takeover because its NS records pointed to Google Cloud DNS nameservers that were not claimed. An attacker could create a free Google Cloud DNS zone with matching nameservers and then create arbitrary DNS records under the subdomain, potentially serving malicious content.

DiMaX Follow

Originally disclosed on Mozilla

  • Fixed in 2 hours
  • Paid in 27 days
  • Disclosed after 2 hours
Text
I discovered that it was possible to takeover *.pushbox.prod.cloudops.mozgcp.net by assigning a zone to that name with one of the following nameservers in Google Cloud DNS:

pushbox.prod.cloudops.mozgcp.net. 300 IN NS     ns-cloud-d2.googledomains.com.
pushbox.prod.cloudops.mozgcp.net. 300 IN NS     ns-cloud-d1.googledomains.com.
pushbox.prod.cloudops.mozgcp.net. 300 IN NS     ns-cloud-d4.googledomains.com.
pushbox.prod.cloudops.mozgcp.net. 300 IN NS     ns-cloud-d3.googledomains.com.

If a domain points to one of the nameservers listed above it is using Google Cloud DNS, a free service. A SERVFAIL error indicates the domain is vulnerable to take over. To perform the takeover set up a free Google Cloud account then navigate to Cloud DNS. Click Create Zone and then enter the (sub)domain name in the field named DNS name. Your new zone will be given four random Google nameservers. These must match the ones on the vulnerable domain. If they do not match simply delete the zone and create another one, you should be assigned a different random set of Google nameservers. I can take a few attempts to get them to match.

Once the zone was claimed, I was able to create DNS records under this host. Consider the following record:

http://poc.pushbox.prod.cloudops.mozgcp.net/poc.html

The original report as published on Mozilla's Bugzilla, by DiMaX. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 DNS zone for the subdomain was left unclaimed in Google Cloud DNS, allowing anyone to create a zone with the same name and matching nameservers.

Impact

An attacker could control DNS records for the subdomain, potentially serving malicious content or intercepting traffic, though the report only demonstrates creating a proof-of-concept page.

What the attacker needed

A free Google Cloud account; knowledge of the target subdomain

How it was found

  1. Check if the target subdomain returns a SERVFAIL error, indicating it is vulnerable.
  2. Create a free Google Cloud account and navigate to Cloud DNS.
  3. Create a new zone with the vulnerable subdomain name.
  4. If the assigned nameservers do not match the target's NS records, delete and recreate the zone until they match.
  5. Once the zone is claimed, create DNS records under the subdomain, such as a record pointing to a proof-of-concept page.

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's DNS records were pointing to a cloud service that nobody had claimed. Anyone could sign up for that service, claim the subdomain, and then control what websites or services appear under it. This is like finding an unclaimed PO box and putting your own mail forwarding on it.

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 from Mozilla

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.