ServiceAccounts
| Operation | Description | Sample | Rule |
|---|---|---|---|
| get-serviceaccounts | Y | Y | |
| list-serviceaccounts | Y | Y | |
| watch-serviceaccounts | Y | Y | |
| create-serviceaccounts | ServiceAccount created (persistence: new identity that can be bound to roles). | Y | Y |
| update-serviceaccounts | Y | Y | |
| patch-serviceaccounts | Y | Y | |
| delete-serviceaccounts | Y | Y | |
| deletecollection-serviceaccounts | Y | N | |
| create-serviceaccounts-token | Service account token created via TokenRequest API (credential access). | Y | Y |
| any-serviceaccounts | Synthetic aggregation for rules that filter the serviceaccounts resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone. | N | Y |
get serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts/dw-harn-serviceaccounts",
"verb": "get",
"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": "serviceaccounts",
"namespace": "dw-harn",
"name": "dw-harn-serviceaccounts",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:46:50.231726Z",
"stageTimestamp": "2026-07-02T04:46:50.233567Z",
"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. The rule groups GKE audit get/list events on namespaces, nodes, pods, configmaps, serviceaccounts, roles, rolebindings, clusterroles, and clusterrolebindings into one-minute windows per Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches list-serviceaccounts: list serviceaccounts, watch-serviceaccounts: watch serviceaccounts, create-serviceaccounts: create serviceaccounts, update-serviceaccounts: update serviceaccounts, patch-serviceaccounts: patch serviceaccounts Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
T1613↳ also matches list-serviceaccounts: list serviceaccounts Investigation guide
Triage and analysis#
Investigating GKE Multi-Resource Discovery#
client.user.email, source.ip, and user_agent.original. It alerts when five or more distinct resource kinds appear and the burst includes both cluster-layout kinds (namespaces, pods, or nodes) and RBAC kinds. Allowed and denied authorizations are both included: failures still signal probing.Possible investigation steps#
Esql.enumerated_resources, Esql.enumerated_namespaces, and Esql.enumerated_resource_names for ordering and targeted APIs.source.ip and user_agent.original match expected admin or automation clients.False positive analysis#
Response and remediation#
References #
list serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts?limit=500&timeout=3s",
"verb": "list",
"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": "serviceaccounts",
"namespace": "dw-harn",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:46:50.358300Z",
"stageTimestamp": "2026-07-02T04:46:50.359722Z",
"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. The rule groups GKE audit get/list events on namespaces, nodes, pods, configmaps, serviceaccounts, roles, rolebindings, clusterroles, and clusterrolebindings into one-minute windows per Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-serviceaccounts: get serviceaccounts, watch-serviceaccounts: watch serviceaccounts, create-serviceaccounts: create serviceaccounts, update-serviceaccounts: update serviceaccounts, patch-serviceaccounts: patch serviceaccounts Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
T1613↳ also matches get-serviceaccounts: get serviceaccounts Investigation guide
Triage and analysis#
Investigating GKE Multi-Resource Discovery#
client.user.email, source.ip, and user_agent.original. It alerts when five or more distinct resource kinds appear and the burst includes both cluster-layout kinds (namespaces, pods, or nodes) and RBAC kinds. Allowed and denied authorizations are both included: failures still signal probing.Possible investigation steps#
Esql.enumerated_resources, Esql.enumerated_namespaces, and Esql.enumerated_resource_names for ordering and targeted APIs.source.ip and user_agent.original match expected admin or automation clients.False positive analysis#
Response and remediation#
References #
watch serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts?resourceVersion=1368&timeout=3s&watch=true",
"verb": "watch",
"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": "serviceaccounts",
"namespace": "dw-harn",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:46:50.360921Z",
"stageTimestamp": "2026-07-02T04:46:53.361713Z",
"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, T1610↳ also matches get-serviceaccounts: get serviceaccounts, list-serviceaccounts: list serviceaccounts, create-serviceaccounts: create serviceaccounts, update-serviceaccounts: update serviceaccounts, patch-serviceaccounts: patch serviceaccounts Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
References #
create serviceaccounts
#Description
ServiceAccount created (persistence: new identity that can be bound to roles).
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts?fieldManager=kubectl-create&fieldValidation=Strict",
"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": "serviceaccounts",
"namespace": "dw-harn",
"name": "dw-harn-serviceaccounts",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn"
}
},
"responseObject": {
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1368",
"creationTimestamp": "2026-07-02T04:46:50Z"
}
},
"requestReceivedTimestamp": "2026-07-02T04:46:50.164015Z",
"stageTimestamp": "2026-07-02T04:46:50.167716Z",
"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\""
}
}
Common Indicators #
Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.
| Field | Kind | Value | Rules | Vendors |
|---|---|---|---|---|
objectRef.resource | eq | serviceaccounts | 3 rules | falco, sigma |
verb | eq | create | 3 rules | falco, sigma |
responseStatus.code (falco rule field) | starts_with | 2 | 2 rules | falco |
objectRef.namespace (falco rule field) | in | kube-public | 1 rule | falco |
objectRef.namespace (falco rule field) | in | kube-system | 1 rule | falco |
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.Sigma #
T1136Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-serviceaccounts: get serviceaccounts, list-serviceaccounts: list serviceaccounts, watch-serviceaccounts: watch serviceaccounts, update-serviceaccounts: update serviceaccounts, patch-serviceaccounts: patch serviceaccounts Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
Falco #
References #
update serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts/dw-harn-serviceaccounts?fieldManager=kubectl-replace&fieldValidation=Strict",
"verb": "update",
"user": {
"username": "kubernetes-admin",
"groups": [
"kubeadm:cluster-admins",
"system:authenticated"
],
"extra": {
"authentication.kubernetes.io/credential-id": [
"X509SHA256=4cf95d11cbd90036bab41cdc6b88cc8f91550e9135ed4bb61495b02f647812ff"
]
}
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
"objectRef": {
"resource": "serviceaccounts",
"namespace": "dw-harn",
"name": "dw-harn-serviceaccounts",
"uid": "00000000-0000-0000-0000-000000000000",
"apiVersion": "v1",
"resourceVersion": "518"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "518",
"creationTimestamp": "2026-07-02T21:30:12Z",
"labels": {
"dw-harn-patched": "1"
}
}
},
"responseObject": {
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "518",
"creationTimestamp": "2026-07-02T21:30:12Z",
"labels": {
"dw-harn-patched": "1"
}
}
},
"requestReceivedTimestamp": "2026-07-02T21:30:15.630701Z",
"stageTimestamp": "2026-07-02T21:30:15.633225Z",
"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, T1610↳ also matches get-serviceaccounts: get serviceaccounts, list-serviceaccounts: list serviceaccounts, watch-serviceaccounts: watch serviceaccounts, create-serviceaccounts: create serviceaccounts, patch-serviceaccounts: patch serviceaccounts Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
References #
patch serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts/dw-harn-serviceaccounts?fieldManager=kubectl-patch",
"verb": "patch",
"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": "serviceaccounts",
"namespace": "dw-harn",
"name": "dw-harn-serviceaccounts",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"metadata": {
"labels": {
"dw-harn-patched": "1"
}
}
},
"responseObject": {
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1373",
"creationTimestamp": "2026-07-02T04:46:50Z",
"labels": {
"dw-harn-patched": "1"
}
}
},
"requestReceivedTimestamp": "2026-07-02T04:46:53.430450Z",
"stageTimestamp": "2026-07-02T04:46:53.434241Z",
"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, T1610↳ also matches get-serviceaccounts: get serviceaccounts, list-serviceaccounts: list serviceaccounts, watch-serviceaccounts: watch serviceaccounts, create-serviceaccounts: create serviceaccounts, update-serviceaccounts: update serviceaccounts Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
References #
delete serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts/dw-harn-serviceaccounts",
"verb": "delete",
"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": "serviceaccounts",
"namespace": "dw-harn",
"name": "dw-harn-serviceaccounts",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"kind": "DeleteOptions",
"apiVersion": "meta.k8s.io/__internal",
"propagationPolicy": "Background"
},
"responseObject": {
"kind": "ServiceAccount",
"apiVersion": "v1",
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1374",
"creationTimestamp": "2026-07-02T04:46:50Z",
"labels": {
"dw-harn-patched": "1"
}
}
},
"requestReceivedTimestamp": "2026-07-02T04:46:53.497986Z",
"stageTimestamp": "2026-07-02T04:46:53.502193Z",
"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\""
}
}
Common Indicators #
Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.
| Field | Kind | Value | Rules | Vendors |
|---|---|---|---|---|
objectRef.resource (falco rule field) | eq | serviceaccounts | 1 rule | falco |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries →Falco #
References #
deletecollection serviceaccounts
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts?labelSelector=dw-harn-patched",
"verb": "deletecollection",
"user": {
"username": "kubernetes-admin",
"groups": [
"kubeadm:cluster-admins",
"system:authenticated"
],
"extra": {
"authentication.kubernetes.io/credential-id": [
"X509SHA256=3ffde68ef687218e01296d94b0aa59c81cc98de2bd73ab70e21510c8cd4b9cec"
]
}
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
"objectRef": {
"resource": "serviceaccounts",
"namespace": "dw-harn",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"responseObject": {
"kind": "ServiceAccountList",
"apiVersion": "v1",
"metadata": {
"resourceVersion": "584"
},
"items": [
{
"metadata": {
"name": "dw-harn-serviceaccounts",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "582",
"creationTimestamp": "2026-07-02T23:12:12Z",
"labels": {
"dw-harn-patched": "1"
}
}
}
]
},
"requestReceivedTimestamp": "2026-07-02T23:12:16.284699Z",
"stageTimestamp": "2026-07-02T23:12:16.290321Z",
"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\""
}
}
References #
create serviceaccounts/token
#Description
Service account token created via TokenRequest API (credential access).
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/api/v1/namespaces/dw-harn/serviceaccounts/dw-harn-token-sa/token",
"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": "serviceaccounts",
"namespace": "dw-harn",
"name": "dw-harn-token-sa",
"apiVersion": "v1",
"subresource": "token"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "TokenRequest",
"apiVersion": "authentication.k8s.io/v1",
"metadata": {},
"spec": {
"audiences": null,
"expirationSeconds": 3600,
"boundObjectRef": null
},
"status": {
"token": "",
"expirationTimestamp": null
}
},
"responseObject": {
"kind": "TokenRequest",
"apiVersion": "authentication.k8s.io/v1",
"metadata": {
"name": "dw-harn-token-sa",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"creationTimestamp": "2026-07-02T04:48:59Z"
},
"spec": {
"audiences": [
"https://kubernetes.default.svc.cluster.local"
],
"expirationSeconds": 3600,
"boundObjectRef": null
},
"status": {
"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ii1pRWZhalpkaDVveXpnQ2RRVmFJMk9IWXZLN3hQOFVOVWJjYTRDSjF5X00ifQ.eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNzgyOTcxMzM5LCJpYXQiOjE3ODI5Njc3MzksImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwianRpIjoiZmJiMmJiZTQtNzQxNS00MzVhLWI2OWMtZmZiMTI3YzM4OGI3Iiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJkdy1oYXJuIiwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImR3LWhhcm4tdG9rZW4tc2EiLCJ1aWQiOiI1MmYzYmEzYy02MGViLTRhMTItOWFiNi1mMDA5MjhiZGI2MWMifX0sIm5iZiI6MTc4Mjk2NzczOSwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OmR3LWhhcm46ZHctaGFybi10b2tlbi1zYSJ9.FRc-SNR2gmUNwy1NbnZWnldBPTBwczIrDrzqwoFulTVkvo3-7tkropqqlPH5i9iqNX20_mxEvSvZPv8bwd7aVjE5KO3PvziR_VaBFHv8_oTxJ0aGQ74VU2K7U_pT-r8CSFLg_y2aLsR_NlxeIpjrM-CWyeYWoOiFCbjRXYOVjJaQHL5oEKccnkFG77WKWw1O3bP2OftoAuC5LpCtZl0jMtJh2JRR4Qze7pult1ih_oiCquJG9BQLi9ZFkzEv3If2-I_2x699OeZ-ykgn-tJa9-Y_Qhq9pEmHuJ6Foonex8qCC8fxD3c3GM8dB6b0ui4NYINXLlj4HSQFtxkT0J4fZg",
"expirationTimestamp": "2026-07-02T05:48:59Z"
}
},
"requestReceivedTimestamp": "2026-07-02T04:48:59.372452Z",
"stageTimestamp": "2026-07-02T04:48:59.375641Z",
"annotations": {
"authentication.kubernetes.io/issued-credential-id": "JTI=00000000-0000-0000-0000-000000000000",
"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\""
}
}
Common Indicators #
Field/value combinations most frequently checked by detection rules targeting this event, derived from cross-vendor predicate analysis.
| Field | Kind | Value | Rules | Vendors |
|---|---|---|---|---|
azure.platformlogs.category (elastic rule field) | in | kube-audit | 1 rule | elastic |
azure.platformlogs.category (elastic rule field) | in | kube-audit-admin | 1 rule | elastic |
azure.platformlogs.properties.log.responseStatus.code (elastic rule field) | in | 200 | 1 rule | elastic |
azure.platformlogs.properties.log.responseStatus.code (elastic rule field) | in | 201 | 1 rule | elastic |
azure.platformlogs.properties.log.stage (elastic rule field) | eq | responsecomplete | 1 rule | elastic |
azure.platformlogs.properties.log.verb (elastic rule field) | eq | create | 1 rule | elastic |
kubernetes.audit.verb (elastic rule field) | eq | create | 1 rule | elastic |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries → AKS kube-audit events are carried under the flattened This alert indicates a successful create against the serviceaccounts/token subresource (TokenRequest API), which issues a new service account token without a filesystem read. On GKE this can be abused to mint tokens for privileged service accounts — including those bound through Workload Identity — and pivot to GCP APIs. This alert indicates a successful Elastic #
T1528Investigation guide
Triage and analysis#
Investigating Azure AKS Service Account Token Created via TokenRequest API#
azure.platformlogs.properties.log.* subtree and share the ARM operation event.action: Microsoft.ContainerService/managedClusters/diagnosticLogs/Read. The TokenRequest API (serviceaccounts/token) mints a bound service account token. The kubelet (system:node:*) and the kube-controller-manager (aksService) mint these tokens continuously for normal pod operation and are excluded; the signal is a non-platform identity minting one. An attacker with rights over a service account can request a token to act as that workload identity, reaching resources the compromised principal cannot.Possible investigation steps#
azure.platformlogs.properties.log.user.username (and its groups in azure.platformlogs.properties.log.user.groups) and whether it should mint tokens. A workload service account (system:serviceaccount:<ns>:<sa>) minting a token, or masterclient (the local cluster-admin cert), is the higher-concern case.azure.platformlogs.properties.log.userAgent to distinguish interactive/expected tooling (kubectl create token) from custom clients (for example curl), which is a stronger indicator of scripted abuse.azure.platformlogs.properties.log.objectRef.name / azure.platformlogs.properties.log.objectRef.namespace and what RBAC that account holds; minting a token for a higher-privileged service account is privilege escalation.azure.platformlogs.properties.log.sourceIPs and pivot on it for follow-on API calls made with the minted token, and correlate with recent RBAC changes, secret reads, or exec sessions from the same identity.False positive analysis#
aksService, which is excluded). Additional automation such as GitOps operators or CI running kubectl create token may surface; baseline those identities and exclude the specific validated account rather than re-broadening to all system:*, which would blind the rule to compromised workload service accounts.Response and remediation#
T1552, T1552.007Investigation guide
Triage and analysis#
Investigating GKE Service Account Token Created via TokenRequest API#
Possible investigation steps#
client.user.email, source.ip, and user_agent.original.gcp.audit.resource_name (typically core/v1/namespaces/<ns>/serviceaccounts/<sa>/token).create on serviceaccounts/token.False positive analysis#
Response and remediation#
T1552, T1552.007Investigation guide
Triage and analysis#
Investigating Kubernetes Service Account Token Created via TokenRequest API#
create against the serviceaccounts/token subresource (TokenRequest API), which issues a new service account token without a filesystem read. In EKS and other managed clusters, this can be abused to mint tokens for more privileged service accounts (including IRSA-linked ones) and pivot to cloud APIs.What to review first#
user.name / kubernetes.audit.user.usernamesource.ip / kubernetes.audit.sourceIPsuser_agent.original / kubernetes.audit.userAgentkubernetes.audit.user.extra.* (e.g., arn, principalId).kubernetes.audit.objectRef.namespace and kubernetes.audit.objectRef.namekubernetes.audit.requestURI (should resemble /api/v1/namespaces/<ns>/serviceaccounts/<sa>/token)kubernetes.audit.annotations.authentication_kubernetes_io/issued-credential-id (token JTI/issued credential id)Scoping#
create on serviceaccounts/token in the affected namespace.user.name and source.ip for follow-on secret reads, pod exec, RBAC changes, or cloud API calls.Response and remediation#
serviceaccounts/token) and rotate the affected service account credentials where applicable.Panther #
T1098, T1552
References #
any verb on serviceaccounts (synthetic aggregation)
#Description
Synthetic aggregation for rules that filter the serviceaccounts resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone.
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries →Elastic #
get/list traffic across distinct API resource kinds that answer those questions (namespaces, workloads, roles, cluster-wide roles) is a common setup and orientation pattern for both interactive attackers and automated recon scripts. It is less typical for steady-state controllers, which usually touch a narrow set of resources repeatedly. This rule highlights that cross-resource burst from a single client fingerprint within a one-minute bucket so analysts can separate routine automation from potential discovery and permission reconnaissance ahead of follow-on actions.T1613