AWS IAM Group Creation
Identifies the creation of a group in AWS Identity and Access Management (IAM). Groups specify permissions for multiple users. Any user in a group automatically has the permissions that are assigned to the group. Adversaries who obtain credentials with IAM write privileges may create a new group as a foothold for persistence: they can later attach admin-level policies to the group and quietly add users or roles to inherit those privileges.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/06/05"
3integration = ["aws"]
4maturity = "production"
5updated_date = "2025/10/30"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies the creation of a group in AWS Identity and Access Management (IAM). Groups specify permissions for multiple
11users. Any user in a group automatically has the permissions that are assigned to the group. Adversaries who obtain
12credentials with IAM write privileges may create a new group as a foothold for persistence: they can later attach
13admin-level policies to the group and quietly add users or roles to inherit those privileges.
14"""
15false_positives = [
16 """
17 A group may be created by a system or network administrator. Verify whether the user identity, user agent, and/or
18 hostname should be making changes in your environment. Group creations by unfamiliar users or hosts should be
19 investigated. If known behavior is causing false positives, it can be exempted from the rule.
20 """,
21]
22from = "now-6m"
23index = ["filebeat-*", "logs-aws.cloudtrail-*"]
24language = "kuery"
25license = "Elastic License v2"
26name = "AWS IAM Group Creation"
27note = """## Triage and analysis
28
29> **Disclaimer**:
30> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
31
32### Investigating AWS IAM Group Creation
33
34AWS IAM allows organizations to manage user access and permissions securely. Groups in IAM simplify permission management by allowing multiple users to inherit the same permissions. However, adversaries may exploit this by creating unauthorized groups to gain persistent access. This alert fires on `CreateGroup`. New group creation may indicate attacker staging for persistence, especially if followed by policy attachments or user additions.
35
36#### Possible investigation steps
37
38- **Identify the actor and context**
39 - Check `aws.cloudtrail.user_identity.arn`, `aws.cloudtrail.user_identity.access_key_id` to determine who performed the group creation.
40 - Review `source.ip`, `user_agent.original`, `cloud.account.id`, `cloud.region` for unusual network, client, or region usage.
41
42- **Examine the group details**
43 - From `aws.cloudtrail.response_elements`, extract `groupName` and `path` (e.g., /service/, /dev/).
44 - Look for immediate follow-on changes by the same actor within the next 15–30 minutes:
45 - AttachGroupPolicy (especially AdministratorAccess or broad s3:*, iam:*).
46 - AddUserToGroup (who was added and when?).
47 - Use GetGroup to enumerate current group membership and attached policies during triage.
48
49- **Correlate with broader activity**
50 - Look for prior suspicious actions by the same user: `AssumeRole`, `CreateAccessKey`, new IAM user/role.
51 - After group creation, watch for data-access or configuration changes (e.g., S3 policy updates, KMS key policy changes)
52
53### False positive analysis
54
55- IAM onboarding workflows or DevOps pipelines creating groups for new projects can trigger this alert.
56- Test or sandbox accounts often create and delete groups routinely, validate account context and approval flows.
57
58### Response and remediation:
59
60- **Containment**:
61 - If suspicious, disable further changes by the actor (temporarily remove IAM write privileges or deactivate keys).
62 - Place a change freeze on the newly created group (block `AttachGroupPolicy`/`AddUserToGroup` via SCP/permissions boundary until review completes).
63
64- **Investigation and scoping**:
65 - Use `GetGroup`, `ListAttachedGroupPolicies`, `ListUsersInGroup` to enumerate the group’s state and identify any suspicious policies or members. Investigate any attached policies granting broad privileges.
66 - Hunt for same-actor `AttachGroupPolicy`/`AddUserToGroup` events across the last 24–48h.
67
68- **Recovery and hardening**:
69 - Delete unauthorized, unused or suspicious groups. remove rogue policies/members.
70 - Restrict who can call `iam:CreateGroup`, `iam:AttachGroupPolicy`, and `iam:AddUserToGroup` (least privilege).
71
72### Additional information
73[AWS Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/)
74"""
75references = [
76 "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/create-group.html",
77 "https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateGroup.html",
78]
79risk_score = 21
80rule_id = "169f3a93-efc7-4df2-94d6-0d9438c310d1"
81severity = "low"
82tags = [
83 "Domain: Cloud",
84 "Data Source: AWS",
85 "Data Source: Amazon Web Services",
86 "Data Source: AWS IAM",
87 "Use Case: Identity and Access Audit",
88 "Tactic: Persistence",
89 "Resources: Investigation Guide",
90]
91timestamp_override = "event.ingested"
92type = "query"
93
94query = '''
95event.dataset: aws.cloudtrail and
96 event.provider: iam.amazonaws.com and
97 event.action: CreateGroup and
98 event.outcome: success
99'''
100
101
102[[rule.threat]]
103framework = "MITRE ATT&CK"
104[[rule.threat.technique]]
105id = "T1136"
106name = "Create Account"
107reference = "https://attack.mitre.org/techniques/T1136/"
108[[rule.threat.technique.subtechnique]]
109id = "T1136.003"
110name = "Cloud Account"
111reference = "https://attack.mitre.org/techniques/T1136/003/"
112
113
114
115[rule.threat.tactic]
116id = "TA0003"
117name = "Persistence"
118reference = "https://attack.mitre.org/tactics/TA0003/"
119
120[rule.investigation_fields]
121field_names = [
122 "@timestamp",
123 "user.name",
124 "user_agent.original",
125 "source.ip",
126 "aws.cloudtrail.user_identity.arn",
127 "aws.cloudtrail.user_identity.type",
128 "aws.cloudtrail.user_identity.access_key_id",
129 "event.action",
130 "event.outcome",
131 "cloud.account.id",
132 "cloud.region",
133 "aws.cloudtrail.request_parameters",
134 "aws.cloudtrail.response_elements",
135]
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating AWS IAM Group Creation
AWS IAM allows organizations to manage user access and permissions securely. Groups in IAM simplify permission management by allowing multiple users to inherit the same permissions. However, adversaries may exploit this by creating unauthorized groups to gain persistent access. This alert fires on CreateGroup. New group creation may indicate attacker staging for persistence, especially if followed by policy attachments or user additions.
Possible investigation steps
-
Identify the actor and context
- Check
aws.cloudtrail.user_identity.arn,aws.cloudtrail.user_identity.access_key_idto determine who performed the group creation. - Review
source.ip,user_agent.original,cloud.account.id,cloud.regionfor unusual network, client, or region usage.
- Check
-
Examine the group details
- From
aws.cloudtrail.response_elements, extractgroupNameandpath(e.g., /service/, /dev/). - Look for immediate follow-on changes by the same actor within the next 15–30 minutes:
- AttachGroupPolicy (especially AdministratorAccess or broad s3:, iam:).
- AddUserToGroup (who was added and when?).
- Use GetGroup to enumerate current group membership and attached policies during triage.
- From
-
Correlate with broader activity
- Look for prior suspicious actions by the same user:
AssumeRole,CreateAccessKey, new IAM user/role. - After group creation, watch for data-access or configuration changes (e.g., S3 policy updates, KMS key policy changes)
- Look for prior suspicious actions by the same user:
False positive analysis
- IAM onboarding workflows or DevOps pipelines creating groups for new projects can trigger this alert.
- Test or sandbox accounts often create and delete groups routinely, validate account context and approval flows.
Response and remediation:
-
Containment:
- If suspicious, disable further changes by the actor (temporarily remove IAM write privileges or deactivate keys).
- Place a change freeze on the newly created group (block
AttachGroupPolicy/AddUserToGroupvia SCP/permissions boundary until review completes).
-
Investigation and scoping:
- Use
GetGroup,ListAttachedGroupPolicies,ListUsersInGroupto enumerate the group’s state and identify any suspicious policies or members. Investigate any attached policies granting broad privileges. - Hunt for same-actor
AttachGroupPolicy/AddUserToGroupevents across the last 24–48h.
- Use
-
Recovery and hardening:
- Delete unauthorized, unused or suspicious groups. remove rogue policies/members.
- Restrict who can call
iam:CreateGroup,iam:AttachGroupPolicy, andiam:AddUserToGroup(least privilege).
Additional information
References
Related rules
- AWS IAM User Created Access Keys For Another User
- AWS IAM AdministratorAccess Policy Attached to Group
- AWS IAM AdministratorAccess Policy Attached to Role
- AWS IAM AdministratorAccess Policy Attached to User
- AWS IAM Login Profile Added for Root