pentesting, updated

AWS CLI

AWS CLI, used unauthenticated or with test credentials to probe S3 bucket permissions.

What it’s for

Probe S3 buckets for anonymous read/write/delete access without needing valid AWS credentials.

Install

# https://aws.amazon.com/cli/
sudo apt install awscli

Common commands

aws s3 ls s3://my-bucket --no-sign-request                    # list objects anonymously
aws s3 cp s3://my-bucket/file.txt . --no-sign-request          # download anonymously
aws s3 cp test.txt s3://my-bucket/test.txt --no-sign-request   # probe write access
aws s3 rm s3://my-bucket/test.txt --no-sign-request             # probe delete access
aws s3api get-bucket-acl --bucket my-bucket --no-sign-request   # read the bucket ACL

Notes

--no-sign-request sends the call with no credentials at all — exactly what an unauthenticated attacker would do. Only write or delete with explicit scope and a disposable test object.

Used in

§ home
~/knubertus/home/
1,1 Top