2025-06-30 11:11:10 +02:00
|
|
|
[metadata]
|
|
|
|
|
creation_date = "2025/06/19"
|
2026-02-06 09:38:56 +01:00
|
|
|
integration = ["endpoint", "auditd_manager", "crowdstrike", "cloud_defend"]
|
2025-06-30 11:11:10 +02:00
|
|
|
maturity = "production"
|
2026-02-06 09:38:56 +01:00
|
|
|
min_stack_comments = "Defend for Containers integration was re-introduced in 9.3.0"
|
|
|
|
|
min_stack_version = "9.3.0"
|
|
|
|
|
updated_date = "2026/02/05"
|
2025-06-30 11:11:10 +02:00
|
|
|
|
|
|
|
|
[rule]
|
|
|
|
|
author = ["Elastic"]
|
|
|
|
|
building_block_type = "default"
|
|
|
|
|
description = """
|
|
|
|
|
This rule detects the execution of kubectl commands that are commonly used for configuration discovery in Kubernetes
|
|
|
|
|
environments. It looks for process events where kubectl is executed with arguments that query configuration information,
|
|
|
|
|
such as configmaps. In environments where kubectl is not expected to be used, this could indicate potential reconnaissance
|
|
|
|
|
activity by an adversary.
|
|
|
|
|
"""
|
|
|
|
|
from = "now-119m"
|
2026-01-07 16:52:40 +01:00
|
|
|
index = [
|
|
|
|
|
"logs-endpoint.events.*",
|
|
|
|
|
"endgame-*",
|
|
|
|
|
"auditbeat-*",
|
|
|
|
|
"logs-auditd_manager.auditd-*",
|
2026-02-06 09:38:56 +01:00
|
|
|
"logs-crowdstrike.fdr*",
|
|
|
|
|
"logs-cloud_defend.process*",
|
2026-01-07 16:52:40 +01:00
|
|
|
]
|
2025-06-30 11:11:10 +02:00
|
|
|
interval = "60m"
|
|
|
|
|
language = "eql"
|
|
|
|
|
license = "Elastic License v2"
|
|
|
|
|
name = "Kubectl Configuration Discovery"
|
|
|
|
|
risk_score = 21
|
|
|
|
|
rule_id = "98ac2919-f8b3-4d2d-b85b-e1c13ac0c68b"
|
|
|
|
|
severity = "low"
|
|
|
|
|
tags = [
|
2025-11-10 16:03:39 +01:00
|
|
|
"Domain: Container",
|
|
|
|
|
"Domain: Endpoint",
|
|
|
|
|
"Domain: Kubernetes",
|
|
|
|
|
"OS: Linux",
|
|
|
|
|
"Use Case: Threat Detection",
|
|
|
|
|
"Tactic: Discovery",
|
|
|
|
|
"Rule Type: BBR",
|
|
|
|
|
"Data Source: Elastic Defend",
|
|
|
|
|
"Data Source: Elastic Endgame",
|
|
|
|
|
"Data Source: Auditd Manager",
|
|
|
|
|
"Data Source: Crowdstrike",
|
2026-02-06 09:38:56 +01:00
|
|
|
"Data Source: Elastic Defend for Containers",
|
2025-06-30 11:11:10 +02:00
|
|
|
]
|
|
|
|
|
timestamp_override = "event.ingested"
|
|
|
|
|
type = "eql"
|
|
|
|
|
query = '''
|
|
|
|
|
process where host.os.type == "linux" and event.type == "start" and
|
2025-11-10 16:03:39 +01:00
|
|
|
event.action in ("exec", "exec_event", "executed", "process_started", "ProcessRollup2") and
|
2026-01-07 16:52:40 +01:00
|
|
|
process.name == "kubectl" and process.args in ("get", "describe") and process.args in ("configmap", "configmaps") and
|
|
|
|
|
not ?process.parent.args in (
|
|
|
|
|
"/hooks/schedule_sync_configmap.sh", "/service-fabric/generate-support-bundle.sh", "/hooks/onstartup_sync_configmap.sh"
|
|
|
|
|
)
|
2025-06-30 11:11:10 +02:00
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
[[rule.threat]]
|
|
|
|
|
framework = "MITRE ATT&CK"
|
|
|
|
|
|
|
|
|
|
[[rule.threat.technique]]
|
|
|
|
|
id = "T1613"
|
|
|
|
|
name = "Container and Resource Discovery"
|
|
|
|
|
reference = "https://attack.mitre.org/techniques/T1613/"
|
|
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
|
|
|
id = "TA0007"
|
|
|
|
|
name = "Discovery"
|
|
|
|
|
reference = "https://attack.mitre.org/tactics/TA0007/"
|