Bug Bounty Story of protector47 How He Earned $1,500 in Just 15 Mins Due to Amazon S3 Bucket Misconfiguration

Today I am gonna share an interesting finding through which Muhammad Asim Shahzad a.k.a protector47 earned $1,500 in just 15 mins. :money_mouth_face:

  • You can take this for example, any find something like this for yourself in the near future! :upside_down_face:

The target application was Dropbox , I mostly used DropBox for upload and sharing data because DropBox is one of the most secure and trusted platforms. But nothing is 100% secure :slight_smile:

I am gonna share a vulnerability which only exists when some applications are using the third party CDN(Content Delivery Network) like Amazon and Cloudflare etc with ACL(Access control list) not properly configured.

What is Security misconfiguration?

Security misconfiguration is very common and can happen at any level of an application stack. If the security settings are misconfigured, threat agents — such as external attackers as well as authorized users — may attempt to compromise the system. Occasionally, such access results in a complete system compromise.

What is the Access Control List (ACL)?

An access control list, with respect to a computer file system, is a list of permissions attached to an object. An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects. Each entry in a typical ACL specifies a subject and an operation.

What is Content Delivery Network?

A content delivery network or content distribution network is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and high performance by distributing the service spatially relative to end-users.

What is Amazon S3 bucket?

An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services’ (AWS) Simple Storage Service (S3), an object storage offering. Amazon S3 buckets, which are similar to file folders, store objects, which consist of data and its descriptive metadata.

I managed to find an Amazon s3 misconfigured bucket of DropBox which allows me to upload, view and delete any file placed on the bucket.

How to find S3 buckets of a target application?

There are multiple ways to find an associated Amazon s3 bucket of the target application, I will try to share all possible way to find the bucket of the target application.

Method # 1:

You can use many online tools which are available on GitHub to find S3 bucket of a website. I would like to list down a few of them:

  1. Lazy S3
  2. bucket_finder
  3. AWS Cred Scanner
  4. sandcastle
  5. Mass3
  6. Dumpster Diver
  7. S3 Bucket Finder
  8. S3Scanner

Almost all tools are command line tools, You have can clone them from GitHub.

Method # 2:

Check out the server information from wappalyzer (Google Extension) or via the response of any request for the target application. You can identify whether the target application is using Amazon to store data or not.

Method # 3:

Right click on any image of the target application and open image in new tab. If the image URL looks like this:

http://xyz.s3.amazonaws.com/campaign_body_images/images/ac99313b2e85b0dce2006fd997822b9c630cec3e/b1.gif

It means the target application is storing their data to the Amazon server and the bucket name is “xyz”. Anything before “.s3" in the URL is the bucket name of the target application.

Method # 4:

Use the BURP Suite and spider the target web application. BURP Spider plugin is one my favorite plugin it 100% extract the Amazon bucket of the target application.

Method # 5:

Check HTTP History in BURP Suite during interception and pentesting, BURP capture the Amazon bucket URL because the images fetch from the Amazon server when you open the website.

These are some common methods to identify the target application using Amazon CDN or not. If you guys know any other methods or tools then kindly share in the comment section to spread knowledge and make the internet safer.

How I earned $1,500 in just 15 mins?

To be very honest, It’s hard to manage time for Bug Bounty with Job and if you want to do both things together then you need to be faster than anyone else.

Finally, I got a free weekend and I decided to do some Bug Bounty. I select DropBox and start working.

Always focus on subdomains of any target application, and try to enumerate the subdomains as much as you can. Because most of the critical vulnerabilities are triggered on website subdomain, Main/parent domain is obviously more secure than the application subdomains.

Most of the companies do not focus on their subdomains security, they put all the security control on their main/parent domain.

I just found a subdomain of DropBox that contains an image and when I open the image via direct link, then I observed It was uploaded on an Amazon bucket

The URL looked like:

http://xyz.s3.amazonaws.com/campaign_body_images/images/ac99313b2e85b0dce2006fd997822b9c630cec3e/b1.gif

then without wasting the time I opened AWSCLI on Kali Linux and try to upload/move the file to the DropBox amazon bucket and boooooom!!!

It was uploaded on DropBox amazon bucket and accessed via direct URL :slight_smile:

I was like:

The whole working was done within 15 mins ahahahahah :slight_smile:

I got the bounty of $1,500 from Dropbox in the next 3 hours!

How to exploit misconfigured Amazon buckets with AWSCLI?

First, you have to install AWSCLI on your Linux environment.

Here is the link below:

Suppose the bucket name is “xyz”

How to list the content of a misconfigured Amazon Bucket?

Here is the command to list the content of Amazon bucket, It only works when target application does not disabled the directory listing of the Amazon bucket.

aws s3 ls s3://xyz

How to move or upload a file to a misconfigured Amazon bucket?

Here is the command to move or upload the file to Amazon bucket. It only works when proper ACL not applied.

aws s3 mv yourfile_path s3://xyz/test-file.txt

To verify you can access your file via direct URL The uploaded file may contain some malicious script, phishing login panels or any virus, etc

Remediation:

  1. Apply proper ACL, Disable writes permission to avoid uploading the file from an external user.
  2. Disable directory listing to avoid view the content of the Amazon bucket.
  3. Make sure to apply the proper policies on buckets and objects to handle the CORS request securely.

References:

Original Article was shared on medium’s website! This is just a copy paste of that! :slight_smile:

16 Likes

Man I am inspired. I aspire to become a Legit Hacker but am getting stuck at noob level practices. Do you think I can learn from Udemy or should I look for some other place to learn? (Cause I have my doubts on Udemy).

4 Likes

Umm… There are some good udemy courses, remember, at the end it’s on you, you have to practice a lot to confirm those learnings. :slight_smile:


Suggestions:

First put your hands on bugzilla, to atleast learn something relevant for free :slight_smile: then you can move to paid bug bounty course on udemy the best seller is good one, then go for “Bug Bounty Hunting: Guide to an Advanced Earning Method”

https://www.udemy.com/course/complete-bugzilla-course-for-beginners/

Requirements

  • You will need a PC with reliable working Internet connection

What you’ll learn

  • Setting Bugzilla Account
  • Reporting and Submitting a Bug
  • Cloning and Editing a Bug
  • Graphical, Tabular Bug Reports and Charts
  • About listing Bugs
  • How to find or search for a Bug
  • About Simple, Quick and Advance Bug searching
  • About General, Email Preferences

Description

Bugzilla is a web-based general-purpose bug tracking system and testing tool originally developed and used by the Mozilla project, and licensed under the Mozilla Public License.

From this course, you will learn about the Bug Reporting, Searching a Bug, how to clone a Bug, editing a Bug, and more using Bugzilla tracking and testing tool.

Feel free to ask me any question.

Who this course is for:

  • Beginners who wants to learn how to report or file and track Bug reports using Bugzilla tool
  • Beginners who wants to learn about Bugzilla (Bug tracking tool)
5 Likes

Thanks… Will try my best.

for starters, start learning by targeting smaller services or websites

2 Likes

I’m lost on how protector47 earned the $1500.

1 Like