Skip to content
Threat Feed
low advisory

Detection of Potential Application Shimming via Sdbinst

Attackers can abuse the Windows Application Shim infrastructure via sdbinst.exe to achieve persistence and arbitrary code execution by installing malicious compatibility databases.

The Windows Application Shim infrastructure is designed to provide backward compatibility for legacy software as the operating system evolves. This mechanism allows developers to apply patches to applications without modifying the original source code. Adversaries exploit this functionality for persistence and privilege escalation by using the native sdbinst.exe utility to install malicious compatibility databases (.sdb files).

When a shim database is installed, the Windows Shim Engine intercepts calls made by target applications, allowing for the injection of malicious DLLs or the modification of application behavior. By using sdbinst.exe, attackers can force legitimate, high-privilege system processes to load malicious code whenever the target application starts. Because shims operate at the OS level, this technique is highly stealthy and can persist across reboots. Defenders should monitor for sdbinst.exe executions that deviate from established administrative baselines or expected software update patterns.

Attack Chain

  1. Attacker crafts a malicious Application Compatibility Database (.sdb file) containing hooks to redirect execution.
  2. Attacker gains elevated (Administrator or SYSTEM) privileges on the target Windows host.
  3. Attacker executes sdbinst.exe with command-line arguments to install the malicious .sdb file.
  4. The Windows Shim Engine registers the database, associating the malicious shim with a legitimate target application.
  5. The target application is executed by a user or system process.
  6. The Shim Engine intercepting the application process runtime loads the attacker-defined shim.
  7. Malicious code contained within the shim executes within the context of the target application.
  8. Persistence is established; the malicious code runs automatically every time the target application is invoked.

Impact

Successful exploitation allows for stealthy persistence and arbitrary code execution within the context of legitimate processes. This technique can be used to bypass security controls, maintain long-term access, or escalate privileges if a shim is applied to a process running with higher integrity than the attacker's initial entry point.

Recommendation

Detection engineering teams should implement monitoring for suspicious sdbinst.exe activity:

  • Deploy the Sigma rules below to identify non-standard usage of the sdbinst.exe utility.
  • Establish a baseline for legitimate sdbinst.exe usage, including enterprise software installers and standard OS maintenance tasks.
  • Enable process creation logging (Sysmon Event ID 1) to capture the command-line arguments used during sdbinst.exe execution.
  • Regularly audit the System for unauthorized or unexpected .sdb files, particularly those in non-standard application paths.

Immediate actions

Deploy the Sigma rule to detect suspicious sdbinst.exe executions.

Detection Engineering 48h

Threat Hunt

Identify all sdbinst.exe execution events in the past 90 days.

T1546.011 medium high confidence hunt now

Data: Process creation logs

Mitigations

Restrict user ability to install custom shim databases via group policy or endpoint security controls.

medium_term IT Operations

T1546.011

Detection coverage 1

Detect Potential Application Shimming via Sdbinst

low

Detects potentially malicious use of sdbinst.exe to install application compatibility databases, excluding known legitimate paths and arguments.

sigma tactics: persistence techniques: T1546.011 sources: process_creation, windows

Detection queries are available on the platform. Get full rules →