AWS IAM AdministratorAccess Policy Attached to Group

An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching additional permissions to user groups the compromised user account belongs to. This rule looks for use of the IAM AttachGroupPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing IAM user group.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2024/05/31"
  3integration = ["aws"]
  4maturity = "production"
  5updated_date = "2026/01/16"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10An adversary with access to a set of compromised credentials may attempt to persist or escalate privileges by attaching
 11additional permissions to user groups the compromised user account belongs to. This rule looks for use of the IAM
 12AttachGroupPolicy API operation to attach the highly permissive AdministratorAccess AWS managed policy to an existing
 13IAM user group.
 14"""
 15false_positives = [
 16    """
 17    While this can be normal behavior, it should be investigated to ensure validity. Verify whether the user identity
 18    should be using the IAM `AttachGroupPolicy` API operation to attach the `AdministratorAccess` policy to the user
 19    group.
 20    """,
 21]
 22from = "now-6m"
 23index = ["filebeat-*", "logs-aws.cloudtrail-*"]
 24language = "eql"
 25license = "Elastic License v2"
 26name = "AWS IAM AdministratorAccess Policy Attached to Group"
 27note = """## Triage and analysis
 28
 29### Investigating AWS IAM AdministratorAccess Policy Attached to Group
 30
 31The AWS-managed `AdministratorAccess` policy grants full administrative privileges across all AWS services.  
 32When attached to a group, all group members inherit this access, often unintentionally broadening the blast radius of a compromise.  
 33Adversaries can exploit `iam:AttachGroupPolicy` permissions to escalate privileges or establish persistence by attaching this policy to an existing user group.
 34
 35#### Possible investigation steps
 36
 37- **Identify the affected group and calling principal.**  
 38  Review `aws.cloudtrail.user_identity.arn` (caller) and `aws.cloudtrail.request_parameters.groupName` (target group).  
 39  Validate whether this aligns with legitimate change management or automation workflows.  
 40
 41- **Review group membership.**  
 42  Enumerate current members using `aws iam get-group`.  
 43  Determine whether unauthorized users could have gained administrative access as a result.  
 44
 45- **Inspect CloudTrail details.**  
 46  Check `source.ip`, `user_agent.original`, and `source.geo` fields for anomalies.  
 47  Compare with historical operations by the same principal.  
 48
 49- **Correlate related IAM activity.**  
 50  Search for adjacent events such as `AddUserToGroup`, `CreateUser`, or `AttachUserPolicy`.  
 51  These may indicate chained privilege escalation.  
 52
 53- **Assess propagation of privileges.**  
 54  If the group has many members or is linked to cross-account roles, the impact may extend beyond a single user.  
 55  Document all affected identities for containment.  
 56
 57### False positive analysis
 58
 59- **Intentional access updates.**  
 60  Policy attachment may occur during legitimate administrative provisioning. Confirm via ticketing systems.  
 61- **Automation or compliance tasks.**  
 62  Some environments use centralized scripts to attach AdministratorAccess temporarily. Validate through automation logs.  
 63
 64### Response and remediation
 65
 66**Immediate containment**
 67- Detach the policy from the affected group (`aws iam detach-group-policy`).  
 68- Review and limit group membership. Temporarily remove non-essential users or disable access for impacted accounts.  
 69- Rotate credentials for users who inherited admin privileges from the attachment.  
 70- Enable MFA on all impacted accounts.  
 71
 72**Evidence preservation**
 73- Export the triggering `AttachGroupPolicy` event and related CloudTrail entries ±30 minutes from the alert.  
 74- Preserve AWS Config and GuardDuty records to support forensic analysis.  
 75
 76**Scoping and investigation**
 77- Review additional IAM operations from the same caller (`CreateAccessKey`, `AttachRolePolicy`, `UpdateAssumeRolePolicy`).  
 78- Identify whether new groups or roles were created shortly before or after the event.  
 79- Check for subsequent API activity by newly privileged users (for example, S3, EC2, or IAM modifications).  
 80
 81**Recovery and hardening**
 82- Reinforce least privilege, avoid assigning `AdministratorAccess` to groups.  
 83- Use role-based access control with scoped permissions.   
 84- Enable CloudTrail, GuardDuty, and Security Hub across all regions.  
 85- Implement SCPs at the organization level to restrict direct `AdministratorAccess` attachments.  
 86
 87### Additional information
 88- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/): response steps related to IAM policy modification and unauthorized privilege escalation..  
 89- **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/): for containment, analysis, and recovery guidance.
 90- **AWS Documentation:** [AdministratorAccess Policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_job-functions.html#jf_administrator).
 91"""
 92references = [
 93    "https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachGroupPolicy.html",
 94    "https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AdministratorAccess.html",
 95    "https://hackingthe.cloud/aws/exploitation/iam_privilege_escalation/",
 96]
 97risk_score = 47
 98rule_id = "df919b5e-a0f6-4fd8-8598-e3ce79299e3b"
 99severity = "medium"
100tags = [
101    "Domain: Cloud",
102    "Data Source: AWS",
103    "Data Source: Amazon Web Services",
104    "Data Source: AWS IAM",
105    "Use Case: Identity and Access Audit",
106    "Tactic: Privilege Escalation",
107    "Tactic: Persistence",
108    "Resources: Investigation Guide",
109]
110timestamp_override = "event.ingested"
111type = "eql"
112
113query = '''
114iam where event.dataset == "aws.cloudtrail"
115   and event.provider == "iam.amazonaws.com"
116   and event.action == "AttachGroupPolicy"
117   and event.outcome == "success"
118   and stringContains(aws.cloudtrail.request_parameters, "policyArn=arn:aws:iam::aws:policy/AdministratorAccess")
119'''
120
121
122[[rule.threat]]
123framework = "MITRE ATT&CK"
124[[rule.threat.technique]]
125id = "T1098"
126name = "Account Manipulation"
127reference = "https://attack.mitre.org/techniques/T1098/"
128[[rule.threat.technique.subtechnique]]
129id = "T1098.003"
130name = "Additional Cloud Roles"
131reference = "https://attack.mitre.org/techniques/T1098/003/"
132
133
134
135[rule.threat.tactic]
136id = "TA0004"
137name = "Privilege Escalation"
138reference = "https://attack.mitre.org/tactics/TA0004/"
139[[rule.threat]]
140framework = "MITRE ATT&CK"
141[[rule.threat.technique]]
142id = "T1098"
143name = "Account Manipulation"
144reference = "https://attack.mitre.org/techniques/T1098/"
145[[rule.threat.technique.subtechnique]]
146id = "T1098.003"
147name = "Additional Cloud Roles"
148reference = "https://attack.mitre.org/techniques/T1098/003/"
149
150
151
152[rule.threat.tactic]
153id = "TA0003"
154name = "Persistence"
155reference = "https://attack.mitre.org/tactics/TA0003/"
156
157[rule.investigation_fields]
158field_names = [
159    "@timestamp",
160    "user.name",
161    "user_agent.original",
162    "source.ip",
163    "aws.cloudtrail.user_identity.arn",
164    "aws.cloudtrail.user_identity.type",
165    "aws.cloudtrail.user_identity.access_key_id",
166    "event.action",
167    "group.name",
168    "event.outcome",
169    "cloud.account.id",
170    "cloud.region",
171    "aws.cloudtrail.request_parameters",
172]

Triage and analysis

Investigating AWS IAM AdministratorAccess Policy Attached to Group

The AWS-managed AdministratorAccess policy grants full administrative privileges across all AWS services.
When attached to a group, all group members inherit this access, often unintentionally broadening the blast radius of a compromise.
Adversaries can exploit iam:AttachGroupPolicy permissions to escalate privileges or establish persistence by attaching this policy to an existing user group.

Possible investigation steps

  • Identify the affected group and calling principal.
    Review aws.cloudtrail.user_identity.arn (caller) and aws.cloudtrail.request_parameters.groupName (target group).
    Validate whether this aligns with legitimate change management or automation workflows.

  • Review group membership.
    Enumerate current members using aws iam get-group.
    Determine whether unauthorized users could have gained administrative access as a result.

  • Inspect CloudTrail details.
    Check source.ip, user_agent.original, and source.geo fields for anomalies.
    Compare with historical operations by the same principal.

  • Correlate related IAM activity.
    Search for adjacent events such as AddUserToGroup, CreateUser, or AttachUserPolicy.
    These may indicate chained privilege escalation.

  • Assess propagation of privileges.
    If the group has many members or is linked to cross-account roles, the impact may extend beyond a single user.
    Document all affected identities for containment.

False positive analysis

  • Intentional access updates.
    Policy attachment may occur during legitimate administrative provisioning. Confirm via ticketing systems.
  • Automation or compliance tasks.
    Some environments use centralized scripts to attach AdministratorAccess temporarily. Validate through automation logs.

Response and remediation

Immediate containment

  • Detach the policy from the affected group (aws iam detach-group-policy).
  • Review and limit group membership. Temporarily remove non-essential users or disable access for impacted accounts.
  • Rotate credentials for users who inherited admin privileges from the attachment.
  • Enable MFA on all impacted accounts.

Evidence preservation

  • Export the triggering AttachGroupPolicy event and related CloudTrail entries ±30 minutes from the alert.
  • Preserve AWS Config and GuardDuty records to support forensic analysis.

Scoping and investigation

  • Review additional IAM operations from the same caller (CreateAccessKey, AttachRolePolicy, UpdateAssumeRolePolicy).
  • Identify whether new groups or roles were created shortly before or after the event.
  • Check for subsequent API activity by newly privileged users (for example, S3, EC2, or IAM modifications).

Recovery and hardening

  • Reinforce least privilege, avoid assigning AdministratorAccess to groups.
  • Use role-based access control with scoped permissions.
  • Enable CloudTrail, GuardDuty, and Security Hub across all regions.
  • Implement SCPs at the organization level to restrict direct AdministratorAccess attachments.

Additional information

References

Related rules

to-top