Detection: 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.

1`splunkd_webx` uri=/*/splunkd/__raw/servicesNS/*/launcher/datamodel/model* uri_query!=null 
2| stats count by _time host status clientip user uri 
3| `splunk_stored_xss_via_data_model_objectname_field_filter`

Data Source

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

Macros Used

Name Value
splunkd_webx index=_internal sourcetype=splunk_web_access
splunk_stored_xss_via_data_model_objectname_field_filter search *
splunk_stored_xss_via_data_model_objectname_field_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
T1189 Drive-by Compromise Initial Access
KillChainPhase.DELIVERY
NistCategory.DE_AE
Cis18Value.CIS_10
APT19
APT28
APT32
APT37
APT38
Andariel
Axiom
BRONZE BUTLER
CURIUM
Daggerfly
Dark Caracal
Darkhotel
Dragonfly
Earth Lusca
Elderwood
Lazarus Group
Leafminer
Leviathan
Machete
Magic Hound
Mustard Tempest
PLATINUM
PROMETHIUM
Patchwork
RTM
Threat Group-3390
Transparent Tribe
Turla
Windigo
Windshift
Winter Vivern

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
This configuration file applies to all detections of type hunting.

Implementation

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

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
A potential XSS attempt has been detected from $user$ 25 50 50
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

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/web_access.log splunk_web_access
Integration ✅ Passing Dataset /opt/splunk/var/log/splunk/web_access.log splunk_web_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: 4