Skip to content
Subdomain takeover Disclosed report Beginner

Subdomain takeover on happymondays.starbucks.com due to non-used AWS S3 DNS record

A DNS CNAME record for a Starbucks subdomain pointed to an unused AWS S3 bucket, allowing anyone to claim the bucket and serve arbitrary content on that subdomain. An attacker could host fake login forms, obtain a valid SSL certificate, and potentially read cookies.

dpgribkov Follow

Originally disclosed on HackerOne

  • Triaged in 15 hours
  • Fixed in 15 hours
  • Paid in 15 hours
  • Disclosed after 20 days

Hi,

I discovered that happymondays.starbucks.com DNS CNAME record is pointing to S3 AWS bucket which doesn't exist. Here's the screenshot of vulnerable domain:

Screenshot_from_2016-11-30_00-50-20.png
Screenshot_from_2016-11-30_00-50-20.png From the original on HackerOne

As happymondays.starbucks.com was free to register on AWS S3 service and DNS-setup is already correct set-up:

Screenshot_from_2016-11-30_00-58-45.png
Screenshot_from_2016-11-30_00-58-45.png From the original on HackerOne

I was able to claim the domain for PoC using the following set-up:

Screenshot_from_2016-11-30_01-02-09.png
Screenshot_from_2016-11-30_01-02-09.png From the original on HackerOne

Also I have placed a two files located under root directory for validation:

Screenshot_from_2016-11-30_01-08-17.png
Screenshot_from_2016-11-30_01-08-17.png From the original on HackerOne

For mitigation you should immediately remove the DNS-entry for this domain.

As you might consider, the impact of this are pretty significant. I now can publish whatever I want on this domain, even fetching httpOnly cookies. I would also be able to register SSL certificate for this domain through Let's Encrypt (it is only need meta/file verification to issue the certificate) That would end up with the ability to read secure cookies as well.

In addition, there's no way at all for a visitor of this page to validate that the content on this domain is not served by Starbucks, making it extremely easy to utilize this for targeting the organization by fake login forms / spear phishing using your own domain to plant the attack.

Cheers, Danil

The original report as published on HackerOne, by dpgribkov. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a dangling DNS CNAME record pointing to a decommissioned S3 bucket that was not removed.

Impact

An attacker could publish arbitrary content on the subdomain, potentially obtain a valid SSL certificate, read cookies, and conduct phishing using the trusted domain.

What the attacker needed

DNS CNAME points to unused S3 bucket; Attacker can register the bucket name

The fix

The DNS entry for the subdomain should be removed immediately.

How it was found

  1. Discover that the subdomain's CNAME points to a non-existent S3 bucket.
  2. Register the free S3 bucket name.
  3. Upload files to the bucket root to prove control.
  4. Place files in the bucket root as validation of control.

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 report has not been written yet. The Original tab links to the source.

A subdomain takeover happens when a company's web address points to a service (like cloud storage) that is no longer in use. If an attacker can register that same service name, they control what appears at the company's address. Here, the address pointed to an empty storage bucket, so the researcher claimed it and could put any content there.

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.

More by dpgribkov

View all

2 more disclosed reports, best first.

More from Starbucks

View all

The newest disclosed reports for this program.

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.