Skip to content
Access control Write-up Advanced

Ghost In The Ppl Part 1: Byovdll

The report describes how to bypass LSA Protection by loading vulnerable versions of Microsoft-signed DLLs (keyiso.dll and ncryptprov.dll) into the protected LSASS process using the 'Bring Your Own Vulnerable DLL' technique. This allows an attacker to reintroduce known vulnerabilities (CVE-2023-28229 and CVE-2023-36906) and achieve arbitrary code execution within LSASS, as demonstrated by executing a debug message.

Clément Labro Follow

Published on blog.scrt.ch

In this series of blog posts, I will explore yet another avenue for bypassing LSA Protection in Userland. I will also detail the biggest challenges I faced while developing a proof-of-concept, and discuss some novel techniques and tricks to load an arbitrary DLL in LSASS, or even dump its memory.

Clément Labro (@itm4n), on blog.scrt.ch

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the root cause is that Windows allows administrators to modify service configuration and register custom Key Storage Providers, which can load non-Microsoft-signed DLLs if they are accompanied by a valid catalog file, bypassing the code integrity checks for protected processes.

What the attacker needed

Administrator privileges; Ability to modify registry and services; Vulnerable DLL and catalog file

How it was found

  1. Stop the KeyIso service and change the DLL path in the registry to point to a vulnerable version of keyiso.dll.
  2. Copy the catalog file for the vulnerable DLL to the CatRoot folder to make its signature recognized.
  3. Restart the KeyIso service, which loads the vulnerable DLL into LSASS.
  4. Register a custom Key Storage Provider that points to a vulnerable version of ncryptprov.dll using BCryptRegisterProvider.
  5. Open the custom provider to load the vulnerable ncryptprov.dll into LSASS.
  6. Run the exploit code to trigger the vulnerabilities and execute arbitrary code (e.g., OutputDebugStringW) within LSASS.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report shows how an attacker can bypass a Windows security feature called LSA Protection, which is meant to stop other programs from reading passwords stored in memory. The trick is to make Windows load an old, vulnerable version of a Microsoft file into the protected process, then use a known bug in that file to run code inside it. The attacker needs administrator rights to change some settings, but once done, they can run code in a highly protected area.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Clément Labro

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.