Detection: Splunk Reflected XSS on App Search Table Endpoint

Description

The following analytic identifies attempts to exploit a reflected cross-site scripting (XSS) vulnerability on the app search table endpoint in Splunk Enterprise versions below 9.1.1, 9.0.6, and 8.2.12. It detects this activity by analyzing web request logs for specific dataset commands (makeresults, count, eval, baseSPL) within the splunkd_web index. This activity is significant because successful exploitation can lead to the execution of arbitrary commands on the Splunk platform, potentially compromising the entire instance. If confirmed malicious, attackers could gain unauthorized access, execute arbitrary code, and manipulate data within the Splunk environment.

1`splunkd_web` (dataset_commands="*makeresults*" AND dataset_commands="*count*" AND dataset_commands="*eval*" AND dataset_commands="*baseSPL*") 
2| stats count min(_time) as firstTime max(_time) as lastTime by clientip status user view root uri_path 
3| `security_content_ctime(firstTime)`
4| `security_content_ctime(lastTime)` 
5| `splunk_reflected_xss_on_app_search_table_endpoint_filter`

Data Source

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

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
splunk_reflected_xss_on_app_search_table_endpoint_filter search *
splunk_reflected_xss_on_app_search_table_endpoint_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

Need access to the internal indexes.

Known False Positives

This search will produce false positives. It is necessary to also look at uri_query parameter to determine the possible malicious intention of inserting makeresults within the uri string.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
Possible XSS attack against from $user$ 12 30 40
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 web_access.log splunk_web_access
Integration ✅ Passing Dataset 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: 3