Roles
| Operation | Description | Sample | Rule |
|---|---|---|---|
| get-roles | Y | Y | |
| list-roles | Y | Y | |
| watch-roles | Y | Y | |
| create-roles | Role created (sensitive RBAC change). | Y | Y |
| update-roles | Modifies a namespace-scoped Role's rules. Elastic checks the updated rule set for wildcard verbs/resources or escalation verbs (bind, escalate, impersonate). | Y | Y |
| patch-roles | Role patched (wildcard verbs/resources = overprivilege). | Y | Y |
| delete-roles | Removes a namespace-scoped Role. Elastic flags this when the acting identity is a service account, since accounts rarely administer RBAC themselves. | Y | Y |
| deletecollection-roles | Y | N | |
| any-roles | Synthetic aggregation for rules that filter the roles resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone. | N | Y |
get roles
#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/namespaces/dw-harn/roles/dw-harn-roles",
"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": "roles",
"namespace": "dw-harn",
"name": "dw-harn-roles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:47:14.862876Z",
"stageTimestamp": "2026-07-02T04:47:14.864068Z",
"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-roles: list roles, watch-roles: watch roles, create-roles: create roles, update-roles: update roles, patch-roles: patch roles 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-roles: list roles 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 roles
#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/namespaces/dw-harn/roles?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": "roles",
"namespace": "dw-harn",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:47:14.999094Z",
"stageTimestamp": "2026-07-02T04:47:15.000612Z",
"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-roles: get roles, watch-roles: watch roles, create-roles: create roles, update-roles: update roles, patch-roles: patch roles 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-roles: get roles 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 roles
#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/namespaces/dw-harn/roles?resourceVersion=1441&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": "roles",
"namespace": "dw-harn",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:47:15.001570Z",
"stageTimestamp": "2026-07-02T04:47:18.002364Z",
"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-roles: get roles, list-roles: list roles, create-roles: create roles, update-roles: update roles, patch-roles: patch roles 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 roles
#Description
Role created (sensitive RBAC change).
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/namespaces/dw-harn/roles?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": "roles",
"namespace": "dw-harn",
"name": "dw-harn-roles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "Role",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-roles",
"namespace": "dw-harn"
},
"rules": [
{
"verbs": [
"get",
"list"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"responseObject": {
"kind": "Role",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-roles",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1438",
"creationTimestamp": "2026-07-02T04:47:14Z"
},
"rules": [
{
"verbs": [
"get",
"list"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T04:47:14.788482Z",
"stageTimestamp": "2026-07-02T04:47:14.791527Z",
"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 | roles | 5 rules | falco |
objectRef.resource (falco rule field) | eq | clusterroles | 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 |
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 |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.create | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.roles.patch | 3 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. This ES|QL rule correlates two successful GKE audit behaviors from the same Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-roles: get roles, list-roles: list roles, watch-roles: watch roles, update-roles: update roles, patch-roles: patch roles 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 update-roles: update roles, patch-roles: patch roles 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-roles: update roles, patch-roles: patch roles 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#
Panther #
T1078.004, T1562.001T1021, T1078.004T1078.004Falco #
References #
update roles
#Description
Modifies a namespace-scoped Role'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/namespaces/dw-harn/roles/dw-harn-roles?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": "roles",
"namespace": "dw-harn",
"name": "dw-harn-roles",
"uid": "00000000-0000-0000-0000-000000000000",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1",
"resourceVersion": "589"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"kind": "Role",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-roles",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "589",
"creationTimestamp": "2026-07-02T21:30:39Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get",
"list"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"responseObject": {
"kind": "Role",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-roles",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "589",
"creationTimestamp": "2026-07-02T21:30:39Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get",
"list"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T21:30:42.857828Z",
"stageTimestamp": "2026-07-02T21:30:42.860533Z",
"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-roles: get roles, list-roles: list roles, watch-roles: watch roles, create-roles: create roles, patch-roles: patch roles 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-roles: create roles, patch-roles: patch roles 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 patch-roles: patch roles 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 patch-roles: patch roles, delete-roles: delete roles Falco #
References #
patch roles
#Description
Role patched (wildcard verbs/resources = 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/namespaces/dw-harn/roles/dw-harn-roles?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": "roles",
"namespace": "dw-harn",
"name": "dw-harn-roles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"metadata": {
"labels": {
"dw-harn-patched": "1"
}
}
},
"responseObject": {
"kind": "Role",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"name": "dw-harn-roles",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1445",
"creationTimestamp": "2026-07-02T04:47:14Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get",
"list"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T04:47:18.072264Z",
"stageTimestamp": "2026-07-02T04:47:18.075638Z",
"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 |
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 |
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 |
gcp.audit.request.rules.resources (elastic rule field) | in | clusterroles | 2 rules | elastic |
gcp.audit.request.rules.resources (elastic rule field) | in | daemonsets | 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-roles: get roles, list-roles: list roles, watch-roles: watch roles, create-roles: create roles, update-roles: update roles 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-roles: create roles, update-roles: update roles 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-roles: update roles 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-roles: update roles, delete-roles: delete roles Falco #
References #
delete roles
#Description
Removes a namespace-scoped Role. 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/namespaces/dw-harn/roles/dw-harn-roles",
"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": "roles",
"namespace": "dw-harn",
"name": "dw-harn-roles",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"status": "Success",
"details": {
"name": "dw-harn-roles",
"group": "rbac.authorization.k8s.io",
"kind": "roles",
"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-roles",
"group": "rbac.authorization.k8s.io",
"kind": "roles",
"uid": "00000000-0000-0000-0000-000000000000"
}
},
"requestReceivedTimestamp": "2026-07-02T04:47:18.142108Z",
"stageTimestamp": "2026-07-02T04:47:18.146020Z",
"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 | roles | 2 rules | falco |
objectRef.resource (falco rule field) | eq | clusterroles | 1 rule | falco |
verb (falco rule field) | eq | delete | 2 rules | falco |
resource (panther rule field) | in | clusterroles | 1 rule | panther |
resource (panther rule field) | in | roles | 1 rule | panther |
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-roles: create roles, update-roles: update roles, patch-roles: patch roles 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-roles: create roles, update-roles: update roles, patch-roles: patch roles 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-roles: update roles, patch-roles: patch roles Falco #
References #
deletecollection roles
#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/namespaces/dw-harn/roles?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": "roles",
"namespace": "dw-harn",
"apiGroup": "rbac.authorization.k8s.io",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"responseObject": {
"kind": "RoleList",
"apiVersion": "rbac.authorization.k8s.io/v1",
"metadata": {
"resourceVersion": "666"
},
"items": [
{
"metadata": {
"name": "dw-harn-roles",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "666",
"creationTimestamp": "2026-07-02T23:12:39Z",
"labels": {
"dw-harn-patched": "1"
}
},
"rules": [
{
"verbs": [
"get",
"list"
],
"apiGroups": [
""
],
"resources": [
"pods"
]
}
]
}
]
},
"requestReceivedTimestamp": "2026-07-02T23:12:43.463160Z",
"stageTimestamp": "2026-07-02T23:12:43.468081Z",
"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 roles (synthetic aggregation)
#Description
Synthetic aggregation for rules that filter the roles 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