Try in Splunk Security Cloud

Description

The following analytic detects the creation of shim database files (.sdb) in default directories using the sdbinst.exe application. It leverages filesystem activity data from the Endpoint.Filesystem data model to identify file writes to the Windows\AppPatch\Custom directory. This activity is significant because shims can intercept and alter API calls, potentially allowing attackers to bypass security controls or execute malicious code. If confirmed malicious, this could lead to unauthorized code execution, privilege escalation, or persistent access within the environment.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
  • Datamodel: Endpoint
  • Last Updated: 2024-05-19
  • Author: David Dorsey, Splunk
  • ID: 6e4c4588-ba2f-42fa-97e6-9f6f548eaa33

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1546.011 Application Shimming Privilege Escalation, Persistence
T1546 Event Triggered Execution Privilege Escalation, Persistence
Kill Chain Phase
  • Exploitation
  • Installation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
| tstats `security_content_summariesonly` count values(Filesystem.action) values(Filesystem.file_hash) as file_hash values(Filesystem.file_path) as file_path  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path=*Windows\\AppPatch\\Custom* by Filesystem.file_name Filesystem.dest 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
|`drop_dm_object_name(Filesystem)` 
| `shim_database_file_creation_filter`

Macros

The SPL above uses the following Macros:

:information_source: shim_database_file_creation_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • Filesystem.file_hash
  • Filesystem.file_path
  • Filesystem.file_name
  • Filesystem.dest

How To Implement

You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

Known False Positives

Because legitimate shim files are created and used all the time, this event, in itself, is not suspicious. However, if there are other correlating events, it may warrant further investigation.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
56.0 70 80 A process that possibly write shim database in $file_path$ in host $dest$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

Reference

Test Dataset

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 | version: 4