Event Triggered Execution: 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 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\ are loaded into every process that calls the ubiquitously used application programming interface (API) functions CreateProcess, CreateProcessAsUser, CreateProcessWithLoginW, CreateProcessWithTokenW, or WinExec. [1]

Similar to Process Injection, this value can be abused to obtain elevated privileges by causing a malicious DLL to be loaded and run in the context of separate processes on the computer. Malicious AppCert DLLs may also provide persistence by continuously being triggered by API activity.

ID: T1546.009
Sub-technique of:  T1546
Tactics: Privilege Escalation, Persistence
Platforms: Windows
Permissions Required: Administrator, SYSTEM
Effective Permissions: Administrator, SYSTEM
Data Sources: Loaded DLLs, Process command-line parameters, Process monitoring, Windows Registry
Version: 1.0
Created: 24 January 2020
Last Modified: 24 March 2020

Procedure Examples

Name Description
Honeybee

Honeybee's service-based DLL implant can execute a downloaded file with parameters specified using CreateProcessAsUser.[9]

PUNCHBUGGY

PUNCHBUGGY can establish using a AppCertDLLs Registry key.[8]

Mitigations

Mitigation Description
Execution Prevention

Adversaries install new AppCertDLL binaries to execute this technique. Identify and block potentially malicious software executed through AppCertDLLs functionality by using application control [2] tools, like Windows Defender Application Control[3], AppLocker, [4] [5] or Software Restriction Policies [6] where appropriate. [7]

Detection

Monitor DLL loads by processes, specifically looking for DLLs that are not recognized or not normally loaded into a process. Monitor the AppCertDLLs Registry value for modifications that do not correlate with known software, patch cycles, etc. Monitor and analyze application programming interface (API) calls that are indicative of Registry edits such as RegCreateKeyEx and RegSetValueEx. [1]

Tools such as Sysinternals Autoruns may overlook AppCert DLLs as an auto-starting location. [10] [11]

Look for abnormal process behavior that may be due to a process loading a malicious DLL. Data and events should not be viewed in isolation, but as part of a chain of behavior that could lead to other activities, such as making network connections for Command and Control, learning details about the environment through Discovery, and conducting Lateral Movement.

References