ID | Technique | Tactic |
---|---|---|
T1189 | Drive-by Compromise | Initial Access |
Detection: Splunk XSS in Highlighted JSON Events
Description
The following analytic identifies potential exploitation of a Cross-Site Scripting (XSS) vulnerability in Splunk Enterprise 9.1.2. It detects suspicious requests to the Splunk web GUI that may execute JavaScript within script tags. This detection leverages logs from the splunkd_ui
data source, focusing on specific URI paths and HTTP methods. This activity is significant as it can allow attackers to execute arbitrary JavaScript, potentially accessing the API with the logged-in user's permissions. If the user is an admin, the attacker could create an admin account, leading to full control over the Splunk environment.
Search
1`splunkd_ui` "/*/splunkd/__raw/servicesNS/nobody/search/authentication/users" status=201
2| stats count min(_time) as firstTime max(_time) as lastTime by clientip, uri_path, method
3| `security_content_ctime(firstTime)`
4| `security_content_ctime(lastTime)`
5| `splunk_xss_in_highlighted_json_events_filter`
Data Source
Name | Platform | Sourcetype | Source | Supported App |
---|---|---|---|---|
Splunk | Splunk | 'splunkd_ui_access' |
'splunkd_ui_access.log' |
N/A |
Macros Used
Name | Value |
---|---|
security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
splunk_xss_in_highlighted_json_events_filter | search * |
splunk_xss_in_highlighted_json_events_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
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 |
Implementation
This search only applies to web-GUI-enabled Splunk instances and operator must have access to internal indexes.
Known False Positives
This is a hunting search and will produce false positives as it is not possible to view contents of a request payload. It shows the artifact resulting from a potential exploitation payload (the creation of a user with admin privileges).
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Possible XSS exploitation from $clientip$ | 15 | 30 | 50 |
References
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | splunkd_ui_access.log |
splunkd_ui_access |
Integration | ✅ Passing | Dataset | splunkd_ui_access.log |
splunkd_ui_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