ID | Technique | Tactic |
---|---|---|
T1210 | Exploitation of Remote Services | Lateral Movement |
Detection: Splunk RCE via External Lookup Copybuckets
Description
The following detection provides the ability to detect remote code execution attempts against a script named copybuckets present within the splunk_archiver application by calling this script as an external lookup.
Search
1index=_internal sourcetype="splunk_archiver-too_small" *.csv
2| rex field=_raw "Invoking command:\s(?<command>.*)"
3| stats min(_time) as firstTime max(_time) as lastTime values(command) as command values(severity) as severity by host
4| `security_content_ctime(firstTime)`
5| `security_content_ctime(lastTime)`
6| `splunk_rce_via_external_lookup_copybuckets_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
Splunk | 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_rce_via_external_lookup_copybuckets_filter | search * |
splunk_rce_via_external_lookup_copybuckets_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
KillChainPhase.EXPLOITAITON
NistCategory.DE_AE
Cis18Value.CIS_10
APT28
Dragonfly
Earth Lusca
Ember Bear
FIN7
Fox Kitten
MuddyWater
Threat Group-3390
Tonto Team
Wizard Spider
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
Requires access to internal indexes
Known False Positives
An operator must identify elements indicatives of command execution requests by looking at regex data being extracted from the log. Not all the requests will be malicious.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message | Risk Score | Impact | Confidence |
---|---|---|---|
Possible exploitation attempt against $host$ | 80 | 80 | 100 |
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/splunk_archiver.log |
splunk_archiver-too_small |
Integration | ✅ Passing | Dataset | /opt/splunk/var/log/splunk/splunk_archiver.log |
splunk_archiver-too_small |
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: 2