Shadow Admin
AWS Shadow Admin
TLDR: Fix later
Admin equivalent permission
1) AdministratorAccess
2) ec2:AssociateIamInstanceProfile : attach an IAM instance profile to an EC2 instance
aws ec2 associate-iam-instance-profile --iam-instance-profile Name=admin-role3) iam:CreateAccessKey : create a new access key to another IAM admin account
aws iam create-access-key –user-name TARGET_USER4) iam:CreateLoginProfile : add a new password-based login profile, set a new password for an entity and impersonate it
aws iam create-login-profile –user-name TARGET_USER –password 'PASSWORD'5) iam:UpdateLoginProfile : reset other IAM users’ login passwords.
6) iam:AttachUserPolicy, iam:AttachGroupPolicy or iam:AttachRolePolicy : attach existing admin policy to any other entity he currently possesses
OR
OR
7) iam:PutUserPolicy, iam:PutGroupPolicy or iam:PutRolePolicy : added inline policy will allow the attacker to grant additional privileges to previously compromised entities.
8) iam:CreatePolicy : add a stealthy admin policy
9) iam:AddUserToGroup : add into the admin group of the organization.
10) iam:UpdateAssumeRolePolicy + sts:AssumeRole : change the assuming permissions of a privileged role and then assume it with a non-privileged account.
11) iam:CreatePolicyVersion & iam:SetDefaultPolicyVersion : change customer-managed policies and change a non-privileged entity to be a privileged one.
12) lambda:UpdateFunctionCode : give an attacker access to the privileges associated with the Lambda service role that is attached to that function.
13) glue:UpdateDevEndpoint : give an attacker access to the privileges associated with the role attached to the specific Glue development endpoint.
14) iam:PassRole + ec2:CreateInstanceProfile/ec2:AddRoleToInstanceProfile : an attacker could create a new privileged instance profile and attach it to a compromised EC2 instance that he possesses.
15) iam:PassRole + ec2:RunInstance : give an attacker access to the set of permissions that the instance profile/role has, which again could range from no privilege escalation to full administrator access of the AWS account
16) iam:PassRole + lambda:CreateFunction + lambda:InvokeFunction : give a user access to the privileges associated with any Lambda service role that exists in the account.
17) iam:PassRole + glue:CreateDevEndpoint : access to the privileges associated with any Glue service role that exists in the account.
Last updated