Skip to content
Subdomain takeover Disclosed report Beginner

Subdomain takeover due to unclaimed Amazon S3 bucket on a2.bime.io

A DNS entry for a subdomain pointed to an Amazon S3 bucket that no longer existed, allowing an attacker to claim the bucket and host a fake login page. An attacker could harvest credentials by tricking users into visiting the fake page on the trusted subdomain.

michiel Follow

Originally disclosed on HackerOne

  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 3 months

I noticed BIME is primarily built on Amazon AWS, which spawned my interest. I started looking for DNS entries that were still pointing to S3 buckets that however no longer exist. It appears this was the case for a2.bime.io, which points to an Amazon S3 website bucket in the US East region.

Steps to Reproduce

  • Resolve a2.bime.io and see what is behind it:
michiel@msp ~ $ dig A a2.bime.io @8.8.8.8                                                                                                [2.1.8]

; <<>> DiG 9.9.5-11ubuntu1.2-Ubuntu <<>> A a2.bime.io @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 730
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;a2.bime.io.			IN	A

;; ANSWER SECTION:
a2.bime.io.		59	IN	CNAME	bimeio.s3-website-us-east-1.amazonaws.com.
bimeio.s3-website-us-east-1.amazonaws.com. 59 IN CNAME s3-website-us-east-1.amazonaws.com.
s3-website-us-east-1.amazonaws.com. 4 IN A	54.231.11.130

;; Query time: 210 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Mar 08 15:33:45 EST 2016
;; MSG SIZE  rcvd: 124
  • It points to an Amazon S3 bucket in the S3 US East 1 region. Visiting http://a2.bime.io revealed that the bucket did not exist (a 404 error was shown). Obviously this is not the case any longer, as the bucket is now claimed and serving a fake login page (see "Attack Scenario").
  • I created a bucket with name "a2.bime.io" on my S3 account in the US East 1 region.
  • I enabled static website hosting and pointed "index.html" as the index document.
  • Then I uploaded index.html (attached to this report) and clicked "Make public" to make sure it can be served.
  • Now go to http://a2.bime.io and you will see a BIME login page. Click the Sign In button and you will notice it is a fake login form.

Attack Scenario

I created a false login page and posted it on http://a2.bime.io. The login page looks just like the normal BIME sign in page, but it is 100% controlled by the attacker. The attacker could harvest logins by convincing their victims to visit the fake login page. Since it is a subdomain of bime.io, which BIME customers will recognize, it is likely they will fall for the attack.

I have attached the fake login page here as index.html.

Remediation

Remove the a2.bime.io DNS entry so it no longer points to an S3 bucket Zendesk Ops doesn't control. If you need me to release a2.bime.io as an S3 bucket, let me know and I'll delete the bucket.

The original report as published on HackerOne, by michiel. 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 the DNS record for the subdomain was not removed after the S3 bucket it pointed to was deleted, leaving a dangling reference that anyone could claim.

Impact

An attacker could host a fake login page on a trusted subdomain to harvest credentials from users who are tricked into visiting it.

What the attacker needed

Victim visits the fake login page; attacker can create an S3 bucket

The fix

The DNS entry should be removed so it no longer points to an S3 bucket that the organisation does not control.

How it was found

  1. Resolve the subdomain to see where it points.
  2. Observe that it points to an S3 bucket that returns a 404 error.
  3. Create a new S3 bucket with the same name in the same region.
  4. Enable static website hosting and set an index document.
  5. Upload a fake login page and make it public.
  6. Visit the subdomain to see the fake login page.

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 is a part of a website address, like 'blog.example.com'. Here, a subdomain was set up to show content from an Amazon S3 storage bucket, but that bucket was deleted. Anyone can create a new bucket with the same name, so an attacker did exactly that and put a fake login page there. Because the address still looked like the real company's site, users might enter their passwords.

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 michiel

View all

5 more disclosed reports, best first.

More from Bime

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.