Splunk Stored XSS via Data Model objectName Field
Description
The following analytic identifies attempts to exploit a stored cross-site scripting (XSS) vulnerability in Splunk Enterprise via the Data Model object name field. It detects this activity by analyzing web access logs (splunkd_webx
) for specific URI patterns and non-null query parameters. This activity is significant because it allows authenticated users to inject and store malicious scripts, leading to persistent XSS attacks. If confirmed malicious, this could enable attackers to execute arbitrary scripts in the context of other users, potentially leading to data theft, session hijacking, or further compromise of the Splunk environment.
- Type: Hunting
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-07-01
- Author: Rod Soto
- ID: 062bff76-5f9c-496e-a386-cb1adcf69871
Annotations
Kill Chain Phase
- Delivery
NIST
- DE.AE
CIS20
- CIS 10
CVE
Search
1
2
3
`splunkd_webx` uri=/*/splunkd/__raw/servicesNS/*/launcher/datamodel/model* uri_query!=null
| stats count by _time host status clientip user uri
| `splunk_stored_xss_via_data_model_objectname_field_filter`
Macros
The SPL above uses the following Macros:
splunk_stored_xss_via_data_model_objectname_field_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
- uri_query
- host
- status
- clientip
- user
- uri_path
How To Implement
This vulnerability only affects Splunk Web enabled instances. 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 may produce false positives and does not cover exploitation attempts via code obfuscation, focus of search is suspicious requests against "/en-US/splunkd/__raw/servicesNS/*/launcher/datamodel/model" which is the injection point.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
25.0 | 50 | 50 | A potential XSS attempt has been detected from $user$ |
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
- https://advisory.splunk.com/advisories/SVD-2022-1109
- https://portswigger.net/web-security/cross-site-scripting/cheat-sheet
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: 3