Blog › Device code phishing via a fake Teams booking: how the trick works
Device code phishing via a fake Teams booking: how the trick works
Published
Attackers used a fake Microsoft Teams scheduler to get an employee to approve a device code sign-in. Here is how the trick works and what to do about it.
Attackers used a fake Microsoft Teams scheduler to get an employee at a construction company to approve a sign-in code. That gave them a valid session token, the digital proof that someone is logged in. The security operations centre (SOC) at Huntress only identified the incident after this had happened. Huntress described the attack, and Help Net Security reported on it.
The trick is called device code phishing. The attacker abuses a genuine Microsoft sign-in process. The victim types a code into Microsoft's real login page and, without knowing it, gives the attacker access to their own account. Because the page is real, it is hard to spot.
What happened
An employee at a construction company received an email. The sender used a domain name that closely resembled a real one, known as a typosquat. The message impersonated a senior vice president at another construction firm. According to the article, that person really exists.
The link in the email pointed to a Google share link, which redirected to the lure page. The attacker's own domain therefore never appeared in the email itself. That is how the message got past checks that judge web addresses on their reputation.
The lure page looked like a Teams scheduler. It showed the executive's headshot and offered an introductory call about a long-term supply partnership. Clicking "Continue" started a Microsoft device code request on the attacker's backend. The next page showed the resulting code as a "Booking Reference", with a countdown timer to rush the victim.
The report names neither the victim company nor any amounts. It does say that the attacker made the final login through a residential proxy in New Orleans. That is a relay running through an ordinary home internet connection, so the traffic looked like it came from a private individual.
How the trick works
A device code login is meant for devices without a keyboard or a convenient screen, such as a smart TV. The device shows a short code. You type that code on another device, on Microsoft's login page, and so approve the sign-in. The attacker turns this principle around.
This is how it went, step by step:
- The employee opens the link and sees a credible booking page from a known contact in the same industry.
- At "Continue", the attacker's server requests a device code from Microsoft.
- The page shows that code as a booking reference. It looks like an ordinary confirmation number.
- Clicking "Copy" or the confirm button puts the code on the clipboard and opens a popup to Microsoft's real login page.
- The employee pastes the code and completes the MFA step if asked. MFA is the second check, for example a prompt on your phone.
- Microsoft gives the attacker's session access to the account. After all, it has been approved.
- The page closes the popup, shows "Verification complete" and sends the employee on to a Calendly booking page. Nothing seems to have gone wrong.
People fall for this because almost everything checks out. The login page is real. The address in the address bar belongs to Microsoft. The MFA prompt really does come from Microsoft. The only thing that is wrong is where the code comes from. It belongs to the attacker, not to a booking. The countdown timer adds to the effect, because people in a hurry ask fewer questions.
Built to beat scanners and error messages
The phishing kit arrived as encrypted text (AES-256-GCM), with the decryption key sitting next to it in the same page. A human's browser runs the code and decrypts the page straight away. Email scanners and crawlers that don't run JavaScript see only an unreadable blob. That is how the kit gets past automated checks.
It also had a fallback. If Microsoft returned an error, which can happen when MFA is required, the page told the victim that a new verification code was being prepared. The kit then started a fresh device code session and tried again. One failed attempt is therefore not the end of the attack.
What it means for businesses
For a small or mid-sized business this is nasty, because the attacker does not have to break in. The victim opens the door themselves, through a genuine Microsoft page. Changing the password afterwards does not always help straight away, because the attacker already holds tokens.
This is what can go wrong when someone gets into a Microsoft 365 account:
- The attacker reads mailboxes and documents, including quotes, contracts and conversations with suppliers.
- Email can be sent from your employee's account. Customers and partners trust that message, so the damage can reach them too.
- The attacker can create mailbox rules that hide or forward messages.
- Extra MFA methods, unknown devices or apps with granted consent can be linked to the account, so the access stays in place.
- Your IT partner or internal team spends days on investigation, recovery and explaining things to those involved. Work stands still in the meantime.
- Customers and suppliers may lose trust in you if they receive phishing from your domain.
The fact that the sender appeared to be someone from the same industry makes it more dangerous. A proposal for a supply partnership fits the work of a buyer or a director. Nobody expects an attack behind it.
How to recognise it
These are the signs in this case, plus general signals of device code phishing:
- An unexpected invitation to an introductory call from someone you don't know personally or didn't expect to hear from.
- A sender address with a domain name that is almost, but not quite, right. Check it letter by letter.
- A link that runs through an intermediate step, such as a Google share link, instead of going straight to a booking page.
- A page that tells you to copy a "booking reference" or "verification code" and enter it somewhere.
- A countdown timer that pushes you to act quickly.
- A Microsoft login page that opens because you clicked something, when you did not intend to sign in.
- A page that says a new code is being prepared after a sign-in has failed.
Administrators can also look for traces in the logs:
- Unknown devices or sign-in attempts you don't recognise.
- Programmatic user agents such as python-requests or node in interactive sign-in logs. According to Huntress, this points to automated attacker infrastructure.
- Sign-in traffic from a location that doesn't fit the employee.
What you can do about it
For employees
- Only enter a code from a web page if you started a sign-in yourself, for example on a TV or printer. A booking page should never ask you about codes.
- Check the sender address letter by letter before you click a link.
- If an invitation is unexpected, phone the sender on a number you already had or that is in your own contacts. Do not use the number from the email.
- If you have clicked a link and entered a code, report it to your IT administrator or IT partner straight away, even if it may turn out to be nothing. Time matters.
For the organisation
1. Treat unexpected device code prompts as suspicious, as Huntress advises. 2. If your business does not need device code authentication, restrict or monitor it with conditional access. These are the rules in Microsoft Entra that decide who may sign in, and under which conditions. 3. Use phishing-resistant MFA, such as security keys or passkeys. Huntress recommends this. 4. Look closely at sign-in alerts from unfamiliar devices. 5. Search the sign-in logs for user agents such as python-requests or node in interactive logins. 6. After a confirmed compromise, check the following: - unknown MFA methods - unknown registered devices - apps with consent that nobody approved - suspicious mailbox rules - suspicious outbound email 7. Make sure employees know who to report a suspicion to, and that reporting is always welcome.
How Lumyo Awareness helps
In a phishing simulation from Lumyo Awareness, we imitate attacks like this one, so your employees meet the trick for the first time in a safe environment. In the awareness training they then learn what to look out for and what to do when in doubt. IT service providers and MSPs can resell Lumyo as a partner or manage it for their clients.