How I was able to take over a Subdomain and got Hall of Fame
A subdomain of a target was pointing to GitHub Pages but the corresponding GitHub repository was unclaimed, allowing an attacker to claim it and host content under the target's domain. The author successfully took over the subdomain and displayed their name and LinkedIn profile on the live website.
Hi, I’m Rivek Raj Tamang (RivuDon), a Security Researcher, Bug Hunter, and an Ethical Hacker currently pursuing Master’s in Cybersecurity.
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
Impact
An attacker could host malicious content under the target's domain, potentially damaging reputation or phishing users.
What the attacker needed
Subdomain points to unclaimed GitHub Pages; attacker has GitHub account
The fix
The organisation should remove the dangling DNS record or reclaim the GitHub Pages repository.
How it was found
- Collected a list of subdomains for the target.
- Checked which subdomains returned a 404 error.
- Used nslookup to check the CNAME of the 404 subdomains and looked for external services like GitHub.
- Ran a nuclei template for subdomain takeover and got a hit.
- Manually verified the subdomain was vulnerable by checking it showed a 404 error.
- Followed instructions to set up a GitHub Pages site and claimed 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 is a part of a website's address, like blog.example.com. Sometimes a company points a subdomain to an external service like GitHub Pages but forgets to keep the account on that service, so anyone can claim it and put their own content there. This is called a subdomain takeover, and it lets an attacker show their own pages under the company's trusted domain.
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.