“Day 17: The Ghost in the DNS — How I Turned a Forgotten Subdomain into a Ransomware Vector”
A forgotten subdomain pointed to a deleted Zendesk trial, allowing an attacker to claim the same Zendesk instance and serve content on the legitimate domain. The attacker could then host phishing pages, set cookies for the parent domain, and distribute ransomware.
Published on infosecwriteups.com
Last month, a routine scan for a client revealed a single, forgotten subdomain: helpdesk.coolstartup.com. It pointed to a long-defunct Zendesk trial.
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 record for the subdomain was not removed after the third-party service instance was deleted, leaving a dangling CNAME that could be claimed by anyone.
Impact
The attacker could host phishing pages on the legitimate domain, set cookies for the parent domain to potentially hijack sessions, and distribute ransomware via a fake security update.
What the attacker needed
A forgotten subdomain pointing to a deleted service; attacker can sign up for the same service
The fix
The text recommends removing DNS records before cancelling any SaaS subscription and regularly auditing DNS records.
How it was found
- Find subdomains and their CNAME records using tools like subfinder and dnsx.
- Check if the CNAME target resolves; if not, it is a candidate for takeover.
- Sign up for the same third-party service and claim the subdomain name.
- The subdomain now serves attacker-controlled content.
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 helpdesk.example.com. If a company stops using a service but leaves the subdomain pointing to it, someone else can sign up for that service and take over the subdomain. This lets them show fake pages on the real company's address, which can trick people.
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.