Detection: Splunk Disable KVStore via CSRF Enabling Maintenance Mode

Description

In Splunk Enterprise versions below 9.3.1, 9.2.3, and 9.1.6 and Splunk Cloud Platform versions below 9.2.2403.108, 9.1.2312.204, and 9.1.2308.211, a low-privileged user that does not hold the “admin” or “power” Splunk roles could change the maintenance mode state of App Key Value Store (KVStore) through a Cross-Site Request Forgery (CSRF).

1`splunkda` method=GET uri_path IN ("/services*", /"servicesNS*") AND uri_path = "*kvstore/maintenance/change" AND uri_query IN ("*mode=t*", "*mode=1*") 
2| stats count min(_time) as firstTime max(_time) as lastTime by user host uri clientip  
3| `security_content_ctime(firstTime)` 
4| `security_content_ctime(lastTime)`  
5| `splunk_disable_kvstore_via_csrf_enabling_maintenance_mode_filter`

Data Source

Name Platform Sourcetype Source
Splunk Splunk icon Splunk 'splunkd_ui_access' 'splunkd_ui_access.log'

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
splunk_disable_kvstore_via_csrf_enabling_maintenance_mode_filter search *
splunk_disable_kvstore_via_csrf_enabling_maintenance_mode_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1489 Service Stop Impact
Actions on Objectives
DE.CM
CIS 10
Indrik Spider
LAPSUS$
Lazarus Group
Sandworm Team
Wizard Spider

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 Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

Requires access to internal indexes and web service enabled.

Known False Positives

This search will produce false positives, operator must verify the context of access and the use of GET request against KVStore specifiying maintenance mode, especially non admin users.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

Potential CSRF attack against $user$ and $host$ by placing KVStore into Maintenance Mode

Risk Object Risk Object Type Risk Score Threat Objects
host system 25 No Threat Objects

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset /opt/splunk/var/log/splunk/splunkd_access.log splunkd_access
Integration ✅ Passing Dataset /opt/splunk/var/log/splunk/splunkd_access.log splunkd_access

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: 3