Amazon Web Services (AWS) S3
Today it’s a great day. I just found something “misconfigure” server that uses AWS S3. This is not only a wrong setting, but it makes a fatal mistake that ends up leaking the data you have. So, let’s begin.
What is AWS S3?
Amazon S3 or Amazon Simple Storage Service is a service offered by Amazon Web Services that provides object storage via a web service interface.
Start finding your vulnerability AWS S3, you can see like this if AWS S3 is opened:
if you see that AWS S3 Bucket showing the Bucket Result, there is vuln to be accessed on that server. Now open up your Terminal Favorite to connect to the server. Don’t forget to install the AWS S3 on Terminal. In this tutorial, I have to use Ubuntu from Windows. If you don’t know how to install, click here for detail.
Let’s Dig In!
For connecting to the server, you can use this command: aws s3 ls s3://bucket-name this command will showing up the file on that server (LS)
if you wanna see the file is success uploaded to bucket or no, use this command again aws s3 ls s3://bucket-name then scroll until you find the file.
COOL! Your file right now is accessible, try open it with AWS S3 Link like this:
Want another cool command? Just use this command:
Download file from AWS S3 Bucket: s3cmd get s3://bucket-name/filename filename
(Use s3cmd module, visit https://s3tools.org/s3cmd for install)
Create a bucket :
aws s3 mb s3://$bucket
Delete a bucket :
aws s3 rb s3://bucket-name
and How we can fix it (mitigation)?
Change privileges on your bucket: https://docs.aws.amazon.com/AmazonS3/latest/UG/EditingBucketPermissions.html (using AWS Command Line helps to prove that exploitation is possible.)
P.S. This is for educational purpose only, do with your own risk.
See Ü & Thank Ü!
Author : TuZKi666