Giter Club home page Giter Club logo

teh_s3_bucketeers's Introduction

Teh S3 Bucketeers

Installation

Install awscli:

apt install awscli

Make sure you have AWS credentials set up, see Requirements.

Clone this repo and you're good to go:

git clone https://github.com/tomdev/teh_s3_bucketeers.git

Requirements

https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html#setup-credentials-setting

Create an AWS account and set up your access tokens in ~/.aws/credentials like this:

[default]
aws_access_key_id = <key>
aws_secret_access_key = <secret>

Usage

You can test multiple targets at the same time, use a space as a delimiter.

./bucketeer.sh <target> <target>

A result file named results-<target>-<timestamp>.txt will be created when an accessible bucket has been found.

โš ๏ธ If you are using this tool for penetration testing you must get prior approval from AWS.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tomdev/teh_s3_bucketeers.

License

The gem is available as open source under the terms of the MIT License.

teh_s3_bucketeers's People

Contributors

bwillis avatar c0ldbr3w avatar eur0pa avatar fafafariba avatar milkcerealbowl avatar random-robbie avatar sandrogauci avatar tomdev avatar willianvdv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teh_s3_bucketeers's Issues

Tool update

Alsalamoalaykom my brothers
thanks for the great tool, it helped me to find 2 open buckets which i reported and many other duplicates
when i used the tool multiple times at the same target i noticed the following:
the tool didn't give the same results at every time , actually the most of results are different
so after analyzing the code i noticed the following
result=$(curl -m 5 -s -X 'GET' -o/dev/null -w '%{http_code}' -I http://${bucket_name}.s3.amazonaws.com/?max-keys=1)
in this line the tool requesting the site bucketname.s3.amazonaws.com
if [[ ${result} == "403" ]]; then
if the result status code is 403 it continue to the next block
the problem here is that some buckets when requested it result in 404 status code , yet still exist (i don't know why but this is what is happening-you can try it with burpsuite)
so the tools missing a lot of open buckets at the time of execution
I updated the code to the following:
if [[ ${result} == "403" || ${result} == "404" ]]; then sudo aws s3 ls s3://${bucket_name} &> aws.txt;
here i added the response code 404 and save the output of listing files in aws.txt
and
if [[ $? == 0 ]]; then echo "[${GREEN}FOUND${NORMAL}] https://${bucket_name}.s3.amazonaws.com"; echo "https://${bucket_name}.s3.amazonaws.com" >> ${RESULT_FILE} else cat aws.txt | grep -E -q "AccessDenied|AllAccessDisabled"; if [[ $? == 0 ]]; then echo "[${RED}FOUND${NORMAL}] https://${bucket_name}.s3.amazonaws.com"; fi fi
if the execution code of ls was not 0 (255 for both access denied and no such bucket)
if the response of listing bucket which we save in aws.txt contain AccessDenied or AllAccessDisabled (status code of grep become 0), this means the bucket exists so it print it
the modifications is straight and should work well, however it give me alot of false positives i think because of the multi threading
I hope you see this issue soon and update the tool so that it contains all existing buckets.
Best regards,
Ahmed.

script do not work!

when I run script it just give me one result and do not do anything else as below

./bucketeer.sh momo

  _       _            _____   _                _        _                 
 | |     | |          |____ | | |              | |      | |                
 | |_ ___| |__    ___     / / | |__  _   _  ___| | _____| |_ ___  ___ _ __ 
 | __/ _ \ '_ \  / __|    \ \ | '_ \| | | |/ __| |/ / _ \ __/ _ \/ _ \ '__|
 | ||  __/ | | | \__ \.___/ / | |_) | |_| | (__|   <  __/ ||  __/  __/ |   
  \__\___|_| |_| |___/\____/  |_.__/ \__,_|\___|_|\_\___|\__\___|\___|_|   

[FOUND] https://momo.s3.amazonaws.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.