Netwrix 1Secure 提供跨数据和身份的统一可见性——免费试用14天,享有完全访问权限。开始免费试用

资源中心博客

我如何通过 ESC1 经由 SafeNet Agent for Windows Logon 获得 Domain Admin

我如何通过 ESC1 经由 SafeNet Agent for Windows Logon 获得 Domain Admin

Feb 2, 2026

Netwrix 发现 SafeNet Agent for Windows Logon 4.0.0–4.1.2 版本默认会创建不安全的 AD CS 证书模板,从而启用 ESC1 路径,使任何经过身份验证的用户都可以升级到 Domain Admin。Thales 在 4.1.3 版本中通过将证书注册限制为 NDES 服务帐户来修复该问题。

描述

Netwrix Security Research 最近报告了一项与 Thales’ SafeNet Agent for Windows Logon 版本 4.0.04.1.14.1.2 相关的安全风险。按设计,该代理依赖于 Active Directory Certificate Services (AD CS) 中的证书模板,而该模板的配置会创建一条 ESC1 路径。这使得已验证用户能够升级到 Domain Admin,即使该模板本意是用于支持无密码 Windows 登录功能。

SafeNet Agent for Windows Logon 是安装在 Windows 计算机上的轻量级组件,用于通过多因素身份验证(MFA)来增强登录安全性。它有助于确保仅由授权用户访问敏感资源,并保护依赖 CredUI 的桌面应用程序和进程。通过这样做,它旨在为终端用户提供安全且一致的登录体验。基于 SafeNet Agent for Windows Logon 构建的 Passwordless Windows Logon 可在访问计算机和其他资源时消除对密码的需求。Passwordless Windows Logon 使用基于 X.509(PKI)证书的 MFA,并被设计为组织开始向无密码身份验证转型的切入点。它有助于减少因密码重置而产生的帮助台呼叫,为员工提供更顺畅的登录体验以支持工作效率,并为更广泛采用无密码和现代身份验证做好环境准备。

下面是 Passwordless Windows Logon 解决方案的高层架构图,以及其各组件如何协同工作的说明。

Image
Figure 1. High-level diagram of Passwordless Windows Logon between the user device, STA, the SCEP server, and ADCS.

如前所述,安装需要 AD CS 以及创建证书模板来启用无密码登录。Thales 还在官方文档中提供了一个 ZIP 文件,其中包含两个 PowerShell 脚本,用于自动化这些任务。

Image
Figure 2. Official setup steps for Passwordless Windows Logon.

当我们解压安装包附带的 ZIP 文件时,会发现一个名为 CertTemplate.json 的有趣 JSON 文件。它用于自动化并填充证书模板。最先引起注意的是一组允许身份验证的扩展密钥用法(Extended Key Usages),并且与 msPKI-Certificate-Name-Flag 被设置为 1 相结合,这会启用 ENROLLEE_SUPPLIES_SUBJECT 标志。如果你熟悉 AD CS 的滥用,这种配置强烈表明存在类似 ESC1 的问题。

Image
Figure 3. CertTemplate.json showing the WLAPwdlessLogon certificate template, including its display name, authentication EKU OIDs, and msPKI-Certificate-Name-Flag set to 1 (ENROLLEE_SUPPLIES_SUBJECT).

该脚本会先安装所需的 Active Directory 和 AD CS PowerShell 工具,然后创建一个名为 WLAPwdlessLogon 的新的 AD CS 证书模板,并使用来自 CertTemplate.json 的设置进行配置后发布。之后,它会授予模板对 Authenticated Users 组的 Enroll(注册)权限,并重启 Certificate Services 服务。

Image
Figure 4. The CreateCertTemplate.ps1 script uses grant_enroll_permission to assign Enroll rights on the WLAPwdlessLogon certificate template to Authenticated Users. Figure 4. The CreateCertTemplate.ps1 script uses grant_enroll_permission to assign Enroll rights on the WLAPwdlessLogon certificate template to Authenticated Users.

在我们的实验室中运行 PowerShell 脚本可以证实:模板已创建,并且已向 Authenticated Users 授予 Enroll(注册)权限。

Image
Figure 5. Output from CreateCertTemplate.ps1 showing the WLAPwdlessLogon template created and Enroll permission granted to Authenticated Users. Figure 5. Output from CreateCertTemplate.ps1 showing the WLAPwdlessLogon template created and Enroll permission granted to Authenticated Users.

发布证书模板之后,我们通过运行 Certify.exe 列出不安全的模板,来检查它是否确实存在漏洞。输出结果表明满足全部 ESC1 条件,这意味着该模板允许任何已认证的用户提升到 Domain Admin。

Image
Figure 6. Certify output showing the WLAPwdlessLogon template with ENROLLEE_SUPPLIES_SUBJECT set, client/smart card logon EKUs, and Enroll rights granted to Authenticated Users. Figure 6. Certify output showing the WLAPwdlessLogon template with ENROLLEE_SUPPLIES_SUBJECT set, client/smart card logon EKUs, and Enroll rights granted to Authenticated Users.

现在,我们可以为任意用户或计算机账户请求证书,并使用 ESC1 来冒充该身份(包括 Domain Admin)。在这个示例中,我们将使用 MSOL_1191fa1e45e4 账户,因为它具有 DCSync 权限。

Image
Figure 7. Using Certipy to request a certificate for the MSOL_1191fa1e45e4 account via the vulnerable WLAPwdlessLogon template.

在此时,我们可以为该身份请求一张 Kerberos TGT,并使用它以该账号实现横向移动。

Image
Figure 8. Rubeus using the MSOL certificate to request a Kerberos TGT via PKINIT, successfully returning a ticket for the MSOL_1191fa1e45e4 account.

披露时间线

  • 我们于 2025年11月24日 向 Thales PSIRT 报告了这一安全问题,并附上了概念验证(PoC)。该 PoC 表明产品在设计上存在漏洞,并允许经过身份验证的用户使用 ESC1 以到达 Domain Admin。Thales 当天就确认了该报告,并将其升级至负责解决该问题的团队。
  • 2025年11月28日 ,我们联系 Thales,要求就此案提供最新进展,因为我们认为这代表着重大的设计缺陷。
  • 2025年12月4日 ,Thales 回复称他们仍在等待工程团队的反馈。
  • 2025年12月10日 ,Netwrix Security Research 跟进以请求更新。
  • 2025年12月12日 ,Thales 确认其工程团队已识别该问题,并正在同时制定补救措施和安全通告,以便向客户提供建议。
  • 2026年1月5日 ,Netwrix Security Research 再次跟进,询问有关 Thales 安全通告的最新进展;该通告涵盖了针对该问题的缓解措施。
  • 2026年1月12日 ,Thales 作出回应,并确认他们已发布安全通告,同时发布了可缓解该问题的更新产品版本。

缓解

在撰写本文时,Thales 已保留 CVE-2026-0872 并发布了安全公告,建议客户将 SafeNet Agent for Windows Logon 升级到 4.1.3 以缓解该问题。

Figure 9. Thales Security Bulletin 20230113 (Dec 22, 2025) rates the issue Very High and recommends upgrading SafeNet Agent for Windows Logon to v4.1.3 Figure 9. Thales Security Bulletin 20230113 (Dec 22, 2025) rates the issue Very High and recommends upgrading SafeNet Agent for Windows Logon to v4.1.3

在更新的版本中,AD CS 模板指导也已一并修订。Authenticated Users 不再拥有 Enroll 权限,只有 NDES service account 被允许为此模板进行注册。

Image
Figure 10. Official documentation updated the certificate template configuration to modify security permissions required for Passwordless Windows Logon enrollment. https://thalesdocs.com/sta/agents/wla-windows_logon/wla-preinstallation_passwordless/index.html
Image
Figure 11. Shows CreateCertTemplate.ps1 updated the certificate template to remove Enroll permissions from Authenticated Users and grant Enroll only to the NDES service account.

如果我们重新运行 Certify.exe,我们可以确认 Read/Enroll 权限现在已仅限于 NDES service account,而 Authenticated Users 已不再拥有这些权限。

Image
Figure 12. Certify.exe shows Enroll is now limited to the NDES service account.

结论

该案例展示了一个现实世界中的例子:如果 MFA 产品依赖于不良的 AD CS 设计,即使是成熟的 MFA 功能也仍可能引入显著风险。无密码功能构建在一个证书模板之上:该模板允许任何已认证用户请求包含 client-auth EKU 和 ENROLLEE_SUPPLIES_SUBJECT 的证书,而厂商脚本甚至默认会向 Authenticated Users 授予 Enroll 权限。合在一起,就把本应的安全功能变成了一条现成的通往 Domain Admin 的 ESC1 路径。

参考资料

常见问题(FAQs)

分享到

了解更多

关于作者

Asset Not Found

Huy Kha

安全研究总监

Huy 是 Netwrix 的安全研究总监,带领安全研究团队,并推动整个安全产品组合的改进,帮助客户提升韧性。他还是 Microsoft MVP(Windows & Devices)。凭借事件响应、安全运营和系统优化方面的经验,他专注于实用、可重复的方法,将复杂问题转化为清晰、精简的流程。