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.
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 Data Sources
Required Tables
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
References (4)
- https://attack.mitre.org/techniques/T1546/009/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.009/T1546.009.md
- https://www.endgame.com/blog/technical-blog/ten-process-injection-techniques-technical-survey-common-and-trending-windows
- https://pentestlab.blog/2019/12/16/persistence-appcert-dlls/
Unlock Pro Content
Get the full detection package for T1546.009 including response playbook, investigation guide, and atomic red team tests.