Detect AppInit DLLs in Splunk
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/
SPL Detection Query
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR sourcetype="WinEventLog:Security")
| eval IsAppInitReg=if(
(EventCode=12 OR EventCode=13)
AND match(TargetObject, "Windows NT\\\\CurrentVersion\\\\Windows")
AND match(TargetObject, "(AppInit_DLLs|LoadAppInit_DLLs|RequireSignedAppInit_DLLs)"),
1, 0
)
| eval IsEnabling=if(IsAppInitReg=1 AND match(TargetObject, "LoadAppInit") AND Details="1", 1, 0)
| eval IsUnsignedAllowed=if(IsAppInitReg=1 AND match(TargetObject, "RequireSigned") AND Details="0", 1, 0)
| eval IsSuspiciousDll=if(
IsAppInitReg=1
AND match(TargetObject, "AppInit_DLLs")
AND NOT match(Details, "(?i)(system32|syswow64)")
AND Details!="",
1, 0
)
| where IsAppInitReg=1
| eval DetectionType=case(
IsSuspiciousDll=1, "APPINIT_SUSPICIOUS_DLL_PATH",
IsEnabling=1, "APPINIT_LOADING_ENABLED",
IsUnsignedAllowed=1, "APPINIT_SIGNATURE_DISABLED",
IsAppInitReg=1, "APPINIT_KEY_MODIFIED",
1=1, "UNKNOWN"
)
| table _time, host, User, EventCode, DetectionType, TargetObject, Details, Image
| sort - _time Detects AppInit DLL registration using Sysmon Registry events. Categorizes detections by type: suspicious DLL paths (non-system locations), LoadAppInit_DLLs being enabled, and RequireSignedAppInit_DLLs being disabled. The combination of enabling AppInit loading AND disabling signature requirements AND adding a DLL path is the highest-confidence indicator of malicious AppInit DLL setup.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legitimate security products using AppInit_DLLs for monitoring injection
- Application virtualization platforms using AppInit for isolation
- Older enterprise software requiring system-wide DLL injection
- Debugging tools that document AppInit_DLLs usage
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.