|Permissions Required||Administrator, SYSTEM|
|Data Sources||API monitoring, DLL monitoring, File monitoring, Kernel drivers, Loaded DLLs, Process Monitoring|
|Contributors||Vincent Le Toux|
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.1
Adversaries may target lsass.exe drivers to obtain execution and/or persistence. By either replacing or adding illegitimate drivers (e.g., DLL Side-Loading or DLL Search Order Hijacking), an adversary can achieve arbitrary code execution triggered by continuous LSA operations.
- Pasam establishes Persistence by infecting the Security Accounts Manager (SAM) DLL to load a malicious DLL dropped to disk.2
- Wingbird drops a malicious file (sspisrv.dll) alongside a copy of lsass.exe, which is used to register a service that loads sspisrv.dll as a driver. The payload of the malicious driver (located in its entry-point function) is executed when loaded by lsass.exe before the spoofed service becomes unstable and crashes.34
On Windows 8.1 and Server 2012 R2, enable LSA Protection by setting the Registry key
dword:00000001.5 LSA Protection ensures that LSA plug-ins and drivers are only loaded if they are digitally signed with a Microsoft signature and adhere to the Microsoft Security Development Lifecycle (SDL) process guidance.
Ensure safe DLL search mode is enabled
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode to mitigate risk that lsass.exe loads a malicious code library.8
With LSA Protection enabled, monitor the event logs (Events 3033 and 3063) for failed attempts to load LSA plug-ins and drivers.5
Utilize the Sysinternals Autoruns/Autorunsc utility9 to examine loaded drivers associated with the LSA.
Utilize the Sysinternals Process Monitor utility to monitor DLL load operations in lsass.exe.8
- Microsoft. (n.d.). Security Subsystem Architecture. Retrieved November 27, 2017.
- Mullaney, C. & Honda, H. (2012, May 4). Trojan.Pasam. Retrieved February 22, 2018.
- Anthe, C. et al. (2016, December 14). Microsoft Security Intelligence Report Volume 21. Retrieved November 27, 2017.
- Microsoft. (2017, November 9). Backdoor:Win32/Wingbird.A!dha. Retrieved November 27, 2017.
- Microsoft. (2014, March 12). Configuring Additional LSA Protection. Retrieved November 27, 2017.
- Lich, B., Tobin, J., Hall, J. (2017, April 5). Manage Windows Defender Credential Guard. Retrieved November 27, 2017.
- Lich, B., Tobin, J. (2017, April 5). How Windows Defender Credential Guard works. Retrieved November 27, 2017.
- Microsoft. (n.d.). Dynamic-Link Library Security. Retrieved November 27, 2017.
- Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.