AWS IAM User Addition to Group
Description
Identifies the addition of a user to a specified group in AWS Identity and Access Management (IAM). Any user added to a group automatically gains the permissions that are assigned to the group. If the target group carries elevated or admin privileges, this action can instantly grant high-risk permissions useful for credential misuse, lateral movement, or privilege escalation.
Query · kuery
data_stream.dataset: aws.cloudtrail and
event.provider: iam.amazonaws.com and
event.action: AddUserToGroup and
event.outcome: success
Investigation fields
Pivot points the source recommends for triage.
@timestampuser.nameuser_agent.originalsource.ipaws.cloudtrail.user_identity.arnaws.cloudtrail.user_identity.typeaws.cloudtrail.user_identity.access_key_iduser.target.nameevent.actionevent.outcomecloud.account.idcloud.regionaws.cloudtrail.request_parameters
Known false positives
- Legitimate operations such as new user onboarding, role changes, or service account updates may trigger this event. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. User additions from unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can be exempted from the rule.
Analyst notes
Investigating AWS IAM User Addition to Group
This rule detects when an IAM user is added to an IAM group via the AddUserToGroup API call. If the target group holds elevated privileges, this action may immediately grant that user wide-ranging access useful for credential misuse or lateral movement. This rule helps detect unauthorized privilege escalation via group membership change. Treat as high-risk when the destination group has wide scope (e.g., AdministratorAccess or permissive inline policies).
Possible investigation steps
- Identify the actor and target
- Check
aws.cloudtrail.user_identity.arnfor who added the user. - From
aws.cloudtrail.request_parameters, captureuserName(added user) andgroupName(destination group). -
Check
source.ip,user_agent.original,cloud.regionfor unusual patterns. -
Examine the group’s privileges
- Use
GetGroup,ListAttachedGroupPoliciesto see what policies the group holds. Look forAdministratorAccess,iam:*,s3:*,ec2:*or cross-account permissions. -
Check whether the group was recently created (
CreateGroup) or recently escalated (AttachGroupPolicy). Common attacker pattern: create > attach policy > add user. -
Correlate with surrounding activity
- Look for preceding events by the actor:
AssumeRole,GetSessionToken,CreateAccessKey,AttachGroupPolicy. - Follow the added user’s activities after group membership. Look for sensitive operations (e.g., IAM actions, S3 policy changes, EC2 snapshot/AMI activity).
False positive analysis
- Onboarding or role transitions may legitimately add users to groups.
- Automated Identity-Management pipelines may add many users to service groups; validate know
Response and remediation
- Containment:
- If unapproved, remove the user from the group immediately (
RemoveUserFromGroup) and rotate their access keys. -
Temporarily restrict group policy changes while assessing blast radius.
-
Investigation and scoping:
- Review all actions executed by the newly added user since the change (ex: PutBucketPolicy, CreateAccessKey, PassRole).
-
Confirm whether other users were added to the same group within the same window.
-
Recovery and hardening:
- Enforce least privilege by redesigning large-group membership.
- Restrict
iam:AddUserToGroupto only appropriate service principals with approval workflow. - Create detections for AttachGroupPolicy to powerful policies and for mass AddUserToGroup patterns.