Skip to content

Commit c160fc7

Browse files
authored
Add GCP rule: IAM Policy Changed - Privilege Escalation (#2188)
* feature(rules/google): add rule IAM Policy Changed - Privilege Escalation * fix(rule/google): changing 'exists(log.protoPayload.request.policy.auditConfigs)' to 'exists(log.protoPayload.request.policy.bindings) to improve detection logic
1 parent 118814c commit c160fc7

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Rule version v1.0.0
2+
3+
dataTypes:
4+
- google
5+
name: GCP IAM Policy Changed — Privilege Escalation
6+
impact:
7+
confidentiality: 4
8+
integrity: 4
9+
availability: 3
10+
category: Privilege Escalation
11+
technique: "T1098 - Account Manipulation"
12+
adversary: origin
13+
references:
14+
- https://cloud.google.com/iam/docs/audit-logging#admin-activity
15+
- https://cloud.google.com/logging/docs/audit/cal-categories#iam
16+
- https://attack.mitre.org/techniques/T1098/
17+
description: |
18+
Detects changes to IAM policies at the project or resource level in GCP. This includes granting high-privilege roles (Owner, Editor, IAM Admin) to users or service accounts. Attackers commonly use IAM policy modifications to escalate privileges and establish persistence.
19+
20+
Next Steps:
21+
1. Verify if the IAM change was authorized and matches a change request
22+
2. Check which roles were granted — especially Owner, Editor, or IAM Admin
23+
3. Identify the target user or service account receiving new privileges
24+
4. If unauthorized, revoke the binding immediately and rotate credentials
25+
5. Review the actor's session for other privilege escalation attempts
26+
6. Check if the service account's workload identity was compromised
27+
where: |
28+
oneof("log.protoPayloadServiceName", ["cloudresourcemanager.googleapis.com", "pubsub.googleapis.com"]) &&
29+
oneof("log.protoPayloadMethodName", ["SetIamPolicy", "google.iam.v1.IAMPolicy.SetIamPolicy"]) &&
30+
exists("log.protoPayload.request.policy.bindings") && contains("log.logName", "activity") && exists("origin.user")

0 commit comments

Comments
 (0)