Detection rules › Sigma

IAM Policy Attachment Attempt

Status
test
Severity
medium
Log source
product aws, service cloudtrail
Author
nishikawaakira (@nishikawaakira)
Source
github.com/Yamato-Security/suzaku-rules

Detects a failed attempt to attach an IAM policy to a user, group, or role. Even though the attempt was denied, it indicates the attacker has valid credentials and is attempting privilege escalation. This is commonly observed when attackers use stolen credentials that lack IAM write permissions. Note: AccessDenied events may have empty requestParameters, so this rule does not filter by policy name to avoid missing detections.

MITRE ATT&CK coverage

TacticTechniques
Privilege EscalationT1098.003 Account Manipulation: Additional Cloud Roles

Event coverage

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body yaml

title: IAM Policy Attachment Attempt
id: 0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5e
status: test
description: |
    Detects a failed attempt to attach an IAM policy to a user, group, or role.
    Even though the attempt was denied, it indicates the attacker has valid
    credentials and is attempting privilege escalation. This is commonly
    observed when attackers use stolen credentials that lack IAM write
    permissions.
    Note: AccessDenied events may have empty requestParameters, so this rule
    does not filter by policy name to avoid missing detections.
references:
    - https://attack.mitre.org/techniques/T1098/003/
    - https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachUserPolicy.html
    - https://hackingthe.cloud/aws/exploitation/iam_privilege_escalation/
author: nishikawaakira (@nishikawaakira)
date: 2026-05-28
modified: 2026-05-29
tags:
    - attack.privilege-escalation
    - attack.t1098.003
logsource:
    product: aws
    service: cloudtrail
detection:
    selection:
        eventSource: iam.amazonaws.com
        eventName:
            - AttachUserPolicy
            - AttachGroupPolicy
            - AttachRolePolicy
        errorCode: AccessDenied
    condition: selection
falsepositives:
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    eventSource: iam.amazonaws.com
    eventName:
        - AttachUserPolicy
        - AttachGroupPolicy
        - AttachRolePolicy
    errorCode: AccessDenied

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
errorCodeeq
  • AccessDenied
eventNameeq
  • AttachGroupPolicy
  • AttachRolePolicy
  • AttachUserPolicy
eventSourceeq
  • iam.amazonaws.com