T1546.010 Microsoft Sentinel · KQL

Detect AppInit DLLs in Microsoft Sentinel

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/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
let AppInitKeys = dynamic([
    "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows",
    "SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows"
  ]);
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any (AppInitKeys)
| where RegistryValueName in~ ("AppInit_DLLs", "LoadAppInit_DLLs", "RequireSignedAppInit_DLLs")
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| extend IsDllLoad = RegistryValueName =~ "LoadAppInit_DLLs"
| extend DllPath = RegistryValueData
| extend RequiresSigned = RegistryValueName =~ "RequireSignedAppInit_DLLs"
| extend SigningDisabled = RequiresSigned and RegistryValueData == "0"
| extend DllEnabled = IsDllLoad and RegistryValueData == "1"
| extend SuspiciousDllPath = RegistryValueName =~ "AppInit_DLLs"
    and RegistryValueData != ""
    and not(RegistryValueData has_any ("C:\\Windows\\system32\\", "C:\\Windows\\SysWOW64\\"))
| project Timestamp, DeviceName, AccountName, ActionType, RegistryKey,
         RegistryValueName, RegistryValueData, SuspiciousDllPath, DllEnabled, SigningDisabled,
         InitiatingProcessFileName, InitiatingProcessCommandLine
| where SuspiciousDllPath or DllEnabled or SigningDisabled
| sort by Timestamp desc
high severity high confidence

Detects AppInit DLL persistence by monitoring the Windows NT CurrentVersion\Windows registry key for modifications to AppInit_DLLs (the DLL list), LoadAppInit_DLLs (enable/disable flag), and RequireSignedAppInit_DLLs (signature enforcement). Flags: non-empty AppInit_DLLs values pointing outside system directories, LoadAppInit_DLLs being set to 1 (enabling injection), and RequireSignedAppInit_DLLs being set to 0 (disabling signature requirement — commonly done by attackers to allow unsigned malicious DLLs).

Data Sources

Windows Registry: Registry Key ModificationMicrosoft Defender for Endpoint

Required Tables

DeviceRegistryEvents

False Positives & Tuning

  • Legitimate security products (some older AV engines, DLP tools) that use AppInit_DLLs to inject monitoring code into all user processes
  • Application virtualization platforms that use AppInit_DLLs for application isolation and shim injection
  • Some older enterprise software that requires system-wide DLL injection for licensing or functionality
  • Research and debugging tools that explicitly document their use of AppInit_DLLs (rare in production environments)
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections