Subdomain Surfing to Server Secrets ππ β How I Took Over a Forgotten Subdomain
An old subdomain had a DNS record pointing to an unused IP, and the author claims to have taken it over by setting up a CNAME to their own server. Separately, the subdomain exposed an environment file and a database backup containing credentials and keys.
Free Linkπ
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 for a forgotten subdomain plus publicly accessible backup and configuration files.
Impact
The author claims they could capture credentials, tokens, and session cookies from users visiting the taken-over subdomain, though no actual capture is shown.
What the attacker needed
Forgotten subdomain with dangling DNS; publicly accessible backup/config files; ability to set up a CNAME record
How it was found
- Run subdomain discovery and live-host checks to find oldapp.target.com.
- Run directory brute-force to discover /config/.env and /assets/db_backup.zip.
- Download and unzip the backup to obtain a database dump, another .env file, and old API keys.
- Check DNS records and find that oldapp.target.com points to an unused IP.
- Set up a CNAME record pointing the subdomain to a controlled server.
- Host a simple redirect page to log traffic and capture credentials, tokens, or cookies.
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 prefix like 'oldapp' added to a main domain. If its DNS record points to a server that no longer exists, an attacker can sometimes claim that name and control what visitors see. Here, the author also found a configuration file and a backup archive left publicly accessible on the same 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.