List Own Permissions (kubernetes)
Platform | Author | Last Update |
---|---|---|
kubernetes | Leo Tsaousis | 2024-12-02 |
List the RBAC permissions assigned to the current entity
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 SelfSubjectAccessReview API, e.g. via “kubectl auth” command. This will enumerate the Role-Based Access Controls (RBAC) rules defining the compromised user’s authorization.
MITRE IDs
Scope
This test case does not need Cluster-wide permissions
Required Permissions
- apiGroups: - authorization.k8s.io namespaced: true resources: - selfsubjectrulesreviews verbs: - create
Required Parameters
None
Attacker Action
kubectl auth can-i --list
Detection Case
ELK query
When logs are ingested into ELK, the following query can be used to identify relevant events.
verb:create AND apiGroup:authorization.k8s.io AND resource:selfsubjectrulesreviews
Sigma Definition
---title: List Own Permissionsid: 84b777bd-c946-4d17-aa2e-c39f5a454325status: experimentalauthor: Leo Tsaousisdate: 2024-12-02description: | List the RBAC permissions assigned to the current entity
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 SelfSubjectAccessReview API, e.g. via "kubectl auth" command. This will enumerate the Role-Based Access Controls (RBAC) rules defining the compromised user's authorization.logsource: product: kubernetes service: auditdetection: selection: verb: create apiGroup: authorization.k8s.io resource: selfsubjectrulesreviews
condition: selectionlevel: lowtags:- attack.T1069.003- attack.T1087.004