Subdomain Takeover in Azure: making a PoC
A subdomain's CNAME record pointed to an unclaimed Azure service, allowing an attacker to register that service name and take over the subdomain. The author describes how to claim the dangling Azure resource and serve a proof-of-concept page on the hijacked subdomain.
Diego Bernal Adelantado Follow
Published on godiego.co
As a bug bounty hunter, one of the vulnerabilities that are learned at the beginning of the road is a subdomain takeover. While the concept of it is simple, just register some domain that hasn’t been claimed but it’s being pointed to, the chances of finding one is nowadays difficult due to the automation some have…
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 DNS CNAME record for the subdomain pointed to an Azure service name that had not been registered, so anyone could register it.
Impact
An attacker could take over the subdomain and serve arbitrary content, which could be used for phishing or other attacks.
What the attacker needed
A dangling CNAME to an unclaimed Azure service; an Azure account
How it was found
- Use dig to check that the subdomain's CNAME points to an unclaimed Azure service.
- Create the matching Azure service (CloudApp, Website, VM, or TrafficManager) with the unclaimed name.
- Deploy a simple proof-of-concept page to the service.
- For Azure Websites, add the custom domain in the dashboard so the subdomain serves the PoC.
- Confirm the takeover with dig and by visiting the subdomain.
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 no longer exists or is unclaimed. Anyone who can register that same service name can then control what appears on the subdomain. This article explains how to claim several types of Azure services and put a simple page there to prove the takeover.
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.