Adversaries may abuse features of Winlogon to execute DLLs and/or executables when a user logs in. Winlogon.exe is a Windows component responsible for actions at logon/logoff as well as the secure attention sequence (SAS) triggered by Ctrl-Alt-Delete. Registry entries in <code>HKLM\Software[\Wow6432Node\]\Microsoft\Windows NT\CurrentVersion\Winlogon</code> and <code>HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon</code> are used to manage additional helper programs and functionalities that support Winlogon.(Citation: Cylance Reg Persistence Sept 2013)
Malicious modifications to these Registry keys may cause Winlogon to load and execute malicious DLLs and/or executables. Specifically, the following subkeys have been known to be possibly vulnerable to abuse: (Citation: Cylance Reg Persistence Sept 2013)
Adversaries may take advantage of these features to repeatedly execute malicious code and establish persistence.
Detect Winlogon Helper DLL Abuse via Registry and Process Artifacts on Windows
Execution Prevention: Prevent the execution of unauthorized or malicious code on systems by implementing application control, script blocking, and other execution prevention mechanisms. This ensures that only trusted and authorized code is executed, reducing the risk of malware and unauthorized actions. This mitigation can be implemented through the following measures:
Application Control:
New-AppLockerPolicy -PolicyType Enforced -FilePath "C:\Policies\AppLocker.xml")Script Blocking:
Set-ExecutionPolicy AllSigned)Executable Blocking:
%TEMP% or %APPDATA% directories..exe, .bat, or .ps1 files from user-writable directories.Dynamic Analysis Prevention:
User Account Management: User Account Management involves implementing and enforcing policies for the lifecycle of user accounts, including creation, modification, and deactivation. Proper account management reduces the attack surface by limiting unauthorized access, managing account privileges, and ensuring accounts are used according to organizational policies. This mitigation can be implemented through the following measures:
Enforcing the Principle of Least Privilege
Implementing Strong Password Policies
Managing Dormant and Orphaned Accounts
Account Lockout Policies
Multi-Factor Authentication (MFA) for High-Risk Accounts
Restricting Interactive Logins
Tools for Implementation
Built-in Tools:
Identity and Access Management (IAM) Tools:
Privileged Account Management (PAM):