--- title: "Prevent DLL injection through AppInit_DLLs" slug: "prevent-dll-injection-through-appinit-dlls" tags: ["Product Usage", "ENS 10.7.x", "Endpoint Security"] updated: 2026-09-14T20:28:36Z published: 2026-09-14T20:28:36Z canonical: "docs.trellix.com/prevent-dll-injection-through-appinit-dlls" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Prevent DLL injection through AppInit_DLLs This Expert rule detects the untrusted process of injecting custom DLLs into the critical processes through AppInit_DLLs registry entry. When DLL adds into this registry entry, it forces user32.dll to load the DLL module during process startup. > [!NOTE] > Note > > Exploit Prevention is not supported in the ARM architecture. > [!WARNING] > Important > > Make sure to validate this rule in a client test system before enforcing it wider. ```plaintext Rule {    Process {        Include VTP_TRUST true    }    Target {        Match KEY {            Include OBJECT_NAME {                -v "HKLMS\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\WINDOWS\\*_DLLs"            }            Include -access "CREATE WRITE DELETE REPLACE_KEY RESTORE_KEY"        }        Match VALUE {            Include OBJECT_NAME {             -v "HKLMS\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\WINDOWS\\*_DLLs"            }            Include -access "CREATE WRITE DELETE REPLACE_KEY RESTORE_KEY"        }    } } ``` ### Sections of Expert Rule in detail | ```plaintext Rule ``` | Formulates the execution of commands defined within `Process` and `Target`. | | --- | --- | | ```plaintext Process ``` | Executes the set of actions defined within the `Include` and `Exclude` commands. It does not take any other commands. | | ```plaintext Include VTP_TRUST true ``` | Checks if VTP trusts the process or file. The value is treated as Boolean. That is, a value of 1 in the match type matches only processes trusted by VTP. A value of 0 matches non-trusted processes. | | ```plaintext Target ``` | Executes the `Match` command. | | ```plaintext Match KEY { Include OBJECT_NAME { -v "HKLMS\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\WINDOWS\\*_DLLs" } Include -access "CREATE WRITE DELETE REPLACE_KEY RESTORE_KEY" ``` | This section controls create, edit and delete access to key data in a key object, available in the folder, `HKLMS\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\WINDOWS\\*_DLLs`. | | ```plaintext Match VALUE { Include OBJECT_NAME { -v "HKLMS\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\WINDOWS\\*_DLLs" } Include -access "CREATE WRITE DELETE REPLACE_KEY RESTORE_KEY"\\*_DLLs" ``` | This section controls create, edit and delete access to value data in a key object, available in the folder, `HKLMS\\MICROSOFT\\WINDOWS NT\\CURRENTVERSION\\WINDOWS\\*_DLLs`. | The following actions can trigger events in the [Event log page](/v1/docs/event-log-page) of ENS client: - accessing the hive, `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows` - creating a key, test.DLLs - creating a DWORD value, test_DLLs - creating a key, test_DLAs For more Expert Rules examples, visit the [Trellix Github repository](https://github.com/trellix-enterprise/ExpertRules).