githubEdit

Amazon Web Services (AWS) CLI Tool

Commands:

Authentication

aws configure (Set AWS programmatic keys for authentication (use --profile= for a new profile)

aws configure set aws_session_token "SESSION_TOKEN" 

(Use a session token with the Access Key and Secret Access Key (aws configure) to authenticate)

Open S3 bucket enumeration

1) List the contents of an S3 bucket

aws s3 ls s3://BUCKET_NAME/ 

2) Download contents of bucket

aws s3 sync s3://BUCKET_NAME s3-files-dir 

Account Information

1) Get basic account info

2) List IAM users

3) List IAM roles

4) List S3 buckets accessible to an account

5) Assume the role of a specific account

6) List policies that are attached directly to our user

7) See if a user is able to set their own AWS console password from the CLI

Virtual Machines

1) List EC2 instances

Web Applications and SQL

1) List webapps

2) List AWS RDS (SQL)

3) Knowing the VPC Security Group ID you can query the firewall rules to determine connectivity potential

Serverless

1) List Lambda functions

2) Look at environment variables set for secrets and analyze code

Networking

1) List EC2 subnets

2) List EC2 network interfaces

3) List DirectConnect (VPN) connections

Identity Access Management IAM

1) Update the "assume role" policy of a user using a .json file

2) List more information about a specific role

3) Enumerate IAM users and roles via S3 Bucket Policy

4) Enumerate IAM users and roles via lambda functions

SecretsManager and SSM (AWS System Manager)

1) Get secret

2)

AWS API Gateway

1) List APIs

2) Deploy an existing API to a specific stage

3) Update the API settings/policies/etc.

Batch Operations

1) View the current status of the latest job

2) Create a batch operation job

Last updated