S3 bucket listing/download
Two S3 buckets were publicly listable and downloadable, exposing all stored files. An attacker could download non-public data and inflate the bucket owner's bandwidth bill by repeatedly downloading the entire bucket.
- Triaged in 3 days
- Fixed in 4 months
- Disclosed after 4 months
It's possible to get a listing and download every file in the S3 bucket ██████████ and ███████ .
Supporting Material/References
https://hackerone.com/reports/278191
Impact
An attacker can download files that are not intended to be public, both buckets are very big. An attacker can increase dramatically the bandwidth used by the bucket, programmatically and continuously downloading the entire bucket content setting a more expensive bill.
Example: The attacker has a 600 Mbps internet connection (let's use an average of 500 Mbps) and here's the data transfer cost:
**Data Transfer OUT From Amazon S3 To Internet**
Up to 1 GB / Month $0.00 per GB
Next 9.999 TB / Month $0.09 per GB
Next 40 TB / Month $0.085 per GB
Next 100 TB / Month $0.07 per GB
Greater than 150 TB / Month $0.05 per GB
Let's assume you are in the 'Next 40 TB/Month' category, if an attacker downloads the entire bucket in one day, that would increase the bill in the following way
(500/8) [MB/s]* 3600 [s]* 24 [hrs] = 5,273 GB per day
- 5,273 [GB] * 0.085 [$/GB]= 448 [$]
- Month -> $13.447
System Host(s)
████████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Steps To Reproduce
We can find the name of the buckets going to███ and ██████████
We can list all files using the aws CLI:
aws s3 ls s3://███
We can calculate the size of the bucket
aws s3 ls --summarize --human-readable --recursive s3://██████ |grep "Total Size"
Total Size: 1.6 TiB
More importantly we can download the entire bucket:
aws s3 cp s3://███████ . --recursive
Suggested Mitigation/Remediation Actions
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
Impact
An attacker could download files not intended to be public and could dramatically increase the bucket's bandwidth usage, leading to a higher bill.
What the attacker needed
Knowledge of bucket names; AWS CLI installed
The fix
Restricting bucket permissions would prevent public listing and downloading.
How it was found
- Find the bucket names by visiting certain pages.
- List all files using the AWS CLI.
- Calculate the bucket size using the AWS CLI.
- Download the entire bucket using the AWS CLI.
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.
An S3 bucket is cloud storage. If it is set to allow public listing and reading, anyone can see and download its files. Here, the buckets were open, so anyone could take the data and also run up the owner's download bill.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.