AWS IAM Group Deletion


Description

Detects when an IAM group is deleted using the DeleteGroup API call. Deletion of an IAM group may represent a malicious attempt to remove audit trails, disrupt operations, or hide adversary activity (for example after using the group briefly for privileged access). This can be an indicator of impact or cleanup in an attack lifecycle.

Query · kuery

data_stream.dataset: aws.cloudtrail and 
    event.provider: iam.amazonaws.com and 
    event.action: DeleteGroup and 
    event.outcome: success

Investigation fields

Pivot points the source recommends for triage.

  • @timestamp
  • user.name
  • user_agent.original
  • source.ip
  • aws.cloudtrail.user_identity.arn
  • aws.cloudtrail.user_identity.type
  • aws.cloudtrail.user_identity.access_key_id
  • event.action
  • event.outcome
  • cloud.account.id
  • cloud.region
  • aws.cloudtrail.request_parameters

Known false positives

  • Legitimate group deletion during decommissioning of projects, clean-up of service accounts, or identity lifecycle changes may trigger this alert. Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Resource group deletions by 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 Group Deletion

Attackers sometimes remove groups to erase evidence, disrupt operations, or prevent users from receiving needed permissions (Impact). Deletion can also follow malicious cleanup after attaching policies and using the group briefly. This alert fires on DeleteGroup API call. Consider intentional disruption or covering tracks, particularly if the group was privileged or recently modified.

Possible investigation steps

  • Identify the actor and environment
  • Review aws.cloudtrail.user_identity.arn, aws.cloudtrail.user_identity.access_key_id.
  • Check source.ip, user_agent.original, cloud.account.id, cloud.region for atypical activity.

  • Determine what was lost

  • From aws.cloudtrail.request_parameters, capture groupName.
  • Use history or logs to identify existing members and attached policies prior to deletion (ex: GetGroup, ListAttachedGroupPolicies).
  • Determine if the group contained privileged roles/policies that could have been weaponized.

  • Correlate with related activity

  • Look in the prior 1–24h for DetachGroupPolicy, RemoveUserFromGroup, DeleteGroupPolicy, which often precede deletion in adversary cleanup workflows.
  • After deletion, monitor for creation of new similarly-named groups, or re-attachment of policies to other groups/roles.

False positive analysis

  • Projects & services that are being decommissioned often require group deletion. Confirm through internal inventory and change control.
  • Sandbox or dev accounts frequently create and delete groups; ensure the environment context is understood.

Response and remediation

  • Containment: If deletion was unauthorized, restrict the actor’s IAM privileges and block further configuration changes.
  • Investigation and scoping: Recover details of the deleted group (members, policies) from logs or AWS Config, and determine the impact of the deletion (which users lost membership, service account disruption).
  • Recovery and hardening: Recreate the group if necessary, restore intended policies and memberships, enforce change-control for group deletions, restrict iam:DeleteGroup privileges, and create alerts for destructive IAM operations.

Additional information

AWS Security Best Practices

Raw source AWS IAM Group Deletion · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2020/05/21"
integration = ["aws"]
maturity = "production"
updated_date = "2026/04/10"

[rule]
author = ["Elastic"]
description = """
Detects when an IAM group is deleted using the DeleteGroup API call. Deletion of an IAM group may represent a malicious
attempt to remove audit trails, disrupt operations, or hide adversary activity (for example after using the group
briefly for privileged access). This can be an indicator of impact or cleanup in an attack lifecycle.
"""
false_positives = [
    """
    Legitimate group deletion during decommissioning of projects, clean-up of service accounts, or identity lifecycle
    changes may trigger this alert. Verify whether the user identity, user agent, and/or hostname should be making
    changes in your environment. Resource group deletions by unfamiliar users or hosts should be investigated. If known
    behavior is causing false positives, it can be exempted from the rule.
    """,
]
from = "now-6m"
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
language = "kuery"
license = "Elastic License v2"
name = "AWS IAM Group Deletion"
note = """## Triage and analysis

### Investigating AWS IAM Group Deletion

Attackers sometimes remove groups to erase evidence, disrupt operations, or prevent users from receiving needed permissions (Impact). Deletion can also follow malicious cleanup after attaching policies and using the group briefly. This alert fires on `DeleteGroup` API call. Consider intentional disruption or covering tracks, particularly if the group was privileged or recently modified.

### Possible investigation steps

- **Identify the actor and environment**  
  - Review `aws.cloudtrail.user_identity.arn`, `aws.cloudtrail.user_identity.access_key_id`.  
  - Check `source.ip`, `user_agent.original`, `cloud.account.id`, `cloud.region` for atypical activity.

- **Determine what was lost**
  - From `aws.cloudtrail.request_parameters`, capture `groupName`.  
  - Use history or logs to identify existing members and attached policies prior to deletion (ex: `GetGroup`, `ListAttachedGroupPolicies`).  
  - Determine if the group contained privileged roles/policies that could have been weaponized.

- **Correlate with related activity**
  - Look in the prior 1–24h for `DetachGroupPolicy`, `RemoveUserFromGroup`, `DeleteGroupPolicy`, which often precede deletion in adversary cleanup workflows.  
  - After deletion, monitor for creation of new similarly-named groups, or re-attachment of policies to other groups/roles.

### False positive analysis

- Projects & services that are being decommissioned often require group deletion. Confirm through internal inventory and change control.  
- Sandbox or dev accounts frequently create and delete groups; ensure the environment context is understood.

### Response and remediation

- **Containment**: If deletion was unauthorized, restrict the actor’s IAM privileges and block further configuration changes.  
- **Investigation and scoping**: Recover details of the deleted group (members, policies) from logs or AWS Config, and determine the impact of the deletion (which users lost membership, service account disruption).  
- **Recovery and hardening**: Recreate the group if necessary, restore intended policies and memberships, enforce change-control for group deletions, restrict `iam:DeleteGroup` privileges, and create alerts for destructive IAM operations.

### Additional information
[AWS Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/)
"""
references = [
    "https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-group.html",
    "https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroup.html",
]
risk_score = 21
rule_id = "867616ec-41e5-4edc-ada2-ab13ab45de8a"
severity = "low"
tags = [
    "Domain: Cloud",
    "Data Source: AWS",
    "Data Source: Amazon Web Services",
    "Data Source: AWS IAM",
    "Tactic: Impact",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "query"

query = '''
data_stream.dataset: aws.cloudtrail and 
    event.provider: iam.amazonaws.com and 
    event.action: DeleteGroup and 
    event.outcome: success
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1531"
name = "Account Access Removal"
reference = "https://attack.mitre.org/techniques/T1531/"


[rule.threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "user.name",
    "user_agent.original",
    "source.ip",
    "aws.cloudtrail.user_identity.arn",
    "aws.cloudtrail.user_identity.type",
    "aws.cloudtrail.user_identity.access_key_id",
    "event.action",
    "event.outcome",
    "cloud.account.id",
    "cloud.region",
    "aws.cloudtrail.request_parameters",
]

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.