ClusterRoles
| Operation | Description | Sample | Rule |
|---|---|---|---|
| get-clusterroles | Y | Y | |
| list-clusterroles | Y | Y | |
| watch-clusterroles | Y | Y | |
| create-clusterroles | ClusterRole created (sensitive RBAC change; wildcard verbs/resources indicate overprivilege). | Y | Y |
| update-clusterroles | Modifies an existing ClusterRole's rules. Elastic checks the updated rule set for wildcard verbs/resources or escalation verbs (bind, escalate, impersonate). | Y | Y |
| patch-clusterroles | Partially modifies a ClusterRole. Elastic checks both the request and the resulting rule set for wildcard verbs/resources, which silently widens the role's power. | Y | Y |
| delete-clusterroles | Removes a ClusterRole. Elastic flags this when the acting identity is a service account, since accounts rarely administer RBAC themselves. | Y | Y |
| deletecollection-clusterroles | Y | N | |
| any-clusterroles | Synthetic aggregation for rules that filter the clusterroles resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone. | N | Y |
get clusterroles
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles/dw-harn-clusterroles",
"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": "clusterroles",
"name": "dw-harn-clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:48:10.890897Z",
"stageTimestamp": "2026-07-02T04:48:10.892260Z",
"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 |
|---|---|---|---|---|
container.id (elastic rule field) | wildcard | * | 1 rule | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | namespaces | 1 rule | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | serviceaccounts | 1 rule | elastic |
kubernetes.audit.verb (elastic rule field) | in | watch | 1 rule | elastic |
process.args (elastic rule field) | in | /bin/chmod | 1 rule | elastic |
process.args (elastic rule field) | in | /bin/which | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/bin/chmod | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/bin/which | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/local/bin/chmod | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/local/bin/which | 1 rule | elastic |
process.args (elastic rule field) | in | chmod | 1 rule | elastic |
process.args (elastic rule field) | in | which | 1 rule | elastic |
process.interactive (elastic rule field) | eq | true | 1 rule | elastic |
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-clusterroles: list clusterroles, watch-clusterroles: watch clusterroles, create-clusterroles: create clusterroles, update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles 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-clusterroles: list clusterroles 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 clusterroles
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles?labelSelector=dw-harn-patched%3D1",
"verb": "list",
"user": {
"username": "kubernetes-admin",
"groups": [
"kubeadm:cluster-admins",
"system:authenticated"
],
"extra": {
"authentication.kubernetes.io/credential-id": [
"X509SHA256=fd038e49e5a46840f8f58360c3f09257f92bccd0cadad3ad68fcfec20b99b52c"
]
}
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
"objectRef": {
"resource": "clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T22:13:05.287498Z",
"stageTimestamp": "2026-07-02T22:13:05.289277Z",
"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 |
|---|---|---|---|---|
container.id (elastic rule field) | wildcard | * | 1 rule | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | namespaces | 1 rule | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | serviceaccounts | 1 rule | elastic |
kubernetes.audit.verb (elastic rule field) | in | watch | 1 rule | elastic |
process.args (elastic rule field) | in | /bin/chmod | 1 rule | elastic |
process.args (elastic rule field) | in | /bin/which | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/bin/chmod | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/bin/which | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/local/bin/chmod | 1 rule | elastic |
process.args (elastic rule field) | in | /usr/local/bin/which | 1 rule | elastic |
process.args (elastic rule field) | in | chmod | 1 rule | elastic |
process.args (elastic rule field) | in | which | 1 rule | elastic |
process.interactive (elastic rule field) | eq | true | 1 rule | elastic |
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-clusterroles: get clusterroles, watch-clusterroles: watch clusterroles, create-clusterroles: create clusterroles, update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles 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-clusterroles: get clusterroles 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 clusterroles
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles?resourceVersion=921&timeout=3s&watch=true",
"verb": "watch",
"user": {
"username": "kubernetes-admin",
"groups": [
"kubeadm:cluster-admins",
"system:authenticated"
],
"extra": {
"authentication.kubernetes.io/credential-id": [
"X509SHA256=fd038e49e5a46840f8f58360c3f09257f92bccd0cadad3ad68fcfec20b99b52c"
]
}
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
"objectRef": {
"resource": "clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T22:13:01.905458Z",
"stageTimestamp": "2026-07-02T22:13:04.919924Z",
"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-clusterroles: get clusterroles, list-clusterroles: list clusterroles, create-clusterroles: create clusterroles, update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles 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 clusterroles
#Description
ClusterRole created (sensitive RBAC change; wildcard verbs/resources indicate overprivilege).
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles?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": "clusterroles",
"name": "dw-harn-clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "ClusterRole",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-clusterroles"
},
"rules": [
{
"verbs": [
"get"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"responseObject": {
"kind": "ClusterRole",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-clusterroles",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1665",
"creationTimestamp": "2026-07-02T04:48:10Z"
},
"rules": [
{
"verbs": [
"get"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T04:48:10.823200Z",
"stageTimestamp": "2026-07-02T04:48:10.828015Z",
"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 | clusterroles | 5 rules | falco |
objectRef.resource (falco rule field) | eq | roles | 4 rules | falco |
stage (falco rule field) | eq | responsecomplete | 5 rules | falco |
kubernetes.audit.objectRef.resource (elastic rule field) | in | clusterroles | 4 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | roles | 4 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | create | 4 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | patch | 4 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | update | 4 rules | elastic |
resource (panther rule field) | in | clusterroles | 4 rules | panther |
resource (panther rule field) | in | roles | 4 rules | panther |
username (panther rule field) | contains | serviceaccount | 4 rules | panther |
verb (falco rule field) | eq | create | 4 rules | falco |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.create | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.patch | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.update | 3 rules | elastic |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries → This rule detects allowed create, update, or patch actions on Roles and ClusterRoles that introduce high-risk RBAC permissions, including wildcard access and escalation verbs like bind, escalate, or impersonate. This ES|QL rule correlates two successful GKE audit behaviors from the same 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 allowed create, update, or patch actions on Roles and ClusterRoles that introduce high-risk RBAC permissions, including wildcard access and escalation verbs like bind, escalate, or impersonate. These changes matter because they can silently expand privileges and enable persistence or lateral movement across the cluster. Attackers commonly add a new ClusterRole with Elastic #
T1098, T1098.006↳ also matches update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating GKE Creation or Modification of Sensitive Role#
Possible investigation steps#
client.user.email, source.ip, and user_agent.original.gcp.audit.resource_name, event.action, and gcp.audit.request for the changed role.False positive analysis#
system:addon-manager patch reconciliation on built-in Roles and ClusterRoles is excluded.Response and remediation#
T1098, T1098.006↳ also matches update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating GKE Sensitive RBAC Change Followed by Workload Modification#
client.user.email within five minutes:escalate / bind / impersonate, secret read, or privileged API resources such as pods/exec and serviceaccounts/token)Esql.rbac_to_workload_minutes is the gap from the latest sensitive RBAC event to the earliest workload modification in the lookback window.Possible investigation steps#
Esql.event_action_values and Esql.gcp_audit_resource_name_values for the Role/ClusterRole and workload objects touched.Esql.user_agent_original_values and Esql.source_ip_values for unexpected clients or networks.False positive analysis#
Response and remediation#
T1098, T1098.006↳ also matches update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating Kubernetes Creation or Modification of Sensitive Role#
* verbs/resources and then use it to bind themselves or a service account to cluster-admin–equivalent access.Possible investigation steps#
False positive analysis#
Response and remediation#
impersonate/escalate/bind, is cluster-scoped, or is bound to non-admin subjects or external identities without an approved change record.Panther #
T1078.004, T1562.001T1021, T1078.004T1078.004Falco #
References #
update clusterroles
#Description
Modifies an existing ClusterRole's rules. Elastic checks the updated rule set for wildcard verbs/resources or escalation verbs (bind, escalate, impersonate).
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles/dw-harn-clusterroles?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": "clusterroles",
"name": "dw-harn-clusterroles",
"uid": "00000000-0000-0000-0000-000000000000",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1",
"resourceVersion": "863"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"kind": "ClusterRole",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-clusterroles",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "863",
"creationTimestamp": "2026-07-02T21:31:48Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"responseObject": {
"kind": "ClusterRole",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-clusterroles",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "863",
"creationTimestamp": "2026-07-02T21:31:48Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T21:31:51.522656Z",
"stageTimestamp": "2026-07-02T21:31:51.525302Z",
"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 |
|---|---|---|---|---|
kubernetes.audit.objectRef.resource (elastic rule field) | in | clusterroles | 5 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | roles | 5 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | patch | 5 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | update | 5 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | create | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.patch | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.update | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.patch | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.update | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.create | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.create | 3 rules | elastic |
ServiceName (elastic rule field) | eq | k8s.io | 4 rules | elastic |
kubernetes.audit.annotations.authorization_k8s_io/decision (elastic rule field) | eq | allow | 4 rules | elastic |
gcp.audit.request.rules.resources (elastic rule field) | in | * | 2 rules | elastic |
gcp.audit.request.rules.resources (elastic rule field) | in | clusterrolebindings | 2 rules | elastic |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries → Someone patched or updated a Role or ClusterRole so the stored rules grant star verbs and star resources—near cluster-admin breadth on that scope. Confirm the actor (user.email, groups), client, and non-loopback source IP; then see who can bind that role. Someone patched or updated a Role or ClusterRole so the stored rules grant star verbs and star resources—near cluster-admin breadth on that scope. Confirm the actor (user, group, impersonation), client, and non-loopback source IP; then see who can bind that role. 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 #
T1098, T1098.006↳ also matches patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating GKE RBAC Wildcard Elevation on Existing Role#
Possible investigation steps#
gcp.audit.resource_name, gcp.audit.response.rules.verbs, and gcp.audit.response.rules.resources.False positive analysis#
Response and remediation#
T1098, T1098.006↳ also matches patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating Kubernetes RBAC Wildcard Elevation on Existing Role#
Possible investigation steps#
False positive analysis#
Response and remediation#
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-clusterroles: get clusterroles, list-clusterroles: list clusterroles, watch-clusterroles: watch clusterroles, create-clusterroles: create clusterroles, patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
Panther #
T1078.004, T1098, T1222↳ also matches patch-clusterroles: patch clusterroles, delete-clusterroles: delete clusterroles Falco #
References #
patch clusterroles
#Description
Partially modifies a ClusterRole. Elastic checks both the request and the resulting rule set for wildcard verbs/resources, which silently widens the role's power.
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles/dw-harn-clusterroles?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": "clusterroles",
"name": "dw-harn-clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"metadata": {
"labels": {
"dw-harn-patched": "1"
}
}
},
"responseObject": {
"kind": "ClusterRole",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-clusterroles",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1670",
"creationTimestamp": "2026-07-02T04:48:10Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T04:48:14.128908Z",
"stageTimestamp": "2026-07-02T04:48:14.135049Z",
"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 |
|---|---|---|---|---|
kubernetes.audit.objectRef.resource (elastic rule field) | in | clusterroles | 5 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | roles | 5 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | patch | 5 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | update | 5 rules | elastic |
kubernetes.audit.verb (elastic rule field) | in | create | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.patch | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.update | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.patch | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.update | 4 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.create | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.create | 3 rules | elastic |
ServiceName (elastic rule field) | eq | k8s.io | 4 rules | elastic |
kubernetes.audit.annotations.authorization_k8s_io/decision (elastic rule field) | eq | allow | 4 rules | elastic |
gcp.audit.request.rules.resources (elastic rule field) | in | * | 2 rules | elastic |
gcp.audit.request.rules.resources (elastic rule field) | in | clusterrolebindings | 2 rules | elastic |
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. This rule detects allowed create, update, or patch actions on Roles and ClusterRoles that introduce high-risk RBAC permissions, including wildcard access and escalation verbs like bind, escalate, or impersonate. Someone patched or updated a Role or ClusterRole so the stored rules grant star verbs and star resources—near cluster-admin breadth on that scope. Confirm the actor (user.email, groups), client, and non-loopback source IP; then see who can bind that role.Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-clusterroles: get clusterroles, list-clusterroles: list clusterroles, watch-clusterroles: watch clusterroles, create-clusterroles: create clusterroles, update-clusterroles: update clusterroles Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
T1098, T1098.006↳ also matches create-clusterroles: create clusterroles, update-clusterroles: update clusterroles Investigation guide
Triage and analysis#
Investigating GKE Creation or Modification of Sensitive Role#
Possible investigation steps#
client.user.email, source.ip, and user_agent.original.gcp.audit.resource_name, event.action, and gcp.audit.request for the changed role.False positive analysis#
system:addon-manager patch reconciliation on built-in Roles and ClusterRoles is excluded.Response and remediation#
T1098, T1098.006↳ also matches update-clusterroles: update clusterroles Investigation guide
Triage and analysis#
Investigating GKE RBAC Wildcard Elevation on Existing Role#
Possible investigation steps#
gcp.audit.resource_name, gcp.audit.response.rules.verbs, and gcp.audit.response.rules.resources.False positive analysis#
Response and remediation#
Panther #
T1078.004, T1098, T1222↳ also matches update-clusterroles: update clusterroles, delete-clusterroles: delete clusterroles Falco #
References #
delete clusterroles
#Description
Removes a ClusterRole. Elastic flags this when the acting identity is a service account, since accounts rarely administer RBAC themselves.
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles/dw-harn-clusterroles",
"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": "clusterroles",
"name": "dw-harn-clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"status": "Success",
"details": {
"name": "dw-harn-clusterroles",
"group": "rbac.authorization.k8s.io",
"kind": "clusterroles",
"uid": "00000000-0000-0000-0000-000000000000"
},
"code": 200
},
"requestObject": {
"kind": "DeleteOptions",
"apiVersion": "meta.k8s.io/__internal",
"propagationPolicy": "Background"
},
"responseObject": {
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Success",
"details": {
"name": "dw-harn-clusterroles",
"group": "rbac.authorization.k8s.io",
"kind": "clusterroles",
"uid": "00000000-0000-0000-0000-000000000000"
}
},
"requestReceivedTimestamp": "2026-07-02T04:48:14.199671Z",
"stageTimestamp": "2026-07-02T04:48:14.202972Z",
"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 | clusterroles | 2 rules | falco |
objectRef.resource (falco rule field) | eq | roles | 1 rule | falco |
stage (falco rule field) | eq | responsecomplete | 2 rules | falco |
verb (falco rule field) | eq | delete | 2 rules | falco |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterrolebindings.patch | 1 rule | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterrolebindings.update | 1 rule | elastic |
jevt.rawtime (falco rule field) | is_not_null | | 1 rule | falco |
resource (panther rule field) | in | clusterroles | 1 rule | panther |
resource (panther rule field) | in | roles | 1 rule | panther |
responseStatus.code (falco rule field) | starts_with | 2 | 1 rule | falco |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries → This rule detects service accounts performing allowed write actions on RBAC resources. Stolen or over-privileged service account tokens can silently alter authorization to gain or retain elevated access. 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 Kubernetes service accounts performing allowed write actions on RBAC resources such as Roles and RoleBindings, which is atypical because service accounts rarely administer permissions. It matters because stolen or over-privileged service account tokens can silently alter authorization to gain or retain elevated access across the cluster. An attacker commonly uses a compromised workload’s token to create or patch a binding that grants cluster-admin privileges to their service account for persistent control.Elastic #
T1098, T1098.006↳ also matches create-clusterroles: create clusterroles, update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating GKE Service Account Modified RBAC Objects#
Possible investigation steps#
client.user.email, event.action, and gcp.audit.resource_name.False positive analysis#
Response and remediation#
T1098, T1098.006↳ also matches create-clusterroles: create clusterroles, update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles Investigation guide
Triage and analysis#
Investigating Kubernetes Service Account Modified RBAC Objects#
Possible investigation steps#
False positive analysis#
Response and remediation#
kubectl rollout undo where applicable) and verify no new subjects gained wildcard or cluster-admin-equivalent access.cluster-admin, introduces * verbs/resources, or binds a service account to privileged ClusterRoles across namespaces.Panther #
T1078.004, T1098, T1222↳ also matches update-clusterroles: update clusterroles, patch-clusterroles: patch clusterroles Falco #
References #
deletecollection clusterroles
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/rbac.authorization.k8s.io/v1/clusterroles?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": "clusterroles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"responseObject": {
"kind": "ClusterRoleList",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"resourceVersion": "1061"
},
"items": [
{
"metadata": {
"name": "dw-harn-clusterroles",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1060",
"creationTimestamp": "2026-07-02T23:14:02Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T23:14:05.926896Z",
"stageTimestamp": "2026-07-02T23:14:05.931338Z",
"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 #
any verb on clusterroles (synthetic aggregation)
#Description
Synthetic aggregation for rules that filter the clusterroles resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone.
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 |
|---|---|---|---|---|
EventType (elastic rule field) | in | get | 1 rule | elastic |
EventType (elastic rule field) | in | list | 1 rule | elastic |
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