Device Code Phishing Forensics and BEC Prevention
Score: 9/10

Device Code Phishing Forensics and BEC Prevention

EvilTokens and other phishing frameworks are increasingly abusing the Microsoft Device Code Flow to bypass MFA and conduct Business Email Compromise (BEC) at scale.

Executive Summary

A significant rise in Business Email Compromise (BEC) attacks leveraging Microsoft's device code login flow has been observed, with some frameworks like EvilTokens using advanced techniques to evade detection. Unlike traditional Attacker-in-the-Middle (AitM) attacks, device code phishing utilizes legitimate Microsoft authentication endpoints, making it difficult for users to distinguish from valid sign-in requests.

Technically, these attacks trick victims into entering a short alphanumeric code on official Microsoft pages. This grants the attacker a refresh token, which can often be upgraded to a Primary Refresh Token (PRT) or used across the Microsoft 365 ecosystem. Advanced kits like EvilTokens utilize AES-GCM encrypted payloads to bypass static signature-based detection in browsers.

This trend represents a critical risk to organizations as it effectively bypasses traditional MFA. Defenders must implement a layered approach, including Conditional Access policies to block device code flows for non-essential users and utilizing linkable token identifiers for forensic investigation of shared session IDs.

Key Details

Threat Name

Microsoft Device Code Phishing

Affects

—

Adversary

EvilTokens

Malware/Tools

EvilTokens, DragonForce ransomware

Report Score

9out of 10
Quality Score
Excellent
IOC Quality4
TTP Details9
Detection Guidance10
Enterprise Relevance10
Clarity & Structure9
Technical Depth8

Sources