Detection rules › Elastic
Kubernetes Anonymous User Create/Update/Patch Pods Request
This rule detects attempts to create, update, or patch pods by an anonymous user. An anonymous user is a user that is not authenticated or authorized to access the Kubernetes API server. Creating, updating, or patching pods is a common activity for attackers to gain access to the cluster and execute commands.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Kubernetes | create-pods: create pods |
| Kubernetes | update-pods: update pods |
| Kubernetes | patch-pods: patch pods |
Rules detecting the same action
These rules filter on the same operation.
- Attach/Exec Pod (Falco)
- Azure AKS Attempted User Exec into Pod (Elastic)
- Azure AKS Ephemeral Container Added to Pod (Elastic)
- Container With A hostPath Mount Created (Sigma)
- Create Disallowed Pod (Falco)
- Create HostIPC Pod (Falco)
- Create HostNetwork Pod (Falco)
- Create HostPid Pod (Falco)
Rule body
[metadata]
creation_date = "2026/02/02"
integration = ["kubernetes"]
maturity = "production"
updated_date = "2026/04/10"
[rule]
author = ["Elastic"]
description = """
This rule detects attempts to create, update, or patch pods by an anonymous user. An anonymous user is a user that
is not authenticated or authorized to access the Kubernetes API server. Creating, updating, or patching pods is a common
activity for attackers to gain access to the cluster and execute commands.
"""
index = ["logs-kubernetes.audit_logs-*"]
language = "eql"
license = "Elastic License v2"
name = "Kubernetes Anonymous User Create/Update/Patch Pods Request"
risk_score = 47
rule_id = "3a01e5c6-ce01-46d7-ac9f-52dc349695fb"
severity = "medium"
tags = [
"Data Source: Kubernetes",
"Domain: Kubernetes",
"Use Case: Threat Detection",
"Tactic: Execution",
"Resources: Investigation Guide"
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
any where data_stream.dataset == "kubernetes.audit_logs" and (
kubernetes.audit.user.username in ("system:anonymous", "system:unauthenticated") or
kubernetes.audit.user.username == null or
kubernetes.audit.user.username == ""
) and kubernetes.audit.level in ("RequestResponse", "ResponseComplete", "Request") and kubernetes.audit.verb in ("create", "update", "patch") and
kubernetes.audit.objectRef.resource == "pods"
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1610"
name = "Deploy Container"
reference = "https://attack.mitre.org/techniques/T1610/"
[rule.threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
Stages and Predicates
Stage 1: any
any where data_stream.dataset == "kubernetes.audit_logs" and (
kubernetes.audit.user.username in ("system:anonymous", "system:unauthenticated") or
kubernetes.audit.user.username == null or
kubernetes.audit.user.username == ""
) and kubernetes.audit.level in ("RequestResponse", "ResponseComplete", "Request") and kubernetes.audit.verb in ("create", "update", "patch") and
kubernetes.audit.objectRef.resource == "pods"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
data_stream.dataset | eq |
| field:"data_stream.dataset" kind:eq value:"kubernetes.audit_logs" |
kubernetes.audit.level | in |
| field:"kubernetes.audit.level" kind:in |
kubernetes.audit.objectRef.resource | eq |
| field:"kubernetes.audit.objectRef.resource" kind:eq value:"pods" |
kubernetes.audit.user.username | in |
| field:"kubernetes.audit.user.username" kind:in |
kubernetes.audit.user.username | is_null | field:"kubernetes.audit.user.username" kind:is_null | |
kubernetes.audit.verb | in |
| field:"kubernetes.audit.verb" kind:in |