*How Hackers Can Take Over a Company’s Subdomain | Abhishek Bhujang*
A company left a DNS record pointing to a deleted cloud storage bucket, allowing an attacker to claim that bucket and serve content on the company's subdomain. An attacker could host fake login pages or intercept data on the trusted subdomain.
Published on osintteam.blog
Imagine visiting a company’s website, say files.example.com, expecting to see important documents. Instead, you find a page that says, “This subdomain has been hacked!” How did this happen?
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 a dangling DNS record that still points to a cloud storage bucket that no longer exists, allowing anyone to register that bucket name.
Impact
An attacker could host fake login pages to steal credentials, intercept cookies, and damage the company's reputation.
What the attacker needed
A subdomain with a dangling DNS record; the external service allows claiming the name; attacker has an account on the cloud provider
The fix
Companies should regularly audit DNS records and remove pointers to decommissioned external services.
How it was found
- Find a subdomain that shows a specific error message indicating a missing cloud storage bucket.
- Check the error message against a list of vulnerable services to confirm exploitability.
- Create an account on the cloud provider and create a new storage bucket with the exact same name as the subdomain.
- Upload a file and configure the bucket to be publicly accessible and act as a website.
- Visit the subdomain to see the uploaded content, confirming takeover.
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 is a part of a website address, like files.example.com. If a company points that subdomain to an external service and later deletes the service but forgets to remove the pointer, someone else can claim the same service name and control what appears on the subdomain.
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.