Custom shim database registered under AppCompatFlags
Detects registration of a custom application-compatibility shim database, the registry half of AN0051. Both terms are `contains` with a trailing backslash on purpose: `InstalledSDB` and `Custom` are subkeys, not value names, so the written path is `...\AppCompatFlags\InstalledSDB\{GUID}\DatabasePath` or `...\AppCompatFlags\Custom\<target.exe>\{GUID}.sdb`, and an `endswith` on the key name would have matched nothing ever. Anchoring on the parent key rather than on a hive prefix also picks up the WOW6432Node view and keeps the match independent of how the hive is rendered. The rest of the analytic — sdbinst.exe running inside a correlation window, and the shim then injecting a DLL into the target process — is a cross-source sequence Sigma cannot state, so only the persistence artefact itself is authored here; a shim registered by writing the keys directly, without sdbinst.exe, still matches. This telemetry is off by default in both feeds: Security 4657 needs the *Audit Registry* subcategory enabled **and** a SACL placed on the AppCompatFlags key, and a Sysmon-fed registry_set feed needs this subtree in the RegistryEvent include list, which the common shipped configurations do not carry. Without one of those, this rule returns zero rows because nothing is being recorded, not because nothing happened. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0017, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
title: Custom shim database registered under AppCompatFlagsid: edbd0c76-27f5-4746-a45c-debcea5a4041status: experimentaldescription: | Detects registration of a custom application-compatibility shim database, the registry half of AN0051. Both terms are `contains` with a trailing backslash on purpose: `InstalledSDB` and `Custom` are subkeys, not value names, so the written path is `...\AppCompatFlags\InstalledSDB\{GUID}\DatabasePath` or `...\AppCompatFlags\Custom\<target.exe>\{GUID}.sdb`, and an `endswith` on the key name would have matched nothing ever. Anchoring on the parent key rather than on a hive prefix also picks up the WOW6432Node view and keeps the match independent of how the hive is rendered. The rest of the analytic — sdbinst.exe running inside a correlation window, and the shim then injecting a DLL into the target process — is a cross-source sequence Sigma cannot state, so only the persistence artefact itself is authored here; a shim registered by writing the keys directly, without sdbinst.exe, still matches. This telemetry is off by default in both feeds: Security 4657 needs the *Audit Registry* subcategory enabled **and** a SACL placed on the AppCompatFlags key, and a Sysmon-fed registry_set feed needs this subtree in the RegistryEvent include list, which the common shipped configurations do not carry. Without one of those, this rule returns zero rows because nothing is being recorded, not because nothing happened. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0017, not hand-written and not tested by its author. Any lab result is on this rule's own page.references: - https://attack.mitre.org/techniques/T1546/011 - https://attack.mitre.org/detectionstrategies/DET0017author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags: - attack.privilege-escalation - attack.persistence - attack.t1546.011logsource: category: registry_set product: windowsdetection: selection: TargetObject|contains: - '\AppCompatFlags\InstalledSDB\' - '\AppCompatFlags\Custom\' condition: selectionfalsepositives: - "Legacy line-of-business applications whose installers ship a custom .sdb and register it during setup, repair or upgrade. This is the supported use of the feature and it is the dominant benign volume in estates that still run pre-Windows-10 software. MITRE names a CustomShimPathAllowlist knob for exactly this; the approved database paths that go in it come from the estate's own deployment records, not from any list MITRE supplies." - "Application Compatibility Toolkit deployments, where an administrator authors a shim package and pushes it to a group of hosts. One authoring action produces the same event on every targeted machine within a deployment window, so the burst looks like fleet-wide persistence." - "Host rebuilds, image deployment and profile-migration tooling that replays the AppCompatFlags subtree onto a fresh machine, rewriting every registered database at once. MITRE's UserContext knob narrows alerting to admin or SYSTEM-context installs and does not help here, because the restore also runs as SYSTEM." - "Registry-monitoring or configuration-drift agents that rewrite a value with unchanged data during a baseline enforcement pass, which still emits a set event."level: highSentinel · KQL
Run this as a search.
DeviceRegistryEvents| where (RegistryKey contains "\\AppCompatFlags\\InstalledSDB\\" or RegistryKey contains "\\AppCompatFlags\\Custom\\")
Splunk · SPL
Run this as a search.
index=* (TargetObject="*\\AppCompatFlags\\InstalledSDB\\*" OR TargetObject="*\\AppCompatFlags\\Custom\\*")Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (TO_LOWER(registry.path) LIKE "*\\\\appcompatflags\\\\installedsdb\\\\*" OR TO_LOWER(registry.path) LIKE "*\\\\appcompatflags\\\\custom\\\\*")
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,registry_set,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <rule id="100000" level="12"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="TargetObject" type="pcre2">(?i)(\\AppCompatFlags\\InstalledSDB\\|\\AppCompatFlags\\Custom\\)</field> <description>Custom shim database registered under AppCompatFlags</description> <mitre> <id>T1546.011</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.