Back to Checks
aws

Attached AWS-managed IAM policy does not allow '*:*' administrative privileges

iam_aws_attached_policy_no_administrative_privileges
Service: iamSeverity: critical
OfficialBuilt-inVerified
Categories:identity-access
Resource Type:AwsIamPolicy

IAM AWS-managed policies attached to identities are inspected for statements that allow Action:'*' on Resource:'*'-i.e., full administrative *:* permissions

Risk

Unrestricted *:* access enables any action on any resource, risking:

  • Data exfiltration (confidentiality)
  • Unauthorized changes and policy tampering (integrity)
  • Service deletion or shutdown (availability) Attackers can disable logging, create backdoor principals, and expand lateral movement.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler aws --checks iam_aws_attached_policy_no_administrative_privileges

Recommendation

Apply least privilege: avoid attaching AWS-managed policies that grant *:*.

  • Use customer-managed, scoped policies per role
  • Enforce separation of duties and permissions boundaries
  • Prefer temporary, time-bound elevation for emergencies with MFA
  • Regularly review access and use conditions to constrain context

Remediation

Terraform

# Replace full admin attachment with a non-admin policy (ensure AdministratorAccess is not attached)
resource "aws_iam_role_policy_attachment" "<example_resource_name>" {
  role       = "<example_resource_name>"
  policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"  # FIX: avoids '*:*' admin privileges; replace AdministratorAccess
}

NativeIaC

# CloudFormation: ensure no AWS-managed admin policy ('*:*') is attached
Resources:
  <example_resource_name>:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: ec2.amazonaws.com
            Action: sts:AssumeRole
      ManagedPolicyArns: []  # FIX: empty list detaches/removes any attached AWS-managed admin policy (e.g., AdministratorAccess)

Other

1In the AWS Console, go to IAM > Policies
2Search for the flagged AWS-managed policy (e.g., AdministratorAccess) and open it
3Click Attached entities
4Select all Users, Groups, and Roles shown and click Detach
5Confirm the policy shows 0 attached entities
6Rerun the check to verify it passes

Check Code

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.iam.iam_client import iam_client
from prowler.providers.aws.services.iam.lib.policy import check_admin_access


class iam_aws_attached_policy_no_administrative_privileges(Check):
    def execute(self) -> Check_Report_AWS:
        findings = []
        for policy in iam_client.policies.values():
            # Check only for attached AWS policies
            if policy.attached and policy.type == "AWS":
                report = Check_Report_AWS(metadata=self.metadata(), resource=policy)
                report.region = iam_client.region
                report.status = "PASS"
                report.status_extended = f"{policy.type} policy {policy.name} is attached but does not allow '*:*' administrative privileges."
                if policy.document:
                    if check_admin_access(policy.document):
                        report.status = "FAIL"
                        report.status_extended = f"{policy.type} policy {policy.name} is attached and allows '*:*' administrative privileges."
                findings.append(report)
        return findings