SelfSubjectRulesReviews Kubernetes-selfsubjectrulesreviews

1 operation, identified by Operation in the audit log.

OperationDescription
create-selfsubjectrulesreviewsSelfSubjectRulesReview created (lists all permissions the requesting user has; reconnaissance).

create-selfsubjectrulesreviews: create selfsubjectrulesreviews

#
Resource
Kubernetes-selfsubjectrulesreviews

Description

SelfSubjectRulesReview created (lists all permissions the requesting user has; reconnaissance).

Fields #

NameDescription
verbThe request verb (get, list, watch, create, update, replace, patch, delete, deletecollection, ...).
objectRef.resourceThe targeted resource type (plural API name, e.g. pods, secrets).
objectRef.subresourceThe targeted subresource, when present (e.g. exec, log, token).
objectRef.namespaceNamespace of the targeted object (empty for cluster-scoped resources).
objectRef.nameName of the targeted object.
objectRef.apiGroupAPI group of the targeted resource (empty string for core group).
user.usernameAuthenticated identity that issued the request (user or service account).
user.groupsGroups of the requesting identity.
sourceIPsSource IP addresses of the request.
responseStatus.codeHTTP status code of the API response (200, 201, 403, 404, ...).
stageAudit stage: RequestReceived, ResponseStarted, ResponseComplete, Panic.
requestReceivedTimestampTime the apiserver received the request.

Common Indicators #

Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.

FieldKindValueRulesVendors
aws::userAgentis_not_null1 ruleelastic, kusto
kubernetes.audit.impersonatedUser.usernamestarts_withsystem\:node\:1 ruleelastic
kubernetes.audit.objectRef.resourceinselfsubjectaccessreviews1 ruleelastic
kubernetes.audit.objectRef.resourceinselfsubjectrulesreviews1 ruleelastic
kubernetes.audit.user.usernamestarts_withsystem\:serviceaccount\:1 ruleelastic
kubernetes.audit.verbeqcreate1 ruleelastic

Detection Rules #

View all rules referencing this event →

Sigma #

  • RBAC Permission Enumeration Attempt source low: 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.

Elastic #

  • Kubernetes Suspicious Self-Subject Review via Unusual User Agent source low: This rule detects when a service account or node attempts to enumerate their own permissions via the selfsubjectaccessreview or selfsubjectrulesreview APIs via an unusual user agent. This is highly unusual behavior for non-human identities like service accounts and nodes. An adversary may have gained access to credentials/tokens and this could be an attempt to determine what privileges they have to facilitate further movement or execution within the cluster.