ID | Technique | Tactic |
---|---|---|
T1204 | User Execution | Execution |
Detection: Kubernetes Previously Unseen Process
EXPERIMENTAL DETECTION
This detection status is set to experimental. The Splunk Threat Research team has not yet fully tested, simulated, or built comprehensive datasets for this detection. As such, this analytic is not officially supported. If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
The following analytic detects previously unseen processes within the Kubernetes environment on master or worker nodes. It leverages process metrics collected via an OTEL collector and hostmetrics receiver, and data is pulled from Splunk Observability Cloud. This detection compares processes observed in the last hour against those seen in the previous 30 days. Identifying new processes is crucial as they may indicate unauthorized activity or attempts to compromise the node. If confirmed malicious, these processes could lead to data exfiltration, privilege escalation, denial-of-service attacks, or the introduction of malware, posing significant risks to the Kubernetes cluster.
Search
1
2| mstats count(process.memory.utilization) as process.memory.utilization_count where `kubernetes_metrics` AND earliest=-1h by host.name k8s.cluster.name k8s.node.name process.executable.name
3| eval current="True"
4| append [mstats count(process.memory.utilization) as process.memory.utilization_count where `kubernetes_metrics` AND earliest=-30d latest=-1h by host.name k8s.cluster.name k8s.node.name process.executable.name ]
5| stats count values(current) as current by host.name k8s.cluster.name k8s.node.name process.executable.name
6| where count=1 and current="True"
7| rename host.name as host
8| `kubernetes_previously_unseen_process_filter`
Data Source
No data sources specified for this detection.
Macros Used
Name | Value |
---|---|
kubernetes_metrics | index=kubernetes_metrics |
kubernetes_previously_unseen_process_filter | search * |
kubernetes_previously_unseen_process_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
Setting | Value |
---|---|
Disabled | true |
Cron Schedule | 0 * * * * |
Earliest Time | -70m@m |
Latest Time | -10m@m |
Schedule Window | auto |
Creates Risk Event | True |
Implementation
To implement this detection, follow these steps:
- Deploy the OpenTelemetry Collector (OTEL) to your Kubernetes cluster.
- Enable the hostmetrics/process receiver in the OTEL configuration.
- Ensure that the process metrics, specifically Process.cpu.utilization and process.memory.utilization, are enabled.
- Install the Splunk Infrastructure Monitoring (SIM) add-on. (ref: https://splunkbase.splunk.com/app/5247)
- Configure the SIM add-on with your Observability Cloud Organization ID and Access Token.
- Set up the SIM modular input to ingest Process Metrics. Name this input "sim_process_metrics_to_metrics_index".
- In the SIM configuration, set the Organization ID to your Observability Cloud Organization ID.
- Set the Signal Flow Program to the following: data('process.threads').publish(label='A'); data('process.cpu.utilization').publish(label='B'); data('process.cpu.time').publish(label='C'); data('process.disk.io').publish(label='D'); data('process.memory.usage').publish(label='E'); data('process.memory.virtual').publish(label='F'); data('process.memory.utilization').publish(label='G'); data('process.cpu.utilization').publish(label='H'); data('process.disk.operations').publish(label='I'); data('process.handles').publish(label='J'); data('process.threads').publish(label='K')
- Set the Metric Resolution to 10000.
- Leave all other settings at their default values.
- Run the Search Baseline Of Kubernetes Container Network IO Ratio
Known False Positives
unknown
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Kubernetes Previously Unseen Process on host $host$ | 25 | 50 | 50 |
References
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | Not Applicable | N/A | N/A | N/A |
Unit | ❌ Failing | N/A | N/A |
N/A |
Integration | ❌ Failing | N/A | N/A |
N/A |
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 4