ID | Technique | Tactic |
---|---|---|
T1190 | Exploit Public-Facing Application | Initial Access |
Detection: Splunk RCE via Serialized Session Payload
Description
The following analytic detects the execution of a specially crafted query using the 'collect' SPL command in Splunk Enterprise versions lower than 8.2.12, 9.0.6, and 9.1.1. It leverages audit logs to identify searches containing both 'makeresults' and 'collect' commands. This activity is significant because it can indicate an attempt to serialize untrusted data, potentially leading to arbitrary code execution. If confirmed malicious, this could allow an attacker to execute code within the Splunk environment, leading to unauthorized access and control over the system.
Search
1`audit_searches` file=* (search="*makeresults*" AND search="*collect*")
2| stats count min(_time) as firstTime max(_time) as lastTime by action file user splunk_server search
3| `security_content_ctime(firstTime)`
4| `security_content_ctime(lastTime)`
5| `splunk_rce_via_serialized_session_payload_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
Splunk | Splunk | 'splunkd_ui_access' |
'splunkd_ui_access.log' |
Macros Used
Name | Value |
---|---|
audit_searches | index=_audit sourcetype=audittrail action=search |
splunk_rce_via_serialized_session_payload_filter | search * |
splunk_rce_via_serialized_session_payload_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 | False |
Implementation
Requires access to the _audit index.
Known False Positives
There are numerous many uses of the 'makeresults' and 'collect' SPL commands. Please evaluate the results of this search for potential abuse.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Potential abuse of the 'collect' SPL command against $splunk_server$ by detected by $user$ | 25 | 50 | 50 |
References
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | audittrail |
audittrail |
Integration | ✅ Passing | Dataset | audittrail |
audittrail |
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