Skip to content

Commit 86111a3

Browse files
Aegrahtradebot-elastic
authored andcommitted
[New Rule] Kubernetes Unusual Decision by User Agent (#4829)
* [New Rule] Kubernetes Unusual Request Response by User Agent * ++ * Update execution_unusual_request_response_by_user_agent.toml * Update rules/integrations/kubernetes/execution_unusual_request_response_by_user_agent.toml * Update execution_unusual_request_response_by_user_agent.toml * Update rules/integrations/kubernetes/execution_unusual_request_response_by_user_agent.toml (cherry picked from commit 9f46d5b)
1 parent 71af149 commit 86111a3

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[metadata]
2+
creation_date = "2025/06/18"
3+
integration = ["kubernetes"]
4+
maturity = "production"
5+
updated_date = "2025/06/18"
6+
7+
[rule]
8+
author = ["Elastic"]
9+
description = """
10+
This rule detects unusual request responses in Kubernetes audit logs through the use of the
11+
"new_terms" rule type. In production environments, default API requests are typically made by
12+
system components or trusted users, who are expected to have a consistent user agent and
13+
allowed response annotations. By monitoring for anomalies in the username and response
14+
annotations, this rule helps identify potential unauthorized access or misconfigurations
15+
in the Kubernetes environment.
16+
"""
17+
index = ["logs-kubernetes.audit_logs-*"]
18+
language = "kuery"
19+
license = "Elastic License v2"
20+
name = "Kubernetes Unusual Decision by User Agent"
21+
risk_score = 21
22+
rule_id = "8a1db198-da6f-4500-b985-7fe2457300af"
23+
severity = "low"
24+
tags = [
25+
"Domain: Kubernetes",
26+
"Domain: Container",
27+
"Use Case: Threat Detection",
28+
"Data Source: Kubernetes",
29+
"Tactic: Execution"
30+
]
31+
timestamp_override = "event.ingested"
32+
type = "new_terms"
33+
query = '''
34+
host.os.type:"linux" and event.dataset:"kubernetes.audit_logs" and kubernetes.audit.stage:"ResponseComplete" and user_agent.original:*
35+
'''
36+
37+
[[rule.threat]]
38+
framework = "MITRE ATT&CK"
39+
40+
[rule.threat.tactic]
41+
id = "TA0002"
42+
name = "Execution"
43+
reference = "https://attack.mitre.org/tactics/TA0002/"
44+
45+
[rule.new_terms]
46+
field = "new_terms_fields"
47+
value = ["kubernetes.audit.annotations.authorization_k8s_io/decision", "kubernetes.audit.user.username", "user_agent.original"]
48+
49+
[[rule.new_terms.history_window_start]]
50+
field = "history_window_start"
51+
value = "now-10d"

0 commit comments

Comments
 (0)