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.
## How I Took Over 2 Subdomains with Azure CDN Profiles
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
- Enumerate subdomains and find ones with CNAME records pointing to azureedge.net domains that return NXDOMAIN.
- Create a free Azure account and a new CDN Profile.
- Configure a CDN endpoint using the previously enumerated azureedge.net domain; if it shows green, it is vulnerable.
- Set a custom domain in the CDN Profile to the original vulnerable domain.
- Point the CDN Profile to your own web server hosting a proof-of-concept page.
- 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.