Kubernetes Scanning by Unauthenticated IP Address
Description
This detection rule is designed to identify potential scanning activities within a Kubernetes environment. Scanning is a common preliminary step in an attack, where the attacker tries to gather information about the system to find potential vulnerabilities. In the context of Kubernetes, scanning could involve activities like unauthorized access attempts, probing public APIs, or trying to exploit known vulnerabilities. This rule triggers an alert when such suspicious activities are detected, helping to ensure the security of your Kubernetes infrastructure.
- Type: Anomaly
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2023-12-07
- Author: Patrick Bareiss, Splunk
- ID: f9cadf4e-df22-4f4e-a08f-9d3344c2165d
Annotations
Kill Chain Phase
- Exploitation
NIST
- DE.AE
CIS20
- CIS 13
CVE
Search
1
2
3
4
5
6
`kube_audit` "user.groups{}"="system:unauthenticated" "responseStatus.code"=403
| iplocation sourceIPs{}
| stats count values(userAgent) as userAgent values(user.username) as user.username values(user.groups{}) as user.groups{} values(verb) as verb values(requestURI) as requestURI values(responseStatus.code) as responseStatus.code values(responseStatus.message) as responseStatus.message values(responseStatus.reason) as responseStatus.reason values(responseStatus.status) as responseStatus.status by sourceIPs{} Country City
| where count > 5
| rename sourceIPs{} as src_ip, user.username as user
| `kubernetes_scanning_by_unauthenticated_ip_address_filter`
Macros
The SPL above uses the following Macros:
kubernetes_scanning_by_unauthenticated_ip_address_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- verb
- requestReceivedTimestamp
- requestURI
- responseStatus.code
- sourceIPs{}
- user.groups{}
- user.username
- userAgent
- verb
- responseStatus.reason
- responseStatus.status
How To Implement
You must ingest Kubernetes audit logs.
Known False Positives
unknown
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
49.0 | 70 | 70 | Kubernetes scanning from ip $src_ip$ |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
Test Dataset
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 | version: 1