SubjectAccessReviews
| Operation | Description | Sample | Rule |
|---|---|---|---|
| create-subjectaccessreviews | SubjectAccessReview created (cluster-wide permission check; reconnaissance or automated RBAC introspection). | Y | Y |
create subjectaccessreviews
#Description
SubjectAccessReview created (cluster-wide permission check; reconnaissance or automated RBAC introspection).
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/authorization.k8s.io/v1/subjectaccessreviews",
"verb": "create",
"user": {
"username": "kubernetes-admin",
"groups": [
"kubeadm:cluster-admins",
"system:authenticated"
],
"extra": {
"authentication.kubernetes.io/credential-id": [
"X509SHA256=9bb0383c49b319fbf6b5ed61ab944378956d4292c784d32244ce2fa4dd846a3c"
]
}
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
"objectRef": {
"resource": "subjectaccessreviews",
"apiGroup": "authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "SubjectAccessReview",
"apiVersion": "authorization.k8s.io/v1",
"metadata": {},
"spec": {
"resourceAttributes": {
"namespace": "dw-harn",
"verb": "get",
"resource": "pods"
},
"user": "dw-harn-user"
},
"status": {
"allowed": false
}
},
"responseObject": {
"kind": "SubjectAccessReview",
"apiVersion": "authorization.k8s.io/v1",
"metadata": {},
"spec": {
"resourceAttributes": {
"namespace": "dw-harn",
"verb": "get",
"resource": "pods"
},
"user": "dw-harn-user"
},
"status": {
"allowed": false
}
},
"requestReceivedTimestamp": "2026-07-02T04:48:59.692731Z",
"stageTimestamp": "2026-07-02T04:48:59.693974Z",
"annotations": {
"authorization.k8s.io/decision": "allow",
"authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"kubeadm:cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"kubeadm:cluster-admins\""
}
}
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries → Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs. This rule detects interactive commands executed inside containers that use atypical utilities to hit the Kubernetes API, paired with near-simultaneous API activity on pods, secrets, service accounts, roles/bindings, or pod exec/attach/log/portforward. It surfaces hands-on-keyboard discovery and lateral movement using custom scripts that evade common tool allowlists; for example, an intruder opens a shell in a pod, uses Python to query the in-cluster API to list secrets, then triggers pods/exec to pivot into another workload.Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#