Splunk RCE via User XSLT
Description
This search provides information to investigate possible remote code execution exploitation via user-supplied Extensible Stylesheet Language Transformations (XSLT), affecting Splunk versions 9.1.x.
- Type: Hunting
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2023-11-22
- Author: Marissa Bower, Chase Franklin, Rod Soto, Bhavin Patel, Eric McGinnis, Splunk
- ID: 6cb7e011-55fb-48e3-a98d-164fa854e37e
Annotations
Kill Chain Phase
- Exploitation
NIST
- DE.AE
CIS20
- CIS 10
CVE
ID | Summary | CVSS |
---|---|---|
Search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
`splunkd_ui` ((uri="*NO_BINARY_CHECK=1*" AND "*input.path=*.xsl*") OR uri="*dispatch*.xsl*") AND uri!= "*splunkd_ui*"
| rex field=uri "(?<string>=\s*([\S\s]+))"
| eval decoded_field=urldecode(string)
| eval action=case(match(status,"200"),"Allowed",match(status,"303
|500
|401
|403
|404
|301
|406"),"Blocked",1=1,"Unknown")
| stats count min(_time) as firstTime max(_time) as lastTime by clientip useragent uri decoded_field action host
| rename clientip as src, uri as dest_uri
| iplocation src
| fillnull value="N/A"
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| table firstTime, lastTime src, useragent, action, count, Country, Region, City, dest_uri, decoded_field
Macros
The SPL above uses the following Macros:
splunk_rce_via_user_xslt_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.
- uri
- clientip
- useragent
- action
- host
How To Implement
This detection does not require you to ingest any new data. The detection does require the ability to search the _internal index.
Known False Positives
This search will provide information for investigation and hunting possible abuse of user-supplied XSLT. There may be false positives and results should individually evaluated. Please evaluate the source IP and useragent responsible for creating the requests.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
64.0 | 80 | 80 | Potential Remote Code Execution via XLST from $src$ using useragent - $useragent$ |
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