Detection: Splunk Unauthenticated Log Injection Web Service Log

Description

The following analytic identifies potential log injection attempts into the Splunk server via specially crafted web URLs. It detects ANSI escape codes within the uri_path field of splunkd_webx logs. This activity is significant as it can lead to log file manipulation, potentially obfuscating malicious actions or misleading analysts. If confirmed malicious, an attacker could manipulate log files to hide their tracks or execute further attacks, compromising the integrity of the logging system and making incident response more challenging.

1`splunkd_webx`  uri_path IN ("*\x1B*", "*\u001b*", "*\033*", "*\0x9*", "*\0x8*") 
2| stats count by uri_path method host status clientip 
3| `splunk_unauthenticated_log_injection_web_service_log_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_unauthenticated_log_injection_web_service_log_filter search *
splunk_unauthenticated_log_injection_web_service_log_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
T1190 Exploit Public-Facing Application Initial Access
KillChainPhase.DELIVERY
NistCategory.DE_AE
Cis18Value.CIS_10
APT28
APT29
APT39
APT41
APT5
Agrius
Axiom
BackdoorDiplomacy
BlackTech
Blue Mockingbird
Cinnamon Tempest
Dragonfly
Earth Lusca
Ember Bear
FIN13
FIN7
Fox Kitten
GALLIUM
GOLD SOUTHFIELD
HAFNIUM
INC Ransom
Ke3chang
Kimsuky
Magic Hound
Moses Staff
MuddyWater
Play
Rocke
Sandworm Team
Threat Group-3390
ToddyCat
Volatile Cedar
Volt Typhoon
Winter Vivern
menuPass

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 only affects web enabled Splunk instances. The detection does require the ability to search the _internal index.

Known False Positives

This hunting search will produce false positives if ANSI escape characters are included in URLs either voluntarily or by accident. This search will not detect obfuscated ANSI characters.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
Possible Splunk unauthenticated log injection web service log exploitation attempt against $host$ from $clientip$ 9 30 30
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: 3