Windows AppCertDLL Modification for Persistence and Privilege Escalation
Attackers can modify Windows AppCertDLL registry keys via command-line utilities to achieve persistence and privilege escalation by registering malicious DLLs to be loaded early in the system startup process.
This threat involves the modification of specific Windows registry keys related to AppCertDLLs (Application Certification DLLs) to achieve persistence and privilege escalation. Attackers utilize command-line utilities to alter values under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AppCertDLLs, which are typically used by the Windows Session Manager to specify DLLs loaded during the system startup process. By registering a malicious DLL in this location, adversaries can ensure their code executes with high privileges very early in the system boot sequence, making it a potent technique for maintaining control and bypassing security measures. This method is effective for sustained access to compromised systems and can lead to full system takeover.
Attack Chain
- Attacker gains initial access to a Windows system through various means (e.g., exploitation, phishing, credential compromise).
- The attacker executes a command-line utility (e.g.,
reg.exe,powershell.exe) with administrative privileges. - The utility modifies values under
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AppCertDLLs. - A path to a malicious DLL is registered within the
AppCertDLLskey. - Upon subsequent system startup or specific process creation, the Windows Session Manager attempts to load the DLLs specified in this registry location.
- The malicious DLL is loaded, granting the attacker persistent execution with System-level privileges, enabling further compromise or data exfiltration.
Impact
Successful exploitation of this technique grants attackers persistent access to the compromised system with elevated privileges (System). This can lead to a full system compromise, allowing adversaries to install additional malware, exfiltrate sensitive data, disable security software, or establish further footholds. The early loading of malicious code makes it difficult for traditional security solutions to detect and prevent, enhancing the attacker's ability to evade defenses and maintain a covert presence.
Recommendation
- Deploy the Sigma rule "Detect AppCertDLL Modification via Command Line" to your SIEM and tune for your environment.
- Ensure Sysmon Event ID 1 (Process Creation) and Windows Event Log Security 4688 are collected from all Windows endpoints to enable detection.
- Regularly review modifications to the
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AppCertDLLsregistry key, especially when initiated by unusual processes.
Detection coverage 1
Detect AppCertDLL Modification via Command Line
highDetects attempts to modify AppCertDLL registry keys via command-line utilities, indicating a potential persistence or privilege escalation attempt.
Detection queries are available on the platform. Get full rules →