Skip to main content

Credential Guard

Windows Defender Credential Guard 是一种虚拟化安全技术以防止 NTLM 哈希、Kerberos 票据、应用程序所存储的凭证的盗窃。开启了 Credential Guard 的主机,会分别有 Lsass.exe 进程以及 LsaIso.exe 进程。

image.png

操作系统中的 Lsa 进程会和被隔离的 Lsa 进程,即 LsaIso 进行通信,而 LsaIso 储存着实际的凭证,LsaIso 被虚拟化技术所保护,操作系统的其他部分无法对其进行访问。

在 2020 年,有个很有意思的绕过技巧。 WDigest 模块,即 wdigest.dll,具有 2 个全局变量分别是 g_IsCredGuardEnabled 和 g_fParameter_UseLogonCredential。这 2 个变量的名字就很直观,Credential Guard 是否启用,以及明文凭证是否应该存储在内存之中。通过将这两个变量的值进行修改,我们可以让 WDigest 误以为 Credential Guard 未被启用,并且保存明文密码于内存之中。因此,在补丁 WDigest 之后的认证都会在内存中留下明文凭证。所以,我们需要做的是找到这 2 个变量的位置。我们可以在 https://gist.github.com/N4kedTurtle/8238f64d18932c7184faa2d0af2f1240 找到一个 PoC,但是偏移是硬编码的。至于如何动态地找到变量偏移,属于更加高深的内容范围,不在此展开。

 image.png

 

 

Ref

https://itm4n.github.io/credential-guard-bypass/ 

https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/credential-guard-how-it-works 

https://techcommunity.microsoft.com/t5/windows-it-pro-blog/comprehensive-protection-for-your-credentials-with-credential/ba-p/765314 

https://teamhydra.blog/2020/08/25/bypassing-credential-guard/ 

https://github.com/outflanknl/WdToggle