You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first part of enumerating s3 buckets is having an s3 bucket name. How would you find an s3 bucket name:
Source code on git repositories
Sub domain enumeration
Analyzing requests on web pages
Some pages retrieve static resources from s3 buckets
Domain name of product names:
If a product or domain is called “servicename” then the s3 bucket may also be called “servicename”
Once we have an s3 bucket, we can check if it’s publicly accessible by browsing to the URL. The format of the URL is:
bucketname.s3.amazonaws.com
If you’ve found objects on an s3 bucket, you would want to download them to view their contents. You do this using the AWS CLI. To use the AWS CLI, you need to create an account.
AWS Configure
Start by configuring aws on your local machine:
aws configure
AWS Access Key ID [None]: temp
AWS Secret Access Key [None]: temp
Default region name [None]: temp
Default output format [None]: temp
Connecting to an Endpoint
There are multiple ways to connect to an endpoint:
aws --endpoint=http://s3.thetoppers.htb s3 ls
aws s3 ls s3://bucket-name
The output will look something like:
2022-09-25 20:03:26 thetoppers.htb
View s3 bucket files
aws --endpoint=http://s3.thetoppers.htb s3 ls s3://thetoppers.htb
PRE images/
2022-09-25 20:03:26 0 .htaccess
2022-09-25 20:03:26 11952 index.php