Detect AppInit DLLs in Elastic Security
Adversaries may establish persistence and/or elevate privileges by executing malicious content triggered by AppInit DLLs loaded into processes. Dynamic-link libraries (DLLs) that are specified in the AppInit_DLLs value in the Registry keys HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows or HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows are loaded by user32.dll into every process that loads user32.dll. In practice, this is nearly every desktop process (GUI applications). This Registry-based injection mechanism has been used by multiple APT groups and crimeware families including Flame, FinFisher, and others.
MITRE ATT&CK
- Tactic
- Privilege Escalation Persistence
- Technique
- T1546 Event Triggered Execution
- Sub-technique
- T1546.010 AppInit DLLs
- Canonical reference
- https://attack.mitre.org/techniques/T1546/010/
Elastic Detection Query
registry where
registry.key : (
"*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows",
"*\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows"
) and
registry.value.name : ("AppInit_DLLs", "LoadAppInit_DLLs", "RequireSignedAppInit_DLLs") and
(
(
registry.value.name : "AppInit_DLLs" and
registry.data.strings != null and
registry.data.strings != "" and
not registry.data.strings : ("*\\Windows\\system32\\*", "*\\Windows\\SysWOW64\\*")
) or
(
registry.value.name : "LoadAppInit_DLLs" and
registry.data.strings : ("1", "0x00000001")
) or
(
registry.value.name : "RequireSignedAppInit_DLLs" and
registry.data.strings : ("0", "0x00000000")
)
) Detects AppInit DLL persistence via registry modification (T1546.010). Monitors HKLM AppInit_DLLs registry keys for suspicious non-system DLL paths, enabling of AppInit loading, or disabling of DLL signature requirements. Covers both 32-bit (Wow6432Node) and 64-bit registry paths.
Data Sources
Required Tables
False Positives & Tuning
- Legacy accessibility software (e.g., older screen readers or assistive technology tools) that legitimately register DLLs via AppInit_DLLs during installation
- Endpoint security or DLP products that use AppInit_DLLs as part of their user-mode hooking mechanism — verify vendor-signed DLLs
- Software installers or system configuration scripts run by IT administrators during provisioning that temporarily modify AppInit_DLLs values
- Virtualization or compatibility shim software that registers helper DLLs in AppInit_DLLs for application compatibility purposes
Other platforms for T1546.010
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Register DLL in AppInit_DLLs and Enable Loading
Expected signal: Three Sysmon Event ID 13 records: (1) AppInit_DLLs set to C:\Users\Public\argus_appinit.dll, (2) LoadAppInit_DLLs set to 1, (3) RequireSignedAppInit_DLLs set to 0. The combination of all three changes in a short time window is a high-confidence indicator.
- Test 2Enable AppInit Loading Without DLL Path
Expected signal: Sysmon Event ID 13: TargetObject contains Windows NT\CurrentVersion\Windows\LoadAppInit_DLLs, Details=1. This single-value change is an intermediate persistence indicator.
- Test 3Audit Current AppInit_DLLs State
Expected signal: Process creation for reg.exe (multiple times) querying AppInit keys. Read-only — no modifications. Use this as a scheduled hunt query to detect pre-existing AppInit DLL registrations.
References (5)
- https://attack.mitre.org/techniques/T1546/010/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.010/T1546.010.md
- https://support.microsoft.com/en-us/topic/description-of-the-appinit-dlls-feature-in-windows-7-and-windows-server-2008-r2-aabbf40f-3e10-eadd-6260-79df3d753b5f
- https://www.mandiant.com/resources/blog/likely-iranian-threat-actor-conducts-politically-motivated-disruptive-activity-against-israel
- https://pentestlab.blog/2019/12/12/persistence-appinit-dlls/
Unlock Pro Content
Get the full detection package for T1546.010 including response playbook, investigation guide, and atomic red team tests.