2.14 Ensure IAM policies that allow full "*:*" administrative privileges are not attached

Information

IAM policies are the means by which privileges are granted to users, groups, or roles. It is recommended and considered standard security advice to grant least privilege, granting only the permissions required to perform a task. Determine what users need to do, and then craft policies for them that allow the users to perform only those tasks, instead of granting full administrative privileges.

It is more secure to start with a minimal set of permissions and grant additional permissions as necessary, rather than starting with overly permissive access and attempting to restrict it later.

Providing full administrative privileges instead of restricting access to the minimum required exposes resources to potentially unintended or malicious actions.

IAM policies that contain a statement with "Effect": "Allow" and "Action": "*" over "Resource": "*" should be removed.

Solution

From Console:

- Sign in to the AWS Management Console and open the IAM console
- In the navigation pane, click Policies
- Search for the policy identified in the audit step
- Select the policy
- Choose Detach
- Detach the policy from all Users, Groups, and Roles
- Delete the policy if it is no longer required

From Command Line:

- List all entities attached to the policy:

aws iam list-entities-for-policy --policy-arn <policy_arn>
- Detach from users:

aws iam detach-user-policy --user-name <iam_user> --policy-arn <policy_arn>
- Detach from groups:

aws iam detach-group-policy --group-name <iam_group> --policy-arn <policy_arn>
- Detach from roles:

aws iam detach-role-policy --role-name <iam_role> --policy-arn <policy_arn>

Impact:

Policies granting full administrative privileges significantly increase the risk of unauthorized or unintended actions, potentially resulting in complete account compromise.

See Also

https://workbench.cisecurity.org/benchmarks/24575

Item Details

Category: ACCESS CONTROL, AUDIT AND ACCOUNTABILITY

References: 800-53|AC-2, 800-53|AC-3, 800-53|AC-6, 800-53|AC-6(1), 800-53|AC-6(7), 800-53|AU-9(4), CCE|CCE-78912-3, CSCv7|4.1

Plugin: amazon_aws

Control ID: fbb8cc9204765b45615436f17d53f898cddb76de02a5f95ef8ee5b7ff93f0861