Skip to main content

Published on 1 December 2026

Week 48: Device code phishing: When familiar senders become a trap

Last week, the NCSC noted several cases involving device code phishing. In this scam, cybercriminals exploit Microsoft’s legitimate login feature to access accounts. The hacked accounts are then used to send further phishing messages directly to the contacts stored in them, which is particularly dangerous. As these messages appear to come from people the recipients know, they seem credible, so the recipients are unlikely to suspect anything. Consequently, such attacks can spread rapidly within organisations and across entire partner networks.

Cybercriminals are always looking for new ways to bypass security measures such as multi-factor authentication (MFA). One method that the NCSC is currently seeing more frequently is ‘device code phishing’. What makes this scam stand out is that there is no need to use a fake Microsoft login. Instead, the attackers exploit a genuine Microsoft sign-in process to gain access to users’ accounts.

Authentication using a device code is a simplified process that allows devices with limited keyboards or browsers – for example printers or other specialised devices – to access a specific account. The actual authentication process takes place on the standard office device. The user is granted access to the account by entering the code displayed during the device’s registration process. The code is valid for 15 minutes by default.

Recently, a company employee received an email that appeared to be a genuine message from an external business contact. The email contained a request to download a PDF file containing important information via a link.

However, the link did not lead to a document, but to a website controlled by the attackers. The website displayed a code that the victim was asked to enter on an official Microsoft page that had been misused by the attackers for their own purposes. The code had been generated by the attackers as part of a device registration process that they had initiated.

By entering this code, the victim confirms the login and authorises the attacker’s device without realising it. This gives the attackers an access token that allows them direct access to the victim’s Microsoft account and therefore any services linked to the account, such as the victim’s email, calendar or files, without knowing the account password.

This method is particularly dangerous if the victim is already logged in to Microsoft because they don’t need to enter their username and password. All they need to do is to enter the code displayed and confirm access. As the login takes place on a genuine Microsoft website and no further password prompt appears, the process often seems harmless and not particularly suspicious.

Once the attackers have taken over the account, they forward the same phishing message directly from the compromised account. In this case, the message was sent to over a thousand contacts. This method, known as chain phishing, is highly effective. Much like a snowball effect, the number of potential victims grows with every compromised account. Even if only a small proportion of recipients respond to the message, the scam can spread rapidly.

Therefore, it is crucial for individuals and businesses that have fallen victim to the scam to alert all potential recipients immediately upon detecting that accounts have been compromised. Alerting contacts promptly can prevent others from falling for the fraudulent messages and stop the phishing chain.

Recommendations for users

  • Never enter device codes unless you have started the login process yourself.
  • Always examine authentication requests carefully, even if they come from contacts you recognise.
  • Verify any unusual requests via an alternative communication channel, such as by telephone.
  • Be particularly wary of emails or chat messages that ask you to open documents or enter authentication codes.
  • Make staff aware that even legitimate Microsoft websites can be misused for fraudulent purposes.
  • If your account is compromised, act quickly by ending active sessions, revoking access tokens and resetting passwords.
  • Following a security breach, notify as many recipients of suspicious messages as possible to stop them from spreading further.

Recommendations for administrators

  • Disable the device code flow for your organisation if you do not require this functionality. This will help you minimise your points of entry for an attack.
  • If you do require the device code flow, restrict its use to specific IP address ranges or regions.
  • Check the logs regularly for any suspicious logins.

Current statistics

Last week's reports by category:

Current figures