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.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/02/02"
3integration = ["kubernetes"]
4maturity = "production"
5updated_date = "2026/09/18"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule detects attempts to create, update, or patch pods by an anonymous user. An anonymous user is a user that
11is not authenticated or authorized to access the Kubernetes API server. Creating, updating, or patching pods is a common
12activity for attackers to gain access to the cluster and execute commands.
13"""
14index = ["logs-kubernetes.audit_logs-*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Kubernetes Anonymous User Create/Update/Patch Pods Request"
18risk_score = 47
19rule_id = "3a01e5c6-ce01-46d7-ac9f-52dc349695fb"
20severity = "medium"
21tags = [
22 "Data Source: Kubernetes",
23 "Domain: Kubernetes",
24 "Use Case: Threat Detection",
25 "Tactic: Execution",
26 "Resources: Investigation Guide",
27 "Noise: Low",
28 "Performance: Fast",
29 "Rule Type: Event Correlation (EQL)",
30 "Platform: Kubernetes",
31 "Domain: Containers",
32 "Domain: Cloud",
33]
34timestamp_override = "event.ingested"
35type = "eql"
36query = '''
37any where data_stream.dataset == "kubernetes.audit_logs" and (
38 kubernetes.audit.user.username in ("system:anonymous", "system:unauthenticated") or
39 kubernetes.audit.user.username == null or
40 kubernetes.audit.user.username == ""
41 ) and kubernetes.audit.level in ("RequestResponse", "ResponseComplete", "Request") and kubernetes.audit.verb in ("create", "update", "patch") and
42kubernetes.audit.objectRef.resource == "pods"
43
44'''
45
46[[rule.threat]]
47framework = "MITRE ATT&CK"
48
49[[rule.threat.technique]]
50id = "T1610"
51name = "Deploy Container"
52reference = "https://attack.mitre.org/techniques/T1610/"
53
54[rule.threat.tactic]
55id = "TA0002"
56name = "Execution"
57reference = "https://attack.mitre.org/tactics/TA0002/"
Related rules
- Direct Interactive Kubernetes API Request by Common Utilities
- Direct Interactive Kubernetes API Request by Unusual Utilities
- Forbidden Direct Interactive Kubernetes API Request
- Service Account Token or Certificate Access Followed by Kubernetes API Request
- Kubernetes Events Deleted