Skip to content
Subdomain takeover Write-up Beginner

How I Found and Claimed a Subdomain Takeover (My First Article)

A subdomain's DNS CNAME pointed to a Heroku hostname with no active app bound, allowing an attacker to claim the Heroku app and serve content under the legitimate subdomain. The author demonstrated this by creating a Heroku app and binding the custom domain, then reported it to the bug bounty program.

medium.com

Published on medium.com

I run a daily automated reconnaissance pipeline across wildcard bug bounty programs (HackerOne, Bugcrowd, Intigriti, YesWeHack). The pipeline enumerates subdomains, checks for takeover candidates, and runs Nuclei templates.

cyber_wizard, on medium.com

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 was left pointing to a third-party service (Heroku) after the associated app was deleted or never created, and the service allowed anyone to claim that hostname.

Impact

An attacker could host arbitrary content under the legitimate subdomain, which could be used for phishing, hosting malicious scripts, or impersonating the owner domain.

What the attacker needed

Wildcard bug bounty program; automated reconnaissance pipeline; Heroku account

The fix

The DNS CNAME record should be removed or updated to point to an active resource, and unused third-party service bindings should be cleaned up.

How it was found

  1. Run automated reconnaissance to enumerate subdomains and identify takeover candidates.
  2. Verify the DNS CNAME points to a third-party service with no active resource.
  3. Create an account on the third-party service and provision a new app.
  4. Add the target subdomain as a custom domain to the new app.
  5. Deploy a simple page and confirm the subdomain now serves the attacker's content.
  6. Collect evidence (DNS output, HTTP status before and after) and report to the bug bounty program.

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 company's subdomain (like blog.example.com) points to an external service (like Heroku) that is no longer in use. If an attacker can sign up for that same service and claim the unused name, they can put their own content on the company's subdomain. This can be used for phishing or spreading malware while looking legitimate.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Subdomain takeover

The lesson behind this report.

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.