Researchers Find Way to Bypass Phishing-Resistant MFA in Microsoft Entra ID

Cybersecurity researchers have uncovered a sophisticated technique to bypass Microsoft’s phishing-resistant multi-factor authentication (MFA) by exploiting the device code authentication flow and Primary Refresh Tokens (PRTs).

This method allows attackers to register Windows Hello for Business keys, effectively creating a persistent backdoor even in environments with strict MFA policies.

The technique was initially developed for an internal “EntraIDiots” Capture The Flag (CTF) competition, where participants had to overcome a challenge that only permitted access using phishing-resistant MFA.

Researchers found they could force MFA during authentication by manipulating request parameters, regardless of existing security policies.

“After a quick test our assumption was correct!” the researchers noted, referring to their discovery that the “amr_values=ngcmfa” parameter could force users to perform MFA during authentication flows.

How the Attack Works

The attack leverages device code phishing combined with an adversary-in-the-middle (AiTM) approach. It begins when a victim visits a malicious page that retrieves Microsoft’s login interface using a specially crafted URL containing specific parameters:

  • The Authentication Broker client ID (29d9ed98-a469-4536-ade2-f981bc1d605e)
  • A resource URL pointing to Microsoft’s enrollment service
  • The critical “amr_values=ngcmfa” parameter that forces MFA
  • A specific redirect URI (ms-appx-web://Microsoft.AAD.BrokerPlugin)

When users complete authentication (including MFA), attackers obtain authorization codes that can be exchanged for access and refresh tokens. With these tokens, attackers can:

  1. Register a new device in Entra ID
  2. Request a Primary Refresh Token for that device
  3. Enrich the PRT with the ngcmfa claim
  4. Register a Windows Hello For Business key
  5. Acquire a new PRT using the registered device and WHFB key

Stealth Implications

This attack is particularly concerning because it’s difficult to detect. “From a user perspective it’s quite difficult to detect that a new WHFB key was added,” the researchers explained. The compromised authentication method doesn’t appear in the user’s account page that lists other authentication methods.

Detecting these malicious keys is challenging even for administrators. Microsoft’s design prevents administrators from viewing their own authentication methods in Entra ID, requiring another admin to check for suspicious activity.

The researchers outlined several prevention strategies:

  • Enforcing phishing-resistant MFA for all users
  • Implementing AiTM mitigation to warn users and alert administrators
  • Disallowing device registration in Entra ID
  • Enforcing device compliance policies
  • Blocking or limiting the device code flow

However, detection remains problematic. Due to limitations in Entra ID’s audit logging capabilities, the research team encountered difficulties correlating interactive sign-ins with device creation or WHFB key registration.

This technique builds upon previous work by security researcher Dirk-jan Mollema, who demonstrated similar PRT phishing attacks in 2023. The current advancement focuses on reliably forcing MFA during authentication, making it possible to execute the full attack chain against environments with stringent security policies.

As organizations increasingly rely on passwordless authentication methods like Windows Hello, this research highlights the importance of a defense-in-depth approach rather than depending solely on phishing-resistant MFA.

Are you from the SOC and DFIR Teams? – Analyse Malware Incidents & get live Access with ANY.RUN -> Start Now for Free.

Guru Baran

Gurubaran KS is a cybersecurity analyst, and Journalist with a strong focus on emerging threats and digital defense strategies. He is the Co-Founder and Editor-in-Chief of Cyber Security News, where he leads editorial coverage on global cybersecurity developments.

Recent Posts

Google Chrome 153 Update Fixes 42 Security Flaws, Including 3 Critical Ones

Google has released an important Chrome 153 security update that fixes 42 vulnerabilities across the…

4 hours ago

CISA and NIST Release Technical Checklist for Safeguarding Identity Tokens From Theft and Misuse

The Cybersecurity and Infrastructure Security Agency (CISA) and the National Institute of Standards and Technology…

14 hours ago

CISA Shares 17 Techniques Used by Hackers to Compromise Active Directory Environments

CISA and five international cybersecurity agencies have released detailed guidance describing 17 common techniques hackers…

15 hours ago

Apple Rolls Out Massive Security Update Fixing 273 Vulnerabilities Across Its Devices

Apple has released one of its largest coordinated security rollouts, addressing 273 distinct critical vulnerabilities…

15 hours ago

How to Keep Malware’s Rotating Infrastructure From Becoming a Detection Gap

You can’t detect today's attacks with yesterday’s threat intelligence; that’s how you could briefly formulate…

16 hours ago

Microsoft Bans Its AI Models From Launching Cyberattacks or Escalating Their Own Access

Microsoft has published a draft Humanist AI Code of Conduct that would prohibit its in-house…

16 hours ago