Subdomain takeover of ████
A subdomain's DNS record pointed to an unclaimed Azure CDN endpoint, allowing an attacker to register that endpoint and serve arbitrary content on the subdomain. The attacker could host malicious pages that appear to belong to the legitimate domain, potentially stealing cookies or distributing malware.
- Triaged in 10 hours
- Fixed in 21 days
- Disclosed after 22 days
Summary: I was able to claim the subdomain: ████ using Microsoft Azure ( CDN profiles)
Description:
Impact
Platform(s) Affected: Subdomain Azure CDN
Step-by-step Reproduction Instructions
- Using dig, I was able to determine that the subdomain '███████' was vulnerable to takeover. The record showed status: NXDOMAIN and was pointing to the CNAME: █████.
- Using this information, I was able to create a new Azure CDN Profile with the name '██████████'. This would resolve to the CNAME record mentioned above.
- I then created a Web App domain through Azure where I uploaded a small proof html file through FTP, I then set the CDN's origin type to WebApp and selected the url that I created earlier, this would serve the proof file (█████/proof.html) , Last and final step I set the custom domain to ███████ and enabled ssl.
- I was then able to view the uploaded site at https://████████/proof.html
Suggested Mitigation/Remediation Actions
To mitigate this issue you can:
Remove the DNS record from the DNS zone if it is no longer needed. Claim the domain name in a permanent DNS record so it cannot be used elsewhere.
Impact
This is extremely vulnerable to attacks as a malicious user could create any web page with any content and host it on the ████ domain. This would allow them to post malicious content which would be mistaken for a valid site. They could steal cookies, bypass domain security, steal sensitive user data, malware distribution, etc.
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 a dangling DNS record (CNAME) pointing to an unclaimed Azure CDN endpoint, which an attacker could register.
Impact
A malicious user could host any content on the subdomain, potentially stealing cookies, bypassing domain security, stealing sensitive data, or distributing malware.
What the attacker needed
Azure account; DNS record pointing to unclaimed Azure CDN
The fix
The DNS record should be removed if no longer needed, or the domain should be claimed in a permanent DNS record to prevent others from using it.
How it was found
- Used dig to check the subdomain and found it returned NXDOMAIN and pointed to a CNAME.
- Created a new Azure CDN Profile with the same name as the CNAME target.
- Created an Azure Web App, uploaded a proof HTML file via FTP, and set the CDN origin to that Web App.
- Set the custom domain to the vulnerable subdomain and enabled SSL.
- Viewed the uploaded proof file at the subdomain's URL.
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's address, like blog.example.com. If that subdomain's DNS record points to a service that no longer exists, someone else can sign up for that service and take control of the subdomain. This report shows how an attacker did exactly that with an Azure CDN profile.
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.