PPLhost Uses Vulnerable Service DLLs and Custom Service Routines to Bypass Windows PPL

Summary
Unit 42 describes PPLhost, a proof of concept that uses vulnerable service DLLs and custom service routines to bypass Windows PPL, enabling EDR tampering and LSASS memory dumping. The techniques require administrator rights.
Key points
- Unit 42 developed PPLhost to demonstrate two Windows PPL bypass techniques; the research was shared with Microsoft, which said they do not cross a security servicing boundary because they require administrator rights.
- BYOVSDLL downgrades a service to a vulnerable DLL and changes service settings to run code as PPL; the researchers used the Windows Telephony Server service.
- The first technique was demonstrated dumping LSASS memory and terminating protected EDR processes.
- The Custom Service Routine technique uses an older svchost.exe binary to bypass a mitigation and invoke a selected function through a custom service entry point.
- The researchers used a function in werui.dll to perform a process memory dump and said suitable functions might also enable arbitrary shellcode execution.
- Defenders are advised to enable Credential Guard and monitor changes to critical service settings, svchost.exe launched from suspicious paths, and handles to sensitive processes.
Article Details
- Attack Vectors
- BYOVSDLL: With administrative access, downgrade a service DLL to a vulnerable version, modify service registry settings, and exploit the service to execute shellcode as PPL.
- Custom Service Routine: Use an older signed svchost.exe that predates a mitigation, then configure a PPL service to call a custom ServiceMain function in a suitable signed DLL.
- The researchers used these techniques to dump LSASS memory and terminate protected EDR processes.
- Defensive Notes
- Enable Credential Guard to help prevent credential theft from LSASS by storing NTLM hashes and Kerberos TGTs in LSAISO rather than LSASS.
- Monitor changes to ServiceDll and other critical service settings, and watch for svchost.exe starting from a suspicious path.
- Monitor creation of handles to sensitive processes and deploy detections for tools and techniques targeting PPL processes.
- Reduce standing administrative privileges and restrict risky application execution and access to other processes' memory.
MITRE ATT&CK
T1003.001 · LSASS MemoryPPLhost was used to dump LSASS memory.T1068 · Exploitation for Privilege EscalationThe BYOVSDLL proof of concept exploits a use-after-free in tapisrv.dll to execute shellcode as PPL; the researchers also changed the service account configuration to run it as SYSTEM.T1112 · Modify RegistryThe demonstrated techniques modify registry values for service configuration, including the custom ServiceMain setting.T1543.003 · Windows ServicePPLhost changes Windows service configuration, including ServiceDll, ObjectName, RequiredPrivileges, and LaunchProtected, and restarts the service.T1562.001 · Disable or Modify ToolsThe BYOVSDLL technique was used to terminate protected EDR processes and tamper with endpoint defenses.
People
Vendors
MicrosoftWe shared our findings with Microsoft, who noted that because the techniques require admin rights, they do not cross a security servicing boundary.Palo Alto NetworksPalo Alto Networks customers are better protected from the threats discussed above through the following products and services:
Products
Cortex XDRCortex XDR and XSIAMCredential GuardDefenders can improve protection of their environments by enabling Credential Guard to help prevent credential theft from LSASS, and by deploying detections for tools and techniques that target PPL processes.Idira Endpoint Privilege Manager (EPM)Idira Endpoint Privilege Manager (EPM) is designed to enable enterprises to reduce risk, satisfy compliance and streamline operations.Microsoft WindowsWe analyzed a Windows security mechanism called Protected Process Light (PPL), to assess its effectiveness.XSIAMCortex XDR and XSIAM
Tools
EDR-RedirWhen the goal is to tamper with EDR agents, attackers often turn to EDR silencing tools and techniques such as EDR-Redir and EDRChoker.EDRChokerWhen the goal is to tamper with EDR agents, attackers often turn to EDR silencing tools and techniques such as EDR-Redir and EDRChoker.MimikatzThey would target LSASS — the core service managing user logins and active authentication tokens (like NTLM hashes and Kerberos tickets) — using tools like Mimikatz to read its memory.PPLFaultMicrosoft provides patches for user-mode logic exploits like PPLFault, which uses memory page faults and race conditions to trick the operating system (OS) into executing malicious code.PPLhostWe developed a fully functional proof of concept (PoC) to bypass PPL protections that we call PPLhost.
