Kuboid
Open Luck·Kuboid.in

Abusing Windows Hello Without a Severed Hand

DEFCONConference23,023 views41:58over 1 year ago

This talk demonstrates techniques for bypassing Windows Hello authentication by extracting and manipulating cryptographic keys stored in the Windows Key Storage Provider. The researchers show how to perform unauthorized authentication by leveraging the Windows Hello for Business (WHfB) protocol and manipulating Primary Refresh Tokens (PRTs). The presentation highlights how these attacks can be executed from an unprivileged user session and provides a new tool, Shwmae, to automate the process. The talk concludes with mitigation strategies, including the use of Windows Hello Enhanced Sign-in Security (ESS) and hardware-backed security.

Bypassing Windows Hello Authentication via Key Storage Provider Manipulation

TLDR: Researchers at DEF CON 2024 demonstrated how to bypass Windows Hello authentication by extracting cryptographic keys from the Windows Key Storage Provider (KSP). By manipulating Primary Refresh Tokens (PRTs) and leveraging the Windows Hello for Business protocol, an attacker can perform unauthorized authentication from an unprivileged user session. This research highlights critical risks in how Windows handles biometric and PIN-based credential storage, necessitating a shift toward hardware-backed security like Windows Hello Enhanced Sign-in Security.

Windows Hello is often treated as a "black box" by security teams, assumed to be inherently secure because it relies on biometric data or a local PIN. The reality, as demonstrated in recent research, is that the underlying cryptographic implementation is susceptible to manipulation if an attacker gains access to an unprivileged user session. This is not a theoretical flaw; it is a direct consequence of how Windows manages key material within the Key Storage Provider (KSP).

The Mechanics of the Bypass

At the core of this research is the realization that Windows Hello does not actually store biometric data in a way that prevents key extraction. Instead, it uses the KSP to manage key pairs for encryption and signing. When a user enrolls in Windows Hello, the system generates these keys and protects them using "protectors"—essentially the PIN or biometric data.

The vulnerability lies in the fact that these protectors are not as robust as they appear. The researchers found that the KSP, specifically the Passport Key Storage Provider, acts as a proxy for other KSP implementations. When a system is not using hardware-backed security, these keys are stored in software, making them accessible to anyone with sufficient access to the local file system.

The tool released alongside this research, Shwmae, automates the enumeration and extraction of these keys. Once an attacker has the key material, they can effectively bypass the need for the original biometric or PIN. The attack flow involves:

  1. Enumerating the Windows Hello containers and protectors.
  2. Extracting the key material from the local data files.
  3. Using the extracted keys to sign authentication requests, effectively impersonating the user.

Exploiting the Primary Refresh Token

The most significant impact of this research is the ability to manipulate Primary Refresh Tokens (PRTs) in an Entra ID environment. A PRT is a key artifact in the authentication process, acting as a single sign-on token for cloud-connected resources.

Previously, researchers like Dirk-jan Mollema identified ways to abuse these tokens, leading to CVE-2021-33781. The new research shows that even with subsequent patches, the fundamental issue remains: if you can control the signing process, you can control the token. By hijacking the navigator.credentials.get function in a browser, an attacker can proxy authentication requests to a compromised host, increment the sign count, and return a valid assertion.

This technique effectively bypasses OWASP A07:2021 – Identification and Authentication Failures, as the attacker is not providing the correct credentials but is instead manipulating the authentication flow to produce a valid, signed response.

Real-World Engagement Impact

For a pentester, this is a game-changer. During an engagement, if you land on a workstation where a user has an active session, you no longer need to rely on dumping LSASS or waiting for a user to type their password. You can target the Windows Hello KSP directly.

The impact is severe. Because the PRT is tied to the user's identity, an attacker who successfully extracts these keys can access any cloud resource the user is authorized to use. This includes email, internal documentation, and even administrative portals if the user has elevated privileges. The attack is particularly dangerous because it leaves very few traces in traditional logs, as the authentication appears to come from a legitimate, albeit compromised, device.

Defensive Strategies

Defending against this requires moving beyond standard workstation hardening. The most effective mitigation is the implementation of Windows Hello Enhanced Sign-in Security (ESS). ESS moves the authentication process into a secure, isolated environment, preventing the extraction of key material even if the primary operating system is compromised.

Additionally, organizations should:

  • Enforce device compliance policies that require hardware-backed security (TPM 2.0).
  • Restrict device registration to prevent the addition of rogue devices to the tenant.
  • Monitor for unusual access to the local AppData directory where KSP metadata is stored.
  • Avoid allowing RDP access to sensitive accounts from untrusted or non-compliant hosts.

The era of trusting local biometric authentication as an absolute barrier is over. As researchers continue to peel back the layers of Windows credential management, the focus must shift toward hardware-enforced isolation. If your environment still relies on software-based KSP storage for sensitive accounts, you are effectively leaving the keys to your cloud infrastructure on the desk. Investigate your current device compliance posture today, or assume that any workstation with an active session is a potential entry point for a full tenant compromise.

Talk Type
research presentation
Difficulty
advanced
Category
red team
Has Demo Has Code Tool Released


DEF CON 32

260 talks · 2024
Browse conference →
Premium Security Audit

We break your app before they do.

Professional penetration testing and vulnerability assessments by the Kuboid Secure Layer team. Securing your infrastructure at every layer.

Get in Touch
Official Security Partner
kuboid.in