| ID | Technique | Tactic |
|---|---|---|
| T1083 | File and Directory Discovery | Discovery |
Detection: Splunk Absolute Path Traversal Using runshellscript
REMOVED DETECTION
This detection has been removed from the Splunk Threat Research content library and is no longer maintained or supported.
Reason: Detection is deprecated as the associated CVEs have been patched in the latest Splunk release.
Removed in version: 5.6.0
If you have any questions or concerns, please reach out to us at research@splunk.com.
Description
The following analytic detects the exploitation of an absolute path traversal vulnerability in Splunk Enterprise versions lower than 8.2.12, 9.0.6, and 9.1.1, where an attacker can execute arbitrary code located on a separate disk. It leverages logs from the splunk_python macro, specifically looking for the runshellscript command with a specific argument count and path pattern. This activity is significant as it indicates a potential exploitation attempt that could lead to unauthorized code execution. If confirmed malicious, this could allow an attacker to gain control over the Splunk instance, leading to data breaches or further system compromise.
Search
1`splunk_python` *runshellscript*
2| eval log_split=split(_raw, "runshellscript: ")
3| eval array_raw = mvindex(log_split,1)
4| eval data_cleaned=replace(replace(replace(array_raw,"\[",""),"\]",""),"'","")
5| eval array_indices=split(data_cleaned,",")
6| eval runshellscript_args_count=mvcount(array_indices)
7| where runshellscript_args_count = 10
8| eval interpreter=mvindex(array_indices,0)
9| eval targetScript=mvindex(array_indices,1)
10| eval targetScript != "*C:*"
11| stats count min(_time) as firstTime max(_time) as lastTime by splunk_server interpreter targetScript
12| `security_content_ctime(firstTime)`
13| `security_content_ctime(lastTime)`
14| `splunk_absolute_path_traversal_using_runshellscript_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Splunk | 'splunkd_ui_access' |
'splunkd_ui_access.log' |
Macros Used
| Name | Value |
|---|---|
| splunk_python | index=_internal sourcetype=splunk_python |
| splunk_absolute_path_traversal_using_runshellscript_filter | `` |
splunk_absolute_path_traversal_using_runshellscript_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
CVE
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | N/A |
| Earliest Time | N/A |
| Latest Time | N/A |
| Schedule Window | N/A |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
Must have access to internal indexes. Only applies to Splunk on Windows versions.
Known False Positives
The command runshellscript can be used for benign purposes. Analyst will have to review the searches and determined maliciousness specially by looking at targeted script.
Associated Analytic Story
References
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | Not Applicable | N/A | N/A | N/A |
| Unit | Not Applicable | 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: 6