Skip to content
Subdomain takeover Write-up Beginner

The unexpected bounty: A story of Zendesk takeover on REDACTED.com

A subdomain of the target company pointed via a CNAME record to an unclaimed Zendesk help centre, so the author could register a new Zendesk account and take control of the subdomain. Because the company's customers were still sending support tickets to that portal, the attacker could receive their messages and also host content on the trusted subdomain.

wis4nggeni Follow

Published on medium.com

{{media:0}}

wis4nggeni, 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. 5 min read.

Context

This is a story about a subdomain takeover on a Zendesk help centre. The target was a company the author calls REDACTED.com, reached through a subdomain enumeration exercise rather than through a formal programme. The company had no bug bounty programme and no security contact published on its website, so the report was sent on good faith to an address obtained indirectly.

The affected host was support.REDACTED.REDACTED.com. Normally a Zendesk-hosted help centre serves the organisation's support portal: customers submit tickets there, and the organisation's agents answer them. When the Zendesk instance behind a hostname is no longer claimed, the hostname can still resolve to Zendesk, and anyone who registers a Zendesk account can claim the instance and serve content on that hostname.

Setup

The author was between targets, having received a duplicate on a previous XSS report, and picked this company after a LinkedIn connection request from a person whose bio described her as a Talent Acquisition Specialist at REDACTED.com. The only tooling mentioned is subdomain enumeration and the dig command. No versions are given. The precondition for the takeover is the one described above: a DNS record pointing at Zendesk for an instance that is unclaimed or no longer exists.

Finding it

After some subdomain enumeration the author found support.REDACTED.REDACTED.com interesting. Visiting it returned a page that looked like a Zendesk help centre which was not claimed or no longer existed.

Image for post
Image for post From the original on medium.com

That page is the signal: the hostname resolves and Zendesk answers, but no account owns the instance behind it. The author then confirmed where the hostname pointed with dig and obtained the CNAME record.

Image for post
Image for post From the original on medium.com

Exploitation

Step 1: confirm the dangling CNAME

The dig output shows the CNAME record for the subdomain pointing at Zendesk. A CNAME to a third-party SaaS provider whose instance is unclaimed is the classic precondition for takeover: control of the DNS record is not needed, only control of the unclaimed instance at the provider.

Step 2: claim the instance

After reading the Zendesk documentation, the author registered a new account and took over the subdomain. Registering the Zendesk instance that matches the hostname is what completes the takeover: from then on, requests to support.REDACTED.REDACTED.com are served by the author's instance.

Step 3: stored XSS through the help centre

Once in control, the author enabled SSL to stop the redirect, then created a guide HTML page containing an XSS payload. That produced stored XSS on the taken-over hostname.

The report does not include the payload itself, only the description of the technique: a help centre article (guide) whose HTML content carries script, served from the victim's subdomain once SSL is enabled so the redirect no longer interferes.

Step 4: observe live traffic

The author did not report immediately, because the company had no bug bounty programme and no security contact could be found on the website. Days later, the claimed portal started receiving tickets from the company's customers, around 10 of them. The portal was still in use: tickets from customers were being forwarded to it from the main, separate website.

Image for post
Image for post From the original on medium.com
Image for post
hmm…

That is the point where the impact stops being theoretical. Real customer support traffic was landing in an instance controlled by the researcher.

Step 5: report through a non-standard channel

The author asked the Talent Acquisition Specialist from LinkedIn where the vulnerability could be reported. She supplied an email address for their security team, and the report was sent immediately, motivated by the flood of customer tickets.

Root cause

The design mistake is a dangling DNS record: support.REDACTED.REDACTED.com was left as a CNAME to a Zendesk instance that was no longer claimed. Zendesk, like other SaaS providers, lets anyone register an instance, so an unclaimed instance name is effectively free real estate on the customer's own hostname. The record still pointed at a Zendesk instance that was no longer claimed. The stored XSS is a consequence of the takeover rather than an independent bug: control of the help centre content is control of the pages served on that origin.

Impact

The author could serve arbitrary content on the company's subdomain, including a stored XSS payload, and could read customer support tickets that were still being forwarded to the portal from the main website. The report does not enumerate what data the tickets contained. The practical risk is phishing and credential theft on a trusted hostname, plus exposure of customer communications. The company validated the report as High severity.

Fix

The report does not describe the remediation the company performed. The general fix for this class is to remove or repoint the dangling CNAME, and to keep an inventory of third-party SaaS hostnames so that records are cleaned up when an instance is decommissioned.

Variants to test

  1. Enumerate subdomains and resolve each one; a CNAME to a SaaS provider (Zendesk, and similar helpdesk or marketing platforms) whose landing page says the instance is unclaimed is a candidate. A positive result is a provider page offering to let you register that instance name.
  2. Check hosts that return provider error pages rather than the customer's content; those often indicate a lapsed or misconfigured instance.
  3. After claiming an instance, test whether the provider lets you enable SSL and publish HTML content, which is what turns the takeover into stored XSS on the victim origin.
  4. Watch for live traffic after claiming: if tickets, form submissions or password resets arrive, the hostname is still referenced by the production site, which raises the severity.

Timeline

Date Event
17 January 2020 Report sent
20 January 2020 Report validated with High severity; bank details requested for the reward
23 January 2020 Bounty paid; limited disclosure request approved

The author notes this was the fastest bounty received so far, roughly a week after the report, and the first of 2020.

Image for post
Image for post From the original on medium.com

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. 10 min read.

What happened, in plain words

A security researcher found that a company's support website, a help centre run by a service called Zendesk, had been left pointing at an empty Zendesk account that nobody owned. Because Zendesk lets anyone create an account for free, the researcher was able to register the matching account and, in effect, become the owner of that part of the company's website. Customers were still sending support requests to it, so real messages from real customers started arriving in the researcher's inbox. The researcher reported the problem to the company, which had no bug bounty programme, and the company paid a reward anyway.

This article walks through the whole story from the beginning, explaining each idea as it appears. You only need to be comfortable using a browser.

The background ideas

Before the story, a few words that come up constantly.

Subdomain. A website address like example.com can have smaller addresses in front of it, such as support.example.com or shop.example.com. These are subdomains. Companies use them to split different services onto different addresses: one for the shop, one for support, one for the blog. To a visitor they look like separate sites, but they belong to the same company.

DNS. The internet's address book. When you type a name like support.example.com, your computer asks DNS where that name actually lives. DNS answers with a record, which is a line of information about the name.

CNAME record. One kind of DNS record. It means "this name is another name for that name". It is like a mail forwarding note: post sent to your old address gets redirected to your new one. Companies often use CNAMEs to point a subdomain at an outside service they rent, such as a helpdesk, instead of running the service themselves.

SaaS. Short for Software as a Service: software you rent from another company over the internet instead of installing on your own machines. Zendesk is one: it hosts help centres for other companies.

Zendesk help centre. A ready-made support website. A company signs up with Zendesk, gets a help centre, and its customers use it to open support requests, called tickets. The company's staff answer those tickets from the same place.

Subdomain takeover. The vulnerability in this story. It happens when a company's subdomain still points, via DNS, at an outside service account that the company no longer owns or has abandoned. If the outside service lets anyone sign up and claim that account name, a stranger can claim it and start serving their own content on the company's subdomain. The company's DNS record was never updated, so visitors still arrive at the company's address, but a stranger is now answering.

XSS (cross-site scripting). A class of bug where an attacker gets their own code, usually JavaScript, to run inside a page that visitors trust. "Stored" XSS means the malicious content is saved on the server, so every visitor who loads the page runs it. JavaScript is the programming language browsers use to make pages interactive; if a stranger can run their JavaScript on a company's page, they can do things on behalf of that page's visitors.

SSL. The padlock in your browser's address bar. It encrypts the connection between browser and website. In this story it matters for a different reason: a help centre without SSL set up tends to redirect visitors elsewhere, and enabling SSL stopped that redirect so the researcher's page would actually load.

Bug bounty programme. A formal scheme where a company publishes rules and pays researchers for reporting security problems. Many companies do not have one, which is why this story is unusual.

How it started

The author had been working on other targets and had just received a duplicate on a previous report about XSS. A duplicate means someone else had already reported the same issue. The author decided to take a break from the main targets and look at a different company instead, referred to here as REDACTED.com.

The lead came from an unexpected place: a LinkedIn connection request. The person's profile described her as a Talent Acquisition Specialist at REDACTED.com. A Talent Acquisition Specialist is a recruiter, someone who hires staff. Nothing about her role suggests security work; she simply happened to work at the company, and that was enough to put it on the author's radar.

wis4nggeni
wis4nggeni From the original on medium.com

Finding the subdomain

The author ran subdomain enumeration: the process of discovering which subdomains a company has. You can think of it as trying many possible front doors, like support., shop., blog., to see which ones exist. One of the discovered names was support.REDACTED.REDACTED.com, and it looked interesting.

Visiting that address returned a page that looked like a Zendesk help centre which was not claimed or no longer existed.

Image for post
Image for post From the original on medium.com

That page is the signal. The name still works, and Zendesk still answers on it, but no account owns the help centre behind it. In everyday terms: the company's post is still being delivered to a rented mailbox, but nobody is paying for the mailbox any more, so anyone could walk in and take it over.

To confirm where the name actually pointed, the author used dig, a command-line tool that asks DNS questions and prints the answers. The dig output showed the CNAME record for the subdomain pointing at Zendesk.

Image for post
Image for post From the original on medium.com

A CNAME pointing at an outside service whose account is unclaimed is the classic precondition for a takeover. The important part: the attacker does not need to touch the company's DNS at all. The record already does the work of sending visitors to the outside service, and the outside service is the part that can be claimed.

Taking it over

Step 1: confirm the dangling CNAME

The dig result is the confirmation. "Dangling" means the record points at something that is no longer held by anyone. The author now knew the subdomain was a CNAME to Zendesk, and that the Zendesk instance behind it was unclaimed.

Step 2: claim the instance

After reading the Zendesk documentation, the author registered a new account and took over the subdomain. This is the heart of the attack and it is surprisingly simple: Zendesk, like many SaaS providers, lets anyone create an account, and the account name is chosen by whoever signs up first. Because the company had abandoned its instance, the name was free. Registering the matching instance is what completes the takeover: from then on, requests to support.REDACTED.REDACTED.com were served by the author's instance, not the company's.

Step 3: stored XSS through the help centre

Once in control, the author enabled SSL to stop the redirect, then created a guide HTML page containing an XSS payload. That produced stored XSS on the taken-over hostname.

A help centre lets its owner publish articles, and those articles can contain HTML, the language web pages are written in. If the article content is not cleaned properly, HTML can carry script, and script runs in the browser of everyone who reads the page. Because the page is served from the company's own subdomain, visitors have no reason to suspect it. The report describes the technique but does not include the payload itself.

Step 4: observe live traffic

The author did not report immediately. The company had no bug bounty programme, and no security contact could be found on its website, so there was no obvious place to send a report.

Days later, the claimed portal started receiving tickets from the company's customers, around 10 of them. The portal was still in use: tickets from customers were being forwarded to it from the main, separate website. In other words, the company's real website still had a link or form sending support requests to the abandoned address, and those requests now landed with the researcher.

Image for post
Image for post From the original on medium.com
Image for post
hmm…

Real customer support traffic was arriving in an instance controlled by the researcher.

Step 5: report through a non-standard channel

With no security contact published, the author went back to the recruiter from LinkedIn and asked where the vulnerability could be reported. She supplied an email address for the company's security team, and the report was sent immediately, motivated by the flood of customer tickets.

Why it happened

The design mistake is a dangling DNS record. support.REDACTED.REDACTED.com was left as a CNAME to a Zendesk instance that was no longer claimed. Zendesk, like other SaaS providers, lets anyone register an instance, so an unclaimed instance name is effectively free real estate on the customer's own hostname. The record still pointed at a Zendesk instance that was no longer claimed.

The stored XSS is a consequence of the takeover rather than a separate bug. Once you control the help centre content, you control the pages served on that address, and anything those pages can do.

What the impact was

The author could serve arbitrary content on the company's subdomain, including a stored XSS payload, and could read customer support tickets that were still being forwarded to the portal from the main website. The report does not say what data the tickets contained.

The practical risk is phishing and credential theft on a trusted hostname, plus exposure of customer communications. Phishing means tricking people with a page that looks genuine; here the page really was on the company's address, which makes the trick far more convincing. The company validated the report as High severity.

The fix

The report does not describe the remediation the company performed. The general fix for this class of problem is to remove or repoint the dangling CNAME, and to keep an inventory of third-party SaaS hostnames so that records are cleaned up when an instance is decommissioned. In plain terms: keep a list of every outside service your subdomains point at, and when you stop paying for one, delete the DNS record the same day.

How to look for the same thing

  1. Enumerate subdomains and resolve each one. A CNAME to a SaaS provider (Zendesk, and similar helpdesk or marketing platforms) whose landing page says the instance is unclaimed is a candidate. A positive result is a provider page offering to let you register that instance name.
  2. Check hosts that return provider error pages rather than the customer's content; those often indicate a lapsed or misconfigured instance.
  3. After claiming an instance, test whether the provider lets you enable SSL and publish HTML content, which is what turns the takeover into stored XSS on the victim origin.
  4. Watch for live traffic after claiming: if tickets, form submissions or password resets arrive, the hostname is still referenced by the production site, which raises the severity.

Timeline

Date Event
17 January 2020 Report sent
20 January 2020 Report validated with High severity; bank details requested for the reward
23 January 2020 Bounty paid; limited disclosure request approved

The author notes this was the fastest bounty received so far, roughly a week after the report, and the first of 2020. The reward came as a surprise: the company had no bug bounty programme, and a simple thank you would have been enough.

Image for post
Image for post From the original on medium.com

Glossary

  • Subdomain: a smaller address in front of a company's main domain, such as support.example.com, used to separate different services.
  • DNS: the internet's address book, which tells a computer where a name like support.example.com actually lives.
  • CNAME record: a DNS record meaning "this name is another name for that name", like a mail forwarding note.
  • Dangling CNAME: a CNAME pointing at an outside service account that nobody owns any more.
  • SaaS: Software as a Service; software rented from another company over the internet, such as a hosted helpdesk.
  • Zendesk: a SaaS provider that hosts help centres for other companies.
  • Help centre: a ready-made support website where customers open tickets and staff answer them.
  • Ticket: a customer support request, usually carrying the customer's details and their problem.
  • Subdomain takeover: claiming an abandoned outside service account that a company's subdomain still points at, so that the company's address serves the attacker's content.
  • XSS (cross-site scripting): a bug where an attacker's code runs inside a page that visitors trust.
  • Stored XSS: XSS where the malicious content is saved on the server and runs for every visitor who loads the page.
  • JavaScript: the programming language browsers use to make pages interactive.
  • HTML: the language web pages are written in.
  • SSL: the padlock in the address bar; it encrypts the connection between browser and website.
  • dig: a command-line tool that asks DNS questions and prints the answers.
  • Subdomain enumeration: the process of discovering which subdomains a company has.
  • Duplicate: a report closed because someone else already reported the same issue.
  • Phishing: tricking people with a page that looks genuine in order to steal information.
  • Severity: a rating of how serious a security problem is, here High.
  • Limited disclosure: publishing details of a report only after, or only partly, with the company's agreement.

More by wis4nggeni

View all

3 more disclosed reports, best first.

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.