• Thread Author
Russian cyber threat actors have recently exploited OAuth 2.0 authentication flows to compromise Microsoft 365 accounts belonging to employees involved with Ukraine-related and human rights organizations. This sophisticated attack, tracked since early 2025, is predominantly attributed to state-linked groups identified as UTA0352 and UTA0355. Their approach combines advanced social engineering with technical manipulation of OAuth protocols to bypass traditional security defenses and gain sustained access to sensitive accounts.

A hooded hacker intensely works on a computer displaying a digital lock symbol on screen.
The Attack Vector: Abuse of OAuth 2.0 Authentication​

OAuth 2.0 is a widely trusted framework designed to facilitate secure delegated access to user resources without exposing passwords. It operates by issuing authorization codes or tokens that grant applications limited access rights. However, in the present campaign, adversaries have subverted this trust through carefully crafted phishing schemes. Instead of relying on zero-day exploits or malware-based intrusions, the attackers employ social engineering to trick victims into voluntarily granting OAuth permissions.
Attackers initiate contact via encrypted messaging apps such as WhatsApp and Signal, impersonating high-profile European political officials or Ukrainian diplomats. The victims receive messages urging them to join private “video calls” or meetings ostensibly relevant to Ukraine affairs. These lures often include OAuth phishing URLs or PDFs containing instructions to authenticate via a seemingly legitimate Microsoft login portal. Notably, the phishing portal leverages a subdomain insiders.vscode.dev, mimicking the official Visual Studio Code web interface to foster trust among technically savvy users.
When victims enter their credentials and complete the OAuth flow, an authorization code appears in the browser URL—an oversight that attackers exploit by intercepting this code. This OAuth authorization code enables the attackers to gain access tokens valid for up to 60 days, allowing extended intrusion without requiring repeated credential theft. Moreover, attackers utilize the stolen codes to register new devices in Microsoft Entra ID (formerly Azure AD), thereby establishing persistent footholds with the ability to bypass multi-factor authentication (MFA) prompts.

Technical and Social Engineering Sophistication​

This attack represents a convergence of technical manipulation and psychological exploitation. The targeting of high-value users connected to Ukrainian support and human rights groups is highly strategic, aimed at harvesting sensitive information that could have geopolitical implications.
The social engineering element is paramount. The initial outreach messages are contextually relevant and leverage compromised accounts to add legitimacy. Victims are then guided through a coerced OAuth approval process using interfaces and URLs that closely resemble official Microsoft branding. By embedding the attack within familiar tools such as Visual Studio Code’s web interface, the attackers reduce suspicion, especially among technical staff who might otherwise question unfamiliar domains.
Two-factor authentication, often hailed as a security safeguard, is cleverly subverted. Attackers prompt victims with fake 2FA push notifications, masquerading as necessary approvals for accessing SharePoint portals linked to the “conference.” The unwitting victim authorizes the authentication, unknowingly enabling attackers to gain legitimate device registration and access.
Additionally, attackers use proxies and IP spoofing to appear as if their logins originate from the victim’s usual geographic location, preventing easy detection through anomaly-based security monitoring.

Evolution and Broadening of the Threat: Device Code Phishing by Storm-2372​

Alongside UTA0352 and UTA0355’s OAuth code phishing, another Russian-linked group called Storm-2372 has been exploiting Microsoft’s Device Code Authentication mechanism. Device Code flow, a legitimate OAuth protocol designed for devices with limited input capabilities like smart TVs or IoT gadgets, involves displaying a short code on a device, which the user enters on a trusted device to complete authentication.
Storm-2372 weaponizes this feature by sending fake meeting invitations embedded with malicious device codes through messaging platforms, including Microsoft Teams, Signal, WhatsApp, and others. When victims enter these attacker-provided codes on legitimate Microsoft login pages, attackers intercept access and refresh tokens, bypassing password-based authentication entirely. This approach grants persistent access to compromised accounts, enabling attackers to maintain control even if the account password is changed later.
The campaign has advanced to exploit the client ID associated with Microsoft Authentication Broker, obtaining refresh tokens that can enroll attacker-controlled devices in Microsoft Entra ID. This grants the attackers not only continuous access but the ability to move laterally within organizational networks and exfiltrate sensitive data using Microsoft Graph API.

Extensive Impact on Targeted Sectors​

The targeting of these campaigns spans a broad range of sectors, including government, defense, telecommunications, healthcare, energy, education, and human rights organizations. Geographically, attacks have been observed across Europe, North America, Africa, and the Middle East, underlining the global reach and strategic intent of these threat actors.
The sensitive nature of compromised data—ranging from email communications and documents to access credentials—poses a significant risk both tactically and diplomatically. For example, stolen information could be used to disrupt humanitarian corridors, undermine diplomatic negotiations, or gain operational military advantages.

Defense Recommendations and Mitigation Strategies​

Given the sophistication and persistence of these OAuth-based attacks, cybersecurity experts and Microsoft advise a multifaceted defense strategy:
  • Blocking Malicious Domains: Organizations should block access to known phishing infrastructure such as insiders.vscode.dev and associated redirect sites like vscode-redirect.azurewebsites.net to disrupt attacker workflows.
  • Conditional Access Policies: Applying strict Conditional Access Policies via Microsoft Entra ID can restrict OAuth token issuance and device registrations only to trusted, compliant devices and approved networks.
  • Monitoring OAuth Client Usage: Security teams should set up alerts for unexpected or anomalous login activity, especially those using Visual Studio Code’s client_id or any unusual OAuth clients.
  • User Education and Awareness: Training users to recognize sophisticated social engineering tactics—including impersonation via messaging apps and nuanced consent screens—is critical to prevent credential sharing.
  • Token and Session Management: Implement processes to monitor, audit, and promptly revoke suspicious OAuth tokens and refresh tokens using tools like Microsoft Graph API’s revokeSignInSessions.
  • Multi-Factor Authentication and Phishing-Resistant Methods: While MFA is not foolproof against these phishing schemes, employing hardware-based security keys (e.g., FIDO tokens) and advanced phishing-resistant methods can raise the barrier.
  • Suspicious Device Registration Reviews: Review and audit newly registered devices, especially those added following any suspicious user prompts or outside normal device enrollment processes.

Broader Implications for Enterprise Security​

This wave of OAuth exploitation highlights a broader challenge facing identity and access management in the age of cloud services. Protocols like OAuth and Device Code Authentication are essential for seamless user experience and productivity but can become potent attack vectors when layered with human factors vulnerabilities.
The campaigns by Russian threat actors underscore the growing arms race in cyber espionage, where strategic social engineering, geopolitical targeting, and abuse of legitimate infrastructure come together in high-stakes digital warfare. Organizations must assume breach scenarios, implement zero-trust principles, and continuously adapt security postures to evolving threats.
The lessons extend beyond Microsoft 365 to similar identity services widely used in cloud ecosystems, emphasizing that security is not achieved by technology alone but by integrating vigilant user education, fine-grained access controls, and proactive monitoring.

Conclusion​

The abuse of OAuth 2.0 and Microsoft Device Code Authentication by Russian threat groups represents a sophisticated evolution of phishing—one that exploits trust, authority, and complex authentication flows rather than relying solely on technical exploits. For affected and at-risk organizations, a layered security approach combining technical controls, user training, and vigilant monitoring is paramount to mitigating these threats.
As threat actors refine these methods and expand their targets, Microsoft 365 users and administrators must remain alert to subtle social engineering ploys and enforce stringent identity governance. Robust conditional access, token oversight, and rapid incident response are critical defenses in protecting sensitive communications and digital infrastructures in this increasingly contested cyberspace.
By understanding the intricate tactics behind OAuth abuse and device code phishing, the community can better prepare defenses against persistent, state-backed cyber incursions that threaten organizational security and international cooperation.

This article has drawn upon detailed technical and strategic insights from multiple security analyses and discussions on WindowsForum.com forum archives and cybersecurity advisories .

Source: The420.in Hackers Abuse OAuth to Seize Microsoft 365 Accounts - The420.in
 

Back
Top