documentation/modules/auxiliary/cloud/aws/enum_s3.md
Amazon Web Services (AWS) resources can be managed through an API that authenticates based on an ACCESS_KEY_ID and a SECRET_ACCESS_KEY. With these two pieces of information, an attacker can gain privileges which may include enumerating resources within the AWS account.
This module authenticates to AWS S3 (Simple Storage Service), to identify buckets that the credentials can see. The files contained within buckets may be publicly readable and/or writable, or they may be locked down. In any case, knowledge of the buckets is the first step in evaluating their security.
use auxiliary/cloud/aws/enum_s3ACCESS_KEY_ID and SECRET_ACCESS_KEY options.REGION option.runThis AWS credential is like a username. It uniquely identifies the user, and is paired with a 'secret access key'. The access key ID is retrievable through the AWS console.
An example ACCESS_KEY_ID would be AKIA5C76TR3KXHXA5CRC
This AWS credential is like a password, and should be treated as such. It is paired with a 'access key ID'. The access key ID cannot be retrieved from AWS after it has been generated, but it may be discoverable through environment variables, configuration files, source code, or backups.
An example SECRET_ACCESS_KEY would be EKfx3wOWWiGk1WgBTAZfF/2dq3SbDsQj4jdyOMOv.
AWS resources are located in regions. Optionally, this module's output can be filtered based on region to minimize the query to AWS. Alternatively, REGION can be left blank, such that all regions will be checked.
An example region would be us-west-2.
msf auxiliary(cloud/aws/enum_s3) > run
[+] Found 1 buckets.
[+] Name: asoto-secret-demo-bucket
[+] Creation Date: 2019-06-13 23:30:26 UTC
[+] # of Objects: 0
[+] Region: us-west-2
[+] Website: /index.html
[+] Owner: asoto
[+] Permissions:
[+] User 'asoto' granted FULL_CONTROL
[+] Group '' (http://acs.amazonaws.com/groups/s3/LogDelivery) granted READ
[*]
[*] Done.
[*] Auxiliary module execution completed
msf auxiliary(cloud/aws/enum_s3) > exit
msf auxiliary(cloud/aws/enum_s3) > run
[-] Auxiliary aborted due to failure: unexpected-reply: The AWS Access Key Id you provided does not exist in our records.
[*] Auxiliary module execution completed
msf auxiliary(cloud/aws/enum_s3) >
msf auxiliary(cloud/aws/enum_s3) > run
[-] Auxiliary aborted due to failure: unexpected-reply: The request signature we calculated does not match the signature you provided. Check your key and signing method.
[*] Auxiliary module execution completed
msf auxiliary(cloud/aws/enum_s3) >
msf auxiliary(cloud/aws/enum_s3) > run
[-] Auxiliary aborted due to failure: unexpected-reply: Access Denied
[*] Auxiliary module execution completed
msf auxiliary(cloud/aws/enum_s3) >