Adversaries may modify or add LSASS drivers to obtain persistence on compromised systems. The Windows security subsystem is a set of components that manage and enforce the security policy for a computer or domain. The Local Security Authority (LSA) is the main component responsible for local security policy and user authentication. The LSA includes multiple dynamic link libraries (DLLs) associated with various other security functions, all of which run in the context of the LSA Subsystem Service (LSASS) lsass.exe process.(Citation: Microsoft Security Subsystem)
Adversaries may target LSASS drivers to obtain persistence. By either replacing or adding illegitimate drivers (e.g., Hijack Execution Flow), an adversary can use LSA operations to continuously execute malicious payloads.
Detect unauthorized LSASS driver persistence via LSA plugin abuse (Windows)
Privileged Process Integrity: Privileged Process Integrity focuses on defending highly privileged processes (e.g., system services, antivirus, or authentication processes) from tampering, injection, or compromise by adversaries. These processes often interact with critical components, making them prime targets for techniques like code injection, privilege escalation, and process manipulation. This mitigation can be implemented through the following measures:
Protected Process Mechanisms:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\RunAsPPLAnti-Injection and Memory Protection:
Code Signing Validation:
Access Controls:
Kernel-Level Protections:
Tools for Implementation
Protected Process Light (PPL):
Code Integrity and Signing:
Memory Protection:
Process Isolation/Sandboxing:
Kernel Protection:
Credential Access Protection: Credential Access Protection focuses on implementing measures to prevent adversaries from obtaining credentials, such as passwords, hashes, tokens, or keys, that could be used for unauthorized access. This involves restricting access to credential storage mechanisms, hardening configurations to block credential dumping methods, and using monitoring tools to detect suspicious credential-related activity. This mitigation can be implemented through the following measures:
Restrict Access to Credential Storage:
C:\Windows\System32\config\SAM.Use Credential Guard:
Monitor for Credential Dumping Tools:
Disable Cached Credentials:
Enable Secure Boot and Memory Protections:
Restrict Library Loading: Restricting library loading involves implementing security controls to ensure that only trusted and verified libraries (DLLs, shared objects, etc.) are loaded into processes. Adversaries often abuse Dynamic-Link Library (DLL) Injection, DLL Search Order Hijacking, or LD_PRELOAD mechanisms to execute malicious code by forcing the operating system to load untrusted libraries. This mitigation can be implemented through the following measures:
Enforce Safe Library Loading Practices:
SafeDLLSearchMode on Windows.LD_PRELOAD and LD_LIBRARY_PATH usage on Linux systems.Code Signing Enforcement:
Environment Hardening:
Audit and Monitor Library Loading:
Sysmon on Windows to monitor for suspicious library loads.auditd on Linux to monitor shared library paths and configuration file changes.Use Application Control Solutions:
Tools for Implementation
Windows-Specific Tools:
Linux-Specific Tools:
Cross-Platform Solutions: