CronJobs
| Operation | Description | Sample | Rule |
|---|---|---|---|
| get-cronjobs | Y | Y | |
| list-cronjobs | Y | Y | |
| watch-cronjobs | Y | Y | |
| create-cronjobs | CronJob created (persistence mechanism). | Y | Y |
| update-cronjobs | Replaces an existing CronJob's spec, including its schedule or the container image/command it runs on schedule. Sigma's cronjob-modification rule covers this verb. | Y | Y |
| patch-cronjobs | Modifies an existing CronJob's schedule or command. Sigma and Elastic both cover this verb; changing an existing object in place can draw less attention than creating a new one. | Y | Y |
| delete-cronjobs | Removes a CronJob, ending its scheduled persistence. Sigma's cronjob-modification rule tracks deletion the same as create/update/patch of this scheduling primitive. | Y | Y |
| deletecollection-cronjobs | Y | N | |
| get-cronjobs-status | Y | N | |
| update-cronjobs-status | Y | N | |
| patch-cronjobs-status | Y | N | |
| any-cronjobs | Synthetic aggregation for rules that filter the cronjobs resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone. | N | N |
get cronjobs
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs",
"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": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:47:39.615727Z",
"stageTimestamp": "2026-07-02T04:47:39.617135Z",
"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 list-cronjobs: list cronjobs, watch-cronjobs: watch cronjobs, create-cronjobs: create cronjobs, update-cronjobs: update cronjobs, patch-cronjobs: patch cronjobs Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
References #
list cronjobs
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs?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": "cronjobs",
"namespace": "dw-harn",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:47:39.736863Z",
"stageTimestamp": "2026-07-02T04:47:39.738860Z",
"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-cronjobs: get cronjobs, watch-cronjobs: watch cronjobs, create-cronjobs: create cronjobs, update-cronjobs: update cronjobs, patch-cronjobs: patch cronjobs Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
References #
watch cronjobs
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs?resourceVersion=1589&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": "cronjobs",
"namespace": "dw-harn",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T04:47:39.739811Z",
"stageTimestamp": "2026-07-02T04:47:42.740352Z",
"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-cronjobs: get cronjobs, list-cronjobs: list cronjobs, create-cronjobs: create cronjobs, update-cronjobs: update cronjobs, patch-cronjobs: patch cronjobs 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 cronjobs
#Description
CronJob created (persistence mechanism).
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "ed9104db-f0d9-41d2-954c-d1cf01b180c3",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/default/cronjobs?fieldManager=kubectl-client-side-apply&fieldValidation=Strict",
"verb": "create",
"user": {
"username": "kubernetes-admin",
"uid": "aws-iam-authenticato",
"groups": [
"system:masters",
"system:authenticated"
]
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.27.2 (darwin/arm64) kubernetes/7f6f68f",
"objectRef": {
"resource": "cronjobs",
"namespace": "default",
"name": "kubernetes-cron-job",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 201
},
"requestObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "kubernetes-cron-job",
"namespace": "default",
"creationTimestamp": null,
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": {
"apiVersion": "batch/v1",
"kind": "CronJob",
"metadata": {
"annotations": {},
"name": "kubernetes-cron-job",
"namespace": "default"
},
"spec": {
"jobTemplate": {
"spec": {
"template": {
"metadata": {
"labels": {
"app": "cron-batch-job"
}
},
"spec": {
"containers": [
{
"args": [
"100"
],
"image": "devopscube/kubernetes-job-demo:latest",
"name": "kube-cron-job"
}
],
"restartPolicy": "OnFailure"
}
}
}
},
"schedule": "0,15,30,45 * * * *"
}
}
}
},
"spec": {
"schedule": "0,15,30,45 * * * *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {
"creationTimestamp": null
},
"spec": {
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "cron-batch-job"
}
},
"spec": {
"containers": [
{
"name": "kube-cron-job",
"image": "devopscube/kubernetes-job-demo:latest",
"args": [
"100"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "Always"
}
],
"restartPolicy": "OnFailure",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"responseObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "kubernetes-cron-job",
"namespace": "default",
"uid": "b1bd3edf-bf0f-48e1-85b9-342373bd545b",
"resourceVersion": "2622843",
"generation": 1,
"creationTimestamp": "2023-12-13T16:41:44Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": {
"apiVersion": "batch/v1",
"kind": "CronJob",
"metadata": {
"annotations": {},
"name": "kubernetes-cron-job",
"namespace": "default"
},
"spec": {
"jobTemplate": {
"spec": {
"template": {
"metadata": {
"labels": {
"app": "cron-batch-job"
}
},
"spec": {
"containers": [
{
"args": [
"100"
],
"image": "devopscube/kubernetes-job-demo:latest",
"name": "kube-cron-job"
}
],
"restartPolicy": "OnFailure"
}
}
}
},
"schedule": "0,15,30,45 * * * *"
}
}
}
},
"spec": {
"schedule": "0,15,30,45 * * * *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {
"creationTimestamp": null
},
"spec": {
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "cron-batch-job"
}
},
"spec": {
"containers": [
{
"name": "kube-cron-job",
"image": "devopscube/kubernetes-job-demo:latest",
"args": [
"100"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "Always"
}
],
"restartPolicy": "OnFailure",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"requestReceivedTimestamp": "2023-12-13T16:41:44.073975Z",
"stageTimestamp": "2023-12-13T16:41:44.089056Z",
"annotations": {
"authorization.k8s.io/decision": "allow",
"authorization.k8s.io/reason": ""
}
}
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 | cronjobs | 3 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | daemonsets | 3 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | deployments | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.daemonsets.create | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.daemonsets.patch | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.deployments.create | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.deployments.patch | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.batch.v1.cronjobs.create | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.batch.v1.cronjobs.patch | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.create | 1 rule | elastic |
client.user.email (elastic rule field) | is_not_null | | 2 rules | elastic |
objectRef.resource | eq | cronjobs | 2 rules | sigma, splunk |
verb (panther rule field) | in | create | 2 rules | panther |
verb (panther rule field) | in | patch | 2 rules | panther |
verb (panther rule field) | in | update | 2 rules | panther |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries → This new-terms rule alerts on the first create or patch of a DaemonSet, Deployment, or CronJob from a new combination of 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 or patch activity against sensitive Kubernetes workloads (DaemonSets, Deployments, CronJobs) coming from an unusual combination of client, network origin, and user identity, which can signal stolen credentials, privilege escalation, or unauthorized control of cluster execution. Attackers commonly patch an existing Deployment to inject a new container or init container that runs with elevated privileges and pulls a remote payload, then rely on the workload controller to redeploy it across the environment. 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 #
Elastic #
T1098, T1098.006↳ also matches patch-cronjobs: patch cronjobs Investigation guide
Triage and analysis#
Investigating GKE Unusual Sensitive Workload Modification#
user_agent.original, source.ip, and client.user.email.Possible investigation steps#
False positive analysis#
Response and remediation#
T1098, T1098.006↳ also matches patch-cronjobs: patch cronjobs Investigation guide
Triage and analysis#
Investigating Unusual Kubernetes Sensitive Workload Modification#
Possible investigation steps#
False positive analysis#
kubectl create/patch to a Deployment/CronJob/DaemonSet from a new workstation, VPN egress IP, or updated kubectl version, producing an unusual user_agent/source IP/username combination despite being authorized.Response and remediation#
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-cronjobs: get cronjobs, list-cronjobs: list cronjobs, watch-cronjobs: watch cronjobs, update-cronjobs: update cronjobs, patch-cronjobs: patch cronjobs Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
Splunk #
T1053, T1053.007Panther #
T1053.003↳ also matches update-cronjobs: update cronjobs, patch-cronjobs: patch cronjobs
References #
update cronjobs
#Description
Replaces an existing CronJob's spec, including its schedule or the container image/command it runs on schedule. Sigma's cronjob-modification rule covers this verb.
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs?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": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"uid": "00000000-0000-0000-0000-000000000000",
"apiGroup": "batch",
"apiVersion": "v1",
"resourceVersion": "748"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "748",
"generation": 1,
"creationTimestamp": "2026-07-02T21:31:06Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"responseObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "748",
"generation": 1,
"creationTimestamp": "2026-07-02T21:31:06Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"requestReceivedTimestamp": "2026-07-02T21:31:09.721687Z",
"stageTimestamp": "2026-07-02T21:31:09.725059Z",
"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 |
|---|---|---|---|---|
verb (panther rule field) | in | create | 2 rules | panther |
verb (panther rule field) | in | patch | 2 rules | panther |
verb (panther rule field) | in | update | 2 rules | panther |
objectRef.resource (sigma rule field) | eq | cronjobs | 1 rule | sigma |
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 #
Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-cronjobs: get cronjobs, list-cronjobs: list cronjobs, watch-cronjobs: watch cronjobs, create-cronjobs: create cronjobs, patch-cronjobs: patch cronjobs Investigation guide
Triage and analysis#
Investigating Direct Interactive Kubernetes API Request by Unusual Utilities#
Possible investigation steps#
False positive analysis#
Response and remediation#
Panther #
T1053.003↳ also matches create-cronjobs: create cronjobs, patch-cronjobs: patch cronjobs
References #
patch cronjobs
#Description
Modifies an existing CronJob's schedule or command. Sigma and Elastic both cover this verb; changing an existing object in place can draw less attention than creating a new one.
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs?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": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"metadata": {
"labels": {
"dw-harn-patched": "1"
}
}
},
"responseObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "1592",
"generation": 1,
"creationTimestamp": "2026-07-02T04:47:39Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"requestReceivedTimestamp": "2026-07-02T04:47:42.803082Z",
"stageTimestamp": "2026-07-02T04:47:42.807529Z",
"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 | cronjobs | 3 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | daemonsets | 3 rules | elastic |
kubernetes.audit.objectRef.resource (elastic rule field) | in | deployments | 3 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.daemonsets.create | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.daemonsets.patch | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.deployments.create | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.apps.v1.deployments.patch | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.batch.v1.cronjobs.create | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.batch.v1.cronjobs.patch | 2 rules | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.create | 1 rule | elastic |
EventType (elastic rule field) | in | io.k8s.authorization.rbac.v1.clusterroles.patch | 1 rule | elastic |
client.user.email (elastic rule field) | is_not_null | | 2 rules | elastic |
verb (panther rule field) | in | create | 2 rules | panther |
verb (panther rule field) | in | patch | 2 rules | panther |
verb (panther rule field) | in | update | 2 rules | panther |
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 ES|QL rule correlates two successful GKE audit behaviors from the same This new-terms rule alerts on the first create or patch of a DaemonSet, Deployment, or CronJob from a new combination of Sigma #
Elastic #
T1059, T1059.004, T1069, T1087, T1609, T1610↳ also matches get-cronjobs: get cronjobs, list-cronjobs: list cronjobs, watch-cronjobs: watch cronjobs, create-cronjobs: create cronjobs, update-cronjobs: update cronjobs 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-cronjobs: create cronjobs 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 create-cronjobs: create cronjobs Investigation guide
Triage and analysis#
Investigating GKE Unusual Sensitive Workload Modification#
user_agent.original, source.ip, and client.user.email.Possible investigation steps#
False positive analysis#
Response and remediation#
Panther #
T1053.003↳ also matches create-cronjobs: create cronjobs, update-cronjobs: update cronjobs
References #
delete cronjobs
#Description
Removes a CronJob, ending its scheduled persistence. Sigma's cronjob-modification rule tracks deletion the same as create/update/patch of this scheduling primitive.
Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs",
"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": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"status": "Success",
"details": {
"name": "dw-harn-cronjobs",
"group": "batch",
"kind": "cronjobs",
"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-cronjobs",
"group": "batch",
"kind": "cronjobs",
"uid": "00000000-0000-0000-0000-000000000000"
}
},
"requestReceivedTimestamp": "2026-07-02T04:47:42.868586Z",
"stageTimestamp": "2026-07-02T04:47:42.871293Z",
"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 (sigma rule field) | eq | cronjobs | 1 rule | sigma |
Detection Rules #
Full rule details for this event, including ATT&CK technique mappings and native queries →Sigma #
References #
deletecollection cronjobs
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs?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": "cronjobs",
"namespace": "dw-harn",
"apiGroup": "batch",
"apiVersion": "v1"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"responseObject": {
"kind": "CronJobList",
"apiVersion": "batch/v1",
"metadata": {
"resourceVersion": "879"
},
"items": [
{
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "877",
"generation": 1,
"creationTimestamp": "2026-07-02T23:13:08Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
}
]
},
"requestReceivedTimestamp": "2026-07-02T23:13:12.400538Z",
"stageTimestamp": "2026-07-02T23:13:12.405644Z",
"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 #
get cronjobs/status
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "Metadata",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs/status",
"verb": "get",
"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": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"apiGroup": "batch",
"apiVersion": "v1",
"subresource": "status"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestReceivedTimestamp": "2026-07-02T21:31:09.793108Z",
"stageTimestamp": "2026-07-02T21:31:09.794572Z",
"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 #
update cronjobs/status
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs/status?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": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"uid": "00000000-0000-0000-0000-000000000000",
"apiGroup": "batch",
"apiVersion": "v1",
"resourceVersion": "748",
"subresource": "status"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "748",
"generation": 1,
"creationTimestamp": "2026-07-02T21:31:06Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"responseObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "748",
"generation": 1,
"creationTimestamp": "2026-07-02T21:31:06Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"requestReceivedTimestamp": "2026-07-02T21:31:09.882098Z",
"stageTimestamp": "2026-07-02T21:31:09.885107Z",
"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 #
patch cronjobs/status
#Example Audit Event #
{
"kind": "Event",
"apiVersion": "audit.k8s.io/v1",
"level": "RequestResponse",
"auditID": "00000000-0000-0000-0000-000000000000",
"stage": "ResponseComplete",
"requestURI": "/apis/batch/v1/namespaces/dw-harn/cronjobs/dw-harn-cronjobs/status?fieldManager=kubectl-patch",
"verb": "patch",
"user": {
"username": "kubernetes-admin",
"groups": [
"kubeadm:cluster-admins",
"system:authenticated"
],
"extra": {
"authentication.kubernetes.io/credential-id": [
"X509SHA256=786fc563dbb253683c44d23d0aac3742ea61ade7f27a43f50934a82662e15409"
]
}
},
"sourceIPs": [
"203.0.113.10"
],
"userAgent": "kubectl/v1.36.2 (linux/amd64) kubernetes/24e2b02",
"objectRef": {
"resource": "cronjobs",
"namespace": "dw-harn",
"name": "dw-harn-cronjobs",
"apiGroup": "batch",
"apiVersion": "v1",
"subresource": "status"
},
"responseStatus": {
"metadata": {},
"code": 200
},
"requestObject": {},
"responseObject": {
"kind": "CronJob",
"apiVersion": "batch/v1",
"metadata": {
"name": "dw-harn-cronjobs",
"namespace": "dw-harn",
"uid": "00000000-0000-0000-0000-000000000000",
"resourceVersion": "787",
"generation": 1,
"creationTimestamp": "2026-07-02T22:17:48Z",
"labels": {
"dw-harn-patched": "1"
}
},
"spec": {
"schedule": "0 0 31 2 *",
"concurrencyPolicy": "Allow",
"suspend": false,
"jobTemplate": {
"metadata": {},
"spec": {
"template": {
"metadata": {},
"spec": {
"containers": [
{
"name": "c",
"image": "docker.io/library/busybox:1.36",
"command": [
"true"
],
"resources": {},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File",
"imagePullPolicy": "IfNotPresent"
}
],
"restartPolicy": "Never",
"terminationGracePeriodSeconds": 30,
"dnsPolicy": "ClusterFirst",
"securityContext": {},
"schedulerName": "default-scheduler"
}
}
}
},
"successfulJobsHistoryLimit": 3,
"failedJobsHistoryLimit": 1
},
"status": {}
},
"requestReceivedTimestamp": "2026-07-02T22:17:52.669151Z",
"stageTimestamp": "2026-07-02T22:17:52.671889Z",
"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 cronjobs (synthetic aggregation)
#Description
Synthetic aggregation for rules that filter the cronjobs resource with no specific verb. Not a distinct audit record; hosts rule listings that key on objectRef.resource alone.