RBAC Permission Enumeration Attempt
Detects identities attempting to enumerate their Kubernetes RBAC permissions. In the early stages of a breach, attackers will aim to list the permissions they have within the compromised environment. In a Kubernetes cluster, this can be achieved by interacting with the API server, and querying the SelfSubjectAccessReview API via e.g. a "kubectl auth can-i --list" command. This will enumerate the Role-Based Access Controls (RBAC) rules defining the compromised user's authorization.
Sigma rule (View on GitHub)
1title: RBAC Permission Enumeration Attempt
2id: 84b777bd-c946-4d17-aa2e-c39f5a454325
3status: test
4description: |
5 Detects identities attempting to enumerate their Kubernetes RBAC permissions.
6 In the early stages of a breach, attackers will aim to list the permissions they have within the compromised environment.
7 In a Kubernetes cluster, this can be achieved by interacting with the API server, and querying the SelfSubjectAccessReview API via e.g. a "kubectl auth can-i --list" command.
8 This will enumerate the Role-Based Access Controls (RBAC) rules defining the compromised user's authorization.
9references:
10 - https://www.elastic.co/guide/en/security/current/kubernetes-suspicious-self-subject-review.html
11author: Leo Tsaousis (@laripping)
12date: 2024-03-26
13tags:
14 - attack.t1069.003
15 - attack.t1087.004
16 - attack.discovery
17logsource:
18 category: application
19 product: kubernetes
20 service: audit
21detection:
22 selection:
23 verb: 'create'
24 apiGroup: 'authorization.k8s.io'
25 objectRef.resource: 'selfsubjectrulesreviews'
26 condition: selection
27falsepositives:
28 - Unknown
29level: low
References
Related rules
- Discovery Using AzureHound
- PUA - Advanced IP/Port Scanner Update Check
- PUA - Crassus Execution
- HackTool - SharpView Execution
- HackTool - TruffleSnout Execution