Skip to content
Subdomain takeover Write-up Intermediate

How I Took Over 2 Subdomains with Azure CDN Profiles

Two subdomains had CNAME records pointing to unclaimed Azure CDN profile domains, allowing an attacker to register those profiles and serve content on the in-scope subdomains. The attacker could then host their own content under the organisation's domain.

m0chan Follow

Published on m0chan.github.io

## How I Took Over 2 Subdomains with Azure CDN Profiles

m0chan, on m0chan.github.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the organisation left dangling CNAME records pointing to Azure CDN profile endpoints that were no longer registered, allowing anyone to claim them.

Impact

An attacker could serve arbitrary content on two in-scope subdomains, potentially enabling phishing or other attacks under the organisation's domain.

What the attacker needed

Wildcard scope program; free Azure account; dangling CNAME to azureedge.net

The fix

The organisation should remove dangling CNAME records or reclaim the Azure CDN profiles to prevent takeover.

How it was found

  1. Enumerate subdomains and find ones with CNAME records pointing to azureedge.net domains that return NXDOMAIN.
  2. Create a free Azure account and a new CDN Profile.
  3. Configure a CDN endpoint using the previously enumerated azureedge.net domain; if it shows green, it is vulnerable.
  4. Set a custom domain in the CDN Profile to the original vulnerable domain.
  5. Point the CDN Profile to your own web server hosting a proof-of-concept page.
  6. Access the original in-scope domain, which resolves through the CNAME to your server.

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 write-up has not been written yet. The Original tab links to the source.

A subdomain takeover happens when a website's subdomain points to an external service that is no longer in use. If an attacker can claim that same service name, they can control what appears on the subdomain. Here, the subdomains pointed to Azure CDN profiles that were free to register, so the attacker could take them over.

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 m0chan

View all

1 more disclosed report, best first.

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.