T1546.009

AppCert DLLs

Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppCert DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppCertDLLs Registry key under HKLM\System\CurrentControlSet\Control\Session Manager are loaded into every process that calls the commonly used application programming interface (API) functions CreateProcess, CreateProcessAsUser, CreateProcessWithLoginW, CreateProcessWithTokenW, or WinExec. This provides adversaries a way to have code execute in the security context of every process on the system, including processes with high privilege levels.

Microsoft Sentinel / Defender
kusto
let AppCertReg = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has "System\\CurrentControlSet\\Control\\Session Manager\\AppCertDlls"
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| extend DllPath = RegistryValueData
| extend IsSystemDll = RegistryValueData has_any (
    "C:\\Windows\\system32\\",
    "C:\\Windows\\SysWOW64\\"
  )
| project RegTime=Timestamp, DeviceName, AccountName, RegistryKey,
         RegistryValueName, DllPath, IsSystemDll,
         InitiatingProcessFileName, InitiatingProcessCommandLine;
let AppCertDllLoad = DeviceImageLoadEvents
| where Timestamp > ago(24h)
| where FolderPath !has_any ("system32", "SysWOW64", "Program Files", "Program Files (x86)")
| join kind=inner (
    DeviceRegistryEvents
    | where RegistryKey has "AppCertDlls"
    | distinct RegistryValueData
  ) on $left.FileName == $right.RegistryValueData
| project LoadTime=Timestamp, DeviceName, FileName, FolderPath, InitiatingProcessFileName;
union (AppCertReg | extend EventType="REGISTRATION"),
      (AppCertDllLoad | extend EventType="DLL_LOADED", RegistryKey="", RegistryValueName="")
| sort by RegTime desc, LoadTime desc
high severity high confidence

Data Sources

Windows Registry: Registry Key Modification Module: Module Load Microsoft Defender for Endpoint

Required Tables

DeviceRegistryEvents DeviceImageLoadEvents

False Positives

  • Digital rights management (DRM) or software licensing tools that use AppCertDLLs to inject into processes for license validation
  • Enterprise endpoint management agents that use AppCertDLLs for process monitoring across all applications
  • Anticheat software for games that injects monitoring DLLs via AppCertDLLs mechanism
  • Legacy application compatibility shims that use AppCertDLLs to apply compatibility fixes to processes

Unlock Pro Content

Get the full detection package for T1546.009 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections