FIDO2: Phishing-Resistant, But Not Token-Resistant
The article on Silverfort’s blog explores how MITM attacks can bypass FIDO2's phishing-resistant protections. It details the FIDO2 authentication flow, highlights vulnerabilities in session token handling, and provides real-world examples involving Entra ID SSO, PingFederate, and Yubico Playground, concluding with mitigation strategies to enhance security.
FIDO2 Background
📌FIDO2 is a modern passwordless authentication standard developed by the FIDO Alliance to replace passwords
📌It aims to protect against phishing, man-in-the-middle (MITM), and session hijacking attacks
📌The authentication flow involves device registration and authentication steps using public key cryptography
FIDO2 Security Features
📌FIDO2 is designed to prevent phishing, MITM, and session hijacking attacks
📌However, the research found that FIDO2 implementations often do not protect session tokens after successful authentication
Attacking FIDO2 with MITM
📌The author investigated MITM attacks on identity providers (IdPs) that relay communications between devices
📌While MITM is more difficult with TLS, methods like DNS spoofing, ARP poisoning, and certificate theft can achieve it
📌By performing MITM on the IdP, the attacker can hijack the session token after FIDO2 authentication
Entra ID SSO (Microsoft)
📌Overview: Entra ID SSO is a single sign-on solution that supports various SSO protocols and modern authentication methods, including FIDO2.
📌Vulnerability: The research demonstrated that an attacker could hijack sessions by exploiting the way Entra ID handles session tokens.
📌Attack Method: The attacker does not need to relay the entire authentication process. Instead, they can use a signed token provided by the IdP, which has an expiration time of one hour. This token can be reused within the valid time frame to generate state cookies for a longer period.
📌Example: The native Azure Management portal application does not validate the token granted by the SSO, allowing an attacker to use a stolen token to gain unauthorized access.
PingFederate
📌Overview: PingFederate is an SSO solution that uses third-party adapters to perform authentication. These adapters can be chained into an authentication policy flow.
📌Vulnerability: The research found that if the relying party developer does not validate the OIDC token (or SAML Response), the MITM attack can be successful.
📌Attack Method: The attack exploits the weakest link in the authentication chain. Since the SSO protocols rely on granting tokens that can be reused by different devices, an attacker can hijack the session by stealing these tokens.
📌Example: The PingOne adapter can be used with FIDO2 capabilities. If the OIDC token is not validated, an attacker can bypass FIDO2 protections and gain unauthorized access.
Yubico Playground
📌Overview: Yubico Playground is a testing environment for FIDO security features and keys.
📌Vulnerability: The research showed that a simple session cookie generated after FIDO2 authentication can be exploited.
📌Attack Method: There is no validation on the device that requested the session cookie. Any device can use this cookie until it expires, allowing an attacker to bypass the authentication step.
📌Example: By acquiring the session cookie, an attacker can access the user’s private area and remove the security key from the user’s profile, demonstrating a straightforward session hijacking scenario