Device code phishing is one of a family of attacks that need no fake login page. The victim signs in on the genuine Microsoft page, completes their own multi-factor authentication (MFA) and, without realising it, hands the attacker a working session. Its relatives work the same way. OAuth consent phishing, ConsentFix, FileFix and the Salesforce "connected app" phone calls behind several of last year's data thefts all get the user to take the risky step on a real page or with their own keyboard.
Because the pages are genuine, domain reputation checks, email link scanning and many endpoint tools have nothing to flag. This guide explains how each attack works, why MFA does not stop it, and which settings and controls do.
What is device code phishing?
The device code flow exists for devices without a proper keyboard, such as a smart TV or a meeting room display. The device shows a short code, and the user types it into a sign-in page on their phone or laptop. Once they sign in, the device receives tokens for their account.
In device code phishing, the attacker starts that flow and sends the code to the victim. Microsoft described a campaign by a group it tracks as Storm-2372, active since August 2024, that built rapport over WhatsApp, Signal and Microsoft Teams, then sent invitations to fake Teams meetings that asked the target to enter a code [1]. The victim typed it on Microsoft's real page, and the attacker received access and refresh tokens that worked for as long as they stayed valid [1]. Targets included government, defence, health, telecoms and energy organisations [1].
What began as a targeted technique has gone mainstream. Proofpoint said that by September 2025 it saw "widespread campaigns" using device code flows, which it called highly unusual [2]. Lures posed as shared documents, salary reports or token re-authorisation notices, and often claimed the code was a one-time password [2]. Proofpoint also tracked a tool that pairs QR codes with device code prompts, so QR code phishing and device code abuse now overlap [2].
How OAuth consent phishing works
OAuth is the standard that lets one app act for you in another, for example a scheduling tool that reads your calendar. In consent phishing, the attacker registers an app with a trusted-looking name and asks the user to approve it. The approval is a permission grant, not a password, so it stays in place until someone finds and removes it.
Proofpoint reported more than 50 impersonated apps in email campaigns, posing as Adobe, DocuSign, SharePoint and RingCentral [3]. The apps asked for minimal permissions. Whether the user clicked Accept or Cancel, they were sent on to a fake Microsoft sign-in page that captured their password and MFA session cookie [3]. By the end of July 2025, Proofpoint had seen attempted takeovers of nearly 3,000 accounts across more than 900 Microsoft 365 environments, with a confirmed success rate above 50% [3].
Microsoft announced in June 2025 that it would require admin consent for third-party app access, with the change rolling out from mid-July [3]. That helps, but only if tenants keep the stricter setting and admins review the apps that were approved before it.
ConsentFix and FileFix: when the victim pastes the attack
ClickFix taught attackers that the user's own keyboard is a delivery channel. A fake error or CAPTCHA page tells the user to copy a command and run it. Microsoft's Digital Defense Report 2025, as reported by The Register, found ClickFix was the most common initial access method seen by Microsoft Defender Experts, at 47 percent of attacks [4]. ESET recorded a 517% rise in ClickFix since the second half of 2024 [5].
FileFix, demonstrated by the researcher mr.d0x in June 2025, moves the trick into File Explorer [6]. A page claims a file has been shared and offers a button that opens File Explorer through the browser's file upload feature. The user is told to paste a "file path" into the address bar, but the clipboard actually holds a PowerShell command with a fake path tacked on the end, so only the path is visible [6].
ConsentFix, disclosed by Push Security in December 2025, applies the same idea to sign-in [7]. Victims reached the page through Google Search, often on compromised websites with a good reputation. A sign-in button opened the genuine Microsoft login for the Azure CLI, a first-party Microsoft tool that is exempt from the consent limits applied to third-party apps [7]. The browser then landed on a localhost address (a web address that points back at the user's own computer) carrying an authorisation code, and the page asked the user to paste that address back in. That gave the attacker access to the account [7]. No password was phished and no MFA prompt appeared, so passkeys made no difference [7].
Salesforce vishing and connected app abuse
The same pattern appears in SaaS platforms, often over the phone. Google's Threat Intelligence Group described UNC6040, a financially motivated group whose callers posed as IT support and talked employees through Salesforce's connected app setup page to approve a modified version of the Data Loader tool [8]. The victim entered a "connection code", which works much like a device code, and the attacker's app was linked to the company's Salesforce data [8]. In every case Google observed, the attackers relied on manipulating people, not on a flaw in Salesforce [8].
In September 2025 the FBI warned that authorising a malicious connected app gets around MFA, password resets and login monitoring, because the tokens are issued by Salesforce itself and the activity can look like a trusted integration [9]. Voice is now a main delivery route for this kind of attack: CrowdStrike recorded a 442% rise in voice phishing between the first and second halves of 2024 [10].
Why MFA and email filters miss these attacks
Every attack above shares three traits. The page is genuine, so there is no look-alike domain to catch. The user completes their own MFA, so the sign-in looks normal. And the harmful step, typing a code, pasting an address or approving an app, is something the user does on purpose.
Like zero-day phishing, these attacks leave little for a blocklist to match. They go one step further, because the sign-in itself happens on a trusted page, so judging that page is not enough. Our guide on how real-time phishing detection works explains how browser-based tools judge pages as they load, which suits cloned login pages and newly registered domains. Device code and consent attacks also need checks based on context: did the user start this device code sign-in, is a localhost address with an authorisation code being pasted into a website, and is an app approval happening while someone is on a call?
How to stop device code phishing and consent attacks
Most of the protection comes from identity settings that many organisations have never reviewed.
- Block the device code flow where you do not need it. Microsoft recommends blocking it wherever possible and restricting it with Conditional Access where it is needed [1]. Proofpoint gives the same advice and suggests allowing it only for approved users, operating systems or IP ranges [2].
- Require admin approval for new apps. Limit user consent to third-party apps in Microsoft Entra and Google Workspace, give staff a request route, and review existing grants for unfamiliar apps.
- Watch first-party developer tools. Sign-ins to the Azure CLI from people who are not administrators or developers deserve a closer look [7].
- Lock down Salesforce connected apps. Restrict who can manage connected apps, allowlist approved ones, set trusted IP ranges and limit the API permission that Data Loader needs [8].
- Revoke sessions, not just passwords. After a suspected compromise, revoke the user's refresh tokens and sign-in sessions [1], and remove any unknown app grants.
- Set a phone rule. Tell staff that IT will never ask them to read out a code, approve an app or paste a link during a call.
What to look for in a browser-layer control: a clear warning on Microsoft and Google device code pages ("only enter a code you started yourself"), or a block where your organisation does not use device codes; a check when a localhost address carrying an authorisation code is pasted into a web page; ClickFix detection that also covers FileFix and macOS Terminal lures; consent checks that extend to Salesforce connected apps and GitHub or Slack app installs; and events sent to your SIEM so the identity team can act on them.
Phishing-resistant MFA is still worth deploying, but these attacks are built to work around it. Closing unused sign-in flows, tightening app consent and adding context-aware checks in the browser leaves attackers far fewer genuine pages to abuse.