Skip to content
Access control Write-up Advanced

Ghost in the PPL Part 3: LSASS Memory Dump

The report describes a technique to dump the memory of a protected LSASS process by coercing it to load a signed DLL (xolehlp.dll) via the WinSock2 Autodial registry setting, then triggering a function that calls MiniDumpWriteDump. An attacker could use this to extract credentials from LSASS memory, though the exploit chain is unreliable due to a use-after-free bug.

blog.scrt.ch

Published on blog.scrt.ch

Following my failed attempt to achieve arbitrary code execution within a protected LSASS process using the BYOVDLL technique and an N-day exploit in the KeyIso service, I took a step back, and reconsidered my life choices opted for a less ambitious solution: a (not so) simple memory dump. After all, when it comes to…

The author, 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 WinSock2 Autodial feature loads a DLL specified in the registry whenever certain network functions are called, and LSASS can be coerced into calling such functions via SSPI, allowing an arbitrary signed DLL to be loaded and then invoked to dump memory.

Impact

An attacker could dump LSASS memory to extract credentials, but the exploit chain is highly unstable and unreliable due to the use-after-free bug, and a caching mechanism may prevent the DLL from loading reliably.

What the attacker needed

Ability to modify registry (AutodialDLL); Ability to start/restart KeyIso service; Ability to register a Key Storage Provider; Vulnerable versions of keyiso.dll and ncryptprov.dll

How it was found

  1. Coerce LSASS to load xolehlp.dll using the WinSock2 Autodial trick and the SSPI.
  2. Import a catalog file containing the digital signatures of the vulnerable DLLs.
  3. (Re)start the KeyIso service using a vulnerable version of keyiso.dll.
  4. Register a Key Storage Provider using a vulnerable version of ncryptprov.dll.
  5. Exploit an information disclosure in ncryptprov.dll to leak the address of a provider object.
  6. Set an opportunistic lock on the file lsass.exe to detect when the memory dump starts.

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.

LSASS is a Windows process that stores passwords and other secrets in memory. This report shows how an attacker could trick LSASS into loading a malicious DLL and then dumping its memory to a file, which could then be used to steal credentials. The technique is complex and not fully reliable, but it demonstrates a way to bypass protections that normally prevent such dumps.

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.

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.