ID | Technique | Tactic |
---|---|---|
T1654 | Log Enumeration | Discovery |
Detection: Splunk Authentication Token Exposure in Debug Log
Description
The following analytic identifies exposed authentication tokens in debug logs within Splunk Enterprise. It leverages logs from the splunkd
component with a DEBUG log level, specifically searching for event messages that validate tokens. This activity is significant because exposed tokens can be exploited by attackers to gain unauthorized access to the Splunk environment. If confirmed malicious, this exposure could lead to unauthorized data access, privilege escalation, and potential compromise of the entire Splunk infrastructure. Monitoring and addressing this vulnerability is crucial for maintaining the security and integrity of the Splunk deployment.
Search
1`splunkd` component=JsonWebToken log_level=DEBUG eventtype="splunkd-log" event_message="Validating token:*"
2| rex "Validating token: (?<token>.*)\.$"
3| search token!=None
4| stats count min(_time) as firstTime max(_time) as lastTime values(log_level) as log_level values(event_message) as event_message by index, sourcetype, host, token
5| `security_content_ctime(firstTime)`
6| `security_content_ctime(lastTime)`
7| `splunk_authentication_token_exposure_in_debug_log_filter`
Data Source
No data sources specified for this detection.
Macros Used
Name | Value |
---|---|
security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
splunk_authentication_token_exposure_in_debug_log_filter | search * |
splunk_authentication_token_exposure_in_debug_log_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 Notable | Yes |
Rule Title | %name% |
Rule Description | %description% |
Notable Event Fields | user, dest |
Creates Risk Event | True |
Implementation
Requires access to internal Splunk indexes.
Known False Positives
Only applies to affected versions of Splunk Enterprise below 9.2.1, 9.1.4, and 9.0.9
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Possible JsonWebToken exposure, please investigate affected $host$ | 50 | 50 | 100 |
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/splunkd.log |
splunkd |
Integration | ✅ Passing | Dataset | /opt/splunk/var/log/splunk/splunkd.log |
splunkd |
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