-
Notifications
You must be signed in to change notification settings - Fork 583
[New Rule] Kubernetes Unusual Decision by User Agent #4829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[metadata] | ||
creation_date = "2025/06/18" | ||
integration = ["kubernetes"] | ||
maturity = "production" | ||
updated_date = "2025/06/18" | ||
|
||
[rule] | ||
author = ["Elastic"] | ||
description = """ | ||
This rule detects unusual request responses in Kubernetes audit logs through the | ||
use of the "new_terms" rule type. In production environments, default API requests | ||
are typically made by system components or trusted users, which are expected to | ||
have a consistent user agent and allowed response annotations. By monitoring | ||
for anomalies in the username and response annotations, this rule helps identify | ||
potential unauthorized access or misconfigurations in the Kubernetes environment. | ||
""" | ||
index = ["logs-kubernetes.audit_logs-*"] | ||
language = "kuery" | ||
license = "Elastic License v2" | ||
name = "Kubernetes Unusual Decision by User Agent" | ||
risk_score = 21 | ||
rule_id = "8a1db198-da6f-4500-b985-7fe2457300af" | ||
severity = "low" | ||
tags = [ | ||
"Domain: Kubernetes", | ||
"Domain: Container", | ||
"Use Case: Threat Detection", | ||
"Data Source: Kubernetes", | ||
"Tactic: Execution" | ||
] | ||
timestamp_override = "event.ingested" | ||
type = "new_terms" | ||
query = ''' | ||
event.dataset:"kubernetes.audit_logs" and kubernetes.audit.stage:"ResponseComplete" and user_agent.original:* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont know if it's applicable but may want to ensure user_agent is not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we are filtering for the |
||
''' | ||
|
||
[[rule.threat]] | ||
framework = "MITRE ATT&CK" | ||
|
||
[rule.threat.tactic] | ||
id = "TA0002" | ||
name = "Execution" | ||
reference = "https://attack.mitre.org/tactics/TA0002/" | ||
|
||
[rule.new_terms] | ||
field = "new_terms_fields" | ||
value = ["kubernetes.audit.annotations.authorization_k8s_io/decision", "kubernetes.audit.user.username"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this make it Unusual decision by a User? Instead of user_agent? |
||
|
||
[[rule.new_terms.history_window_start]] | ||
field = "history_window_start" | ||
value = "now-10d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we intentionally exclude
from
rule object?