Skip to content
Subdomain takeover Write-up Beginner

I Took Over Someone’s Subdomain and Put a Cat On It

A subdomain's DNS record still pointed at a third-party cloud CMS platform that no longer hosted the site, so anyone with a free account could claim the hostname and serve content under the target's domain. The author claimed it and served a page to prove control, but the report was marked duplicate.

medium.com

Published on medium.com

Bug Hunting

L4ZZ3RJ0D, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

This is a subdomain takeover write-up against a wildcard scope, referred to throughout as *.l4zz3rj0d.com. The target is not a single application but an entire wildcard scope: a parent domain whose subdomains are handed out across many services, teams and third-party platforms. That is exactly the environment where dangling DNS records accumulate, because nobody keeps a single inventory of every CNAME that was ever created.

The specific weakness is a CNAME record pointing into the shared infrastructure of a third-party cloud CMS platform. The subdomain no longer resolves to anything the owner controls, but the DNS record still exists, so anyone who can claim that hostname on the CMS platform can serve content under the target's domain.

Setup

The only tool named in the report is subzy, run against a pile of subdomains to check for dangling CNAME takeovers. No version is given. Follow-up verification used dig and curl, and the researcher notes that bypassing the certificate check was part of confirming the finding. Claiming the hostname required a free trial account on the third-party CMS platform.

The precondition for the whole exercise is a wildcard scope with a large number of subdomains.

Finding it

Running subzy against the subdomain list returned eight hosts flagged as vulnerable.

Eight flags is not eight findings. Six of them were plain Akamai edge nodes returning an ordinary 404. There was no dangling CNAME and no "domain not claimed" page, just a generic empty 404 that a pattern matcher had decided looked close enough to a real takeover signature. Those six were eliminated in about ten minutes of dig and curl.

That left two candidates:

  1. An Akamai edgekey record. Harder to verify, and the researcher judged it not worth the time that day.
  2. A CNAME pointing straight into a third-party cloud CMS platform's shared infrastructure.

The second one was the interesting case. The TLS handshake completed normally with a valid certificate, but the certificate's SAN list did not include the hostname being requested. That mismatch is the classic tell: the platform is answering for the hostname, but with a certificate issued for its own names, not for the target's subdomain.

Exploitation

Step 1: Confirm the dangling record

Bypassing the certificate check and reading the response body revealed a "Web Site Not Found" page inviting the visitor to add this domain to their account through the platform's own console.

That message is the confirmation. The DNS record still points at the platform, but no account on the platform has claimed the hostname. Whoever originally set it up decommissioned the app, migrated environments or otherwise moved on, and left the DNS record behind. Anyone with a free account on that platform could claim the hostname and serve arbitrary content under a domain that still shows l4zz3rj0d.com in the address bar.

Step 2: Claim the hostname

A dangling CNAME is not proof on its own. Programs want an actual claim: a live URL under the target subdomain, serving content the researcher controls. So the researcher signed up for the platform's free trial specifically to claim the domain.

The signup flow was built for enterprise sales leads rather than a five-minute proof of concept, requiring an office phone number, a company field and the rest of it. The report is explicit that this friction, not the vulnerability, was half the battle.

Step 3: Serve content and capture evidence

Once the hostname was claimed, the researcher put up a page. The report does not reproduce the page's markup or the requests used to publish it.

From the original on medium.com

The screenshot was captured as evidence of the claimed page.

Step 4: Clean up

A screenshot was captured and a timestamp logged, and the domain alias was removed within minutes. The claim was held only long enough to prove control.

Step 5: Report

The report covered the full chain: the DNS record, the certificate mismatch, the response body from the platform, and the live claim. It was submitted and marked duplicate. Someone else had found the exact same dangling record two days earlier.

No bounty and no first-blood credit, just a polite acknowledgement that it had already been reported.

Root cause

The root cause is an orphaned DNS record. A CNAME for a subdomain of l4zz3rj0d.com still points into a third-party CMS platform's shared infrastructure, but the corresponding hostname on that platform was released when the original application was decommissioned. The platform therefore treats the hostname as unclaimed and offers it to anyone who adds it to an account.

Nothing in the DNS layer prevents this. A CNAME is just an alias; it does not know or care whether the destination is still owned. The platform's own claim flow is designed to let new customers attach domains, so it will happily hand the hostname to the first person who asks. The only defence is process: removing DNS records when the service behind them is retired. That process failed here.

The certificate mismatch is a symptom rather than a cause: the platform serves a valid certificate for its own infrastructure, and the requested hostname is simply not in the SAN list because nobody has claimed it.

Impact

An attacker with a free account on the CMS platform could claim the hostname and serve arbitrary content under a subdomain of the target's domain. Because the address bar still shows the target's domain, that content inherits the target's brand and any trust users place in the domain. The report does not go further than that: it does not describe cookie scoping, phishing scenarios or any specific abuse beyond serving content the claimant chooses.

The condition is that the hostname remains unclaimed on the platform. Once someone claims it, the window closes.

Fix

The report does not state what the target changed. The fix implied by the finding is to remove the dangling CNAME, or to reclaim the hostname on the CMS platform so that it is no longer available to third parties. The durable fix is process: when a service is decommissioned, its DNS records are removed in the same change, and the subdomain inventory is checked periodically for records pointing at third-party infrastructure that no longer recognises the hostname.

Variants to test

The report's own lesson is that a scanner flag is the start of an investigation, not the end. Three things wear the same "VULNERABLE" label and need three different checks:

  1. Dangling CNAME to a CMS or hosting platform. Resolve the record with dig, then request the hostname with the certificate check bypassed. A positive result is a platform page saying the site is not found or inviting you to claim the domain, plus a certificate whose SAN list does not include the hostname.
  2. Orphaned edge record. The Akamai edgekey case in this report. The Akamai edgekey case in this report. The researcher judged it harder to verify and set it aside, which is a reasonable triage decision rather than a finding. The researcher judged this harder to verify and set it aside, which is a reasonable triage decision rather than a finding.
  3. Live but misconfigured API endpoint. A host that responds, but with behaviour that suggests it is not the intended service. Live but misconfigured API endpoint. The report names this as a distinct investigation but gives no further detail.

A generic 404 from an edge node is none of these. Before writing anything up, confirm the claim end to end: resolve the chain, check the certificate, read the body, and where the platform allows it, actually claim the hostname and serve a page you control. Then remove the claim and keep the screenshot and timestamp as evidence.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

A security researcher was testing a company's domain, the part of a web address after the @ in an email address. The company had given permission to test a whole family of subdomains at once, called a wildcard scope. A subdomain is a name that sits in front of the main domain, like shop.example.com or mail.example.com. A wildcard scope means the researcher was allowed to look at any subdomain of the main domain, not just one specific website.

The researcher ran a tool called subzy that checks lots of subdomains automatically for a specific mistake: a DNS record that points at a service nobody owns any more. DNS is the internet's address book. It translates a name like example.com into the numeric address of a server. One kind of DNS record, called a CNAME, is an alias: it says "this name is really just another name, go look over there instead". If the "over there" is a service that has been shut down but the alias was never deleted, the alias is said to dangle. Anyone who can take over that service can then serve their own content under the company's name.

The tool flagged eight subdomains as vulnerable. Six of them were false alarms: ordinary servers belonging to a content delivery network called Akamai, returning a normal "page not found" error. The researcher checked each one by hand and threw them out. One of the remaining two was hard to verify and was set aside. The last one was real: a CNAME pointing into a third-party website-building platform, where the subdomain had been released and could be claimed by anyone with a free account.

The researcher signed up for that platform, claimed the subdomain, put a page with a cat on it, took a screenshot, and removed the claim minutes later. The report was submitted and marked as a duplicate: someone else had found the same dangling record two days earlier. No bounty was paid. The lesson the researcher draws is that scanners are a starting point, not proof, and that verifying a finding yourself matters more than the reward.

The setup

The target here is not one website. It is a wildcard scope, written as *.l4zz3rj0d.com. The asterisk is a wildcard: it stands for "any subdomain you like". So the scope covers blog.l4zz3rj0d.com, api.l4zz3rj0d.com, dev.l4zz3rj0d.com and every other name under that parent. In a real programme this kind of scope is common when a company has many teams, each running its own services, often on outside platforms.

That setup is exactly where dangling DNS records pile up. Nobody keeps one complete list of every alias ever created, so when a team shuts a service down, the DNS record pointing at it is easy to forget.

The only tool named in the report is subzy, run against a pile of subdomains to look for dangling CNAME takeovers. No version is given. Follow-up checks used dig (a command-line tool for asking DNS questions) and curl (a command-line tool for fetching a web page). The researcher also bypassed the certificate check at one point, which I will explain when it comes up. Claiming the hostname needed a free trial account on the third-party platform.

Finding it

Running subzy against the subdomain list returned eight hosts flagged as vulnerable.

Eight flags is not eight findings. This is the first big lesson. An automated scanner is fast, but it is guessing from patterns, and it is often confidently wrong. Six of the eight were plain Akamai edge nodes, servers in a content delivery network that sit close to users and pass traffic along. They returned an ordinary 404, the standard "page not found" response. There was no dangling CNAME and no "domain not claimed" page, just a generic empty 404 that the scanner's pattern matcher had decided looked close enough to a real takeover signature.

Those six were eliminated in about ten minutes of dig and curl. dig asks the DNS system what a name actually points at, and curl fetches the page to see what the server says. Together they let the researcher check each flag by hand instead of trusting the tool.

That left two candidates:

  1. An Akamai edgekey record. This is a DNS record that points into Akamai's edge infrastructure in a way that is harder to verify. The researcher judged it not worth the time that day.
  2. A CNAME pointing straight into a third-party cloud CMS platform's shared infrastructure. A CMS, or content management system, is a service for building and publishing websites without writing code. "Shared infrastructure" means many customers' sites live on the same servers, and the platform decides which site to show based on the domain name in the request.

The second one was the interesting case. When the researcher connected to it, the TLS handshake completed normally with a valid certificate. TLS is the encryption layer behind the padlock in your browser: before any page loads, your browser and the server agree on encryption keys, and the server proves its identity with a certificate. A certificate lists the names it is valid for, in a field called the SAN list (Subject Alternative Name). Here the certificate was valid, but its SAN list did not include the hostname being requested. That mismatch is the classic tell: the platform is answering for the hostname, but with a certificate issued for its own names, not for the target's subdomain. It is like a hotel receptionist saying "yes, we have a room for you" while handing you a key card with a different hotel's logo on it.

Taking it over

Step 1: Confirm the dangling record

Bypassing the certificate check and reading the response body revealed a "Web Site Not Found" page inviting the visitor to add this domain to their account through the platform's own console.

Why bypass the certificate check? Because the browser (or curl) would normally refuse to continue when the certificate does not match the name. That refusal is correct behaviour for a normal user, but it hides the page behind it. For a researcher who already knows the certificate is for the platform's own names, skipping the check is safe and lets them see what the platform actually says.

That message is the confirmation. The DNS record still points at the platform, but no account on the platform has claimed the hostname. Whoever originally set it up decommissioned the app, migrated environments or otherwise moved on, and left the DNS record behind. Anyone with a free account on that platform could claim the hostname and serve arbitrary content under a domain that still shows l4zz3rj0d.com in the address bar.

Think of it as a flat that was vacated but whose name is still on the doorbell. The building manager will happily give the keys to the first person who asks, because as far as the building is concerned nobody lives there.

Step 2: Claim the hostname

A dangling CNAME is not proof on its own. Programmes want an actual claim: a live URL under the target subdomain, serving content the researcher controls. A screenshot of an error page proves the record is odd, but it does not prove that an attacker could take it over. Claiming it does.

So the researcher signed up for the platform's free trial specifically to claim the domain. The signup flow was built for enterprise sales leads rather than a five-minute proof of concept, requiring an office phone number, a company field and the rest of it. The report is explicit that this friction, not the vulnerability, was half the battle. In other words, the hard part was getting through a form designed for corporate buyers, not finding the flaw.

Step 3: Serve content and capture evidence

Once the hostname was claimed, the researcher put up a page. The report does not reproduce the page's markup or the requests used to publish it.

From the original on medium.com

The screenshot was captured as evidence of the claimed page. The point of the page is not the cat: it is that a URL under the target's domain now serves content the researcher chose. That is the proof a programme needs.

Step 4: Clean up

A screenshot was captured and a timestamp logged, and the domain alias was removed within minutes. The claim was held only long enough to prove control. The evidence is the screenshot and the timestamp, not a permanently hijacked page.

Step 5: Report

The report covered the full chain: the DNS record, the certificate mismatch, the response body from the platform, and the live claim. It was submitted and marked duplicate. Someone else had found the exact same dangling record two days earlier.

No bounty and no first-blood credit, just a polite acknowledgement that it had already been reported. Wildcard scopes get hammered by many researchers running the same handful of tools, and dangling CNAMEs do not hide well once you know where to look.

Why it happened

The root cause is an orphaned DNS record. A CNAME for a subdomain of l4zz3rj0d.com still points into a third-party CMS platform's shared infrastructure, but the corresponding hostname on that platform was released when the original application was decommissioned. The platform therefore treats the hostname as unclaimed and offers it to anyone who adds it to an account.

Nothing in the DNS layer prevents this. A CNAME is just an alias; it does not know or care whether the destination is still owned. The platform's own claim flow is designed to let new customers attach domains, so it will happily hand the hostname to the first person who asks. The only defence is process: removing DNS records when the service behind them is retired. That process failed here.

The certificate mismatch is a symptom rather than a cause: the platform serves a valid certificate for its own infrastructure, and the requested hostname is simply not in the SAN list because nobody has claimed it.

What an attacker could do

An attacker with a free account on the CMS platform could claim the hostname and serve arbitrary content under a subdomain of the target's domain. Because the address bar still shows the target's domain, that content inherits the target's brand and any trust users place in the domain.

The report does not go further than that: it does not describe cookie scoping, phishing scenarios or any specific abuse beyond serving content the claimant chooses. The condition is that the hostname remains unclaimed on the platform. Once someone claims it, the window closes.

How to fix it

The report does not state what the target changed. The fix implied by the finding is to remove the dangling CNAME, or to reclaim the hostname on the CMS platform so that it is no longer available to third parties. The durable fix is process: when a service is decommissioned, its DNS records are removed in the same change, and the subdomain inventory is checked periodically for records pointing at third-party infrastructure that no longer recognises the hostname.

Three things that look the same

The report's own lesson is that a scanner flag is the start of an investigation, not the end. Three things wear the same "VULNERABLE" label and need three different checks:

  1. Dangling CNAME to a CMS or hosting platform. Resolve the record with dig, then request the hostname with the certificate check bypassed. A positive result is a platform page saying the site is not found or inviting you to claim the domain, plus a certificate whose SAN list does not include the hostname.
  2. Orphaned edge record. The Akamai edgekey case in this report. The Akamai edgekey case in this report. The researcher judged it harder to verify and set it aside, which is a reasonable triage decision rather than a finding. The researcher judged this harder to verify and set it aside, which is a reasonable triage decision rather than a finding.
  3. Live but misconfigured API endpoint. An API is the interface a service exposes for programs to talk to it, rather than for people clicking pages. A host that responds, but with behaviour that suggests it is not the intended service, is a candidate. Live but misconfigured API endpoint. The report names this as a distinct investigation but gives no further detail.

A generic 404 from an edge node is none of these. Before writing anything up, confirm the claim end to end: resolve the chain, check the certificate, read the body, and where the platform allows it, actually claim the hostname and serve a page you control. Then remove the claim and keep the screenshot and timestamp as evidence.

Glossary

  • Wildcard scope: a testing permission that covers every subdomain of a parent domain, written with an asterisk such as *.example.com.
  • Subdomain: a name that sits in front of a main domain, like shop.example.com.
  • DNS: the internet's address book, translating names into the addresses of servers.
  • CNAME: a DNS record that makes one name an alias of another, saying "go look over there instead".
  • Dangling CNAME: a CNAME that points at a service which no longer exists or is no longer owned, leaving the alias free for someone else to claim.
  • Subdomain takeover: claiming a subdomain through a dangling record so that content you control appears under someone else's domain.
  • subzy: a tool that checks lists of subdomains for dangling CNAME takeovers.
  • dig: a command-line tool for asking DNS questions, such as what a name points at.
  • curl: a command-line tool for fetching a web page or other resource.
  • Akamai edge node: a server in Akamai's content delivery network, placed close to users to pass traffic along.
  • Edgekey record: a DNS record pointing into Akamai's edge infrastructure in a way that is harder to verify.
  • 404: the standard HTTP response meaning "page not found".
  • False positive: a scanner flag that turns out not to be a real problem.
  • CMS: content management system, a service for building and publishing websites without writing code.
  • Shared infrastructure: servers that host many customers' sites, with the platform choosing which site to show based on the domain name.
  • TLS handshake: the exchange at the start of an encrypted connection where browser and server agree on keys and the server proves its identity.
  • Certificate: a file a server presents to prove which names it is allowed to serve, shown by the padlock in a browser.
  • SAN list: the Subject Alternative Name field of a certificate, listing the names it is valid for.
  • Certificate check bypass: telling a client to continue even though the certificate does not match the requested name, so the page behind it can be read.
  • Response body: the actual content a server sends back, as opposed to its status code or headers.
  • API: an interface a service exposes for programs to talk to it, rather than for people clicking pages.
  • Duplicate: a report marked as already submitted by someone else, so no reward or credit is given.
  • Bounty: a payment made by a programme for a valid security report.
  • First-blood credit: recognition for being the first person to report a particular issue.

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.