Device code phishing has become a common method for account takeovers. This technique involves attackers persuading victims to approve sign-ins on legitimate sites by entering a code.
Microsoft disrupted the EvilTokens campaign in September 2026. The campaign's disruption highlights the issue of device code phishing tactics.
The GitHub Copilot CLI, which can execute commands and retain session context, is one of the tools potentially affected by this method. However, the device code phishing technique is not exclusive to GitHub or Copilot CLI and can be abused by any public client supporting the device flow.
An attacker can remotely control an active Copilot CLI session if remote control is enabled by the user. This capability allows attackers to act within the permissions granted to the application and the resources available to the affected account.
Microsoft Defender helps detect device code phishing attacks by connecting phishing attempts with GitHub authentication activity. The outcomes of the device code phishing simulation are proof-of-concept results and have not been observed in the wild.
