{"id":20867,"date":"2025-04-10T14:06:25","date_gmt":"2025-04-10T07:06:25","guid":{"rendered":"https:\/\/fpt-is.com\/en\/?post_type=goc_nhin_so&#038;p=20867"},"modified":"2025-06-02T11:48:29","modified_gmt":"2025-06-02T04:48:29","slug":"microsoft-phishing-attack-on-accounts-using-device-code","status":"publish","type":"goc_nhin_so","link":"https:\/\/fpt-is.com\/en\/insights\/microsoft-phishing-attack-on-accounts-using-device-code\/","title":{"rendered":"Microsoft: Phishing Attack on Accounts Using Device Code"},"content":{"rendered":"<p><span style=\"font-family: arial, helvetica, sans-serif\"><a href=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-1-1743059463.jpeg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20868\" src=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-1-1743059463.jpeg\" alt=\"Microsoft Device Code Fpt Is 1 1743059463\" width=\"765\" height=\"443\" srcset=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-1-1743059463.jpeg 765w, https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-1-1743059463-700x405.jpeg 700w\" sizes=\"(max-width: 765px) 100vw, 765px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Recently,\u00a0<strong>FPT Threat Intelligent<\/strong>\u00a0has detected several sophisticated phishing campaigns targeting Microsoft 365 accounts of individuals in key organizations. These attacks use device code phishing techniques, exploiting a legitimate feature to trick victims into providing device codes, thereby gaining access to emails and important data without needing the password.<\/span><\/p>\n<h2><strong><span style=\"font-family: arial, helvetica, sans-serif;font-size: 18pt\">Details<\/span><\/strong><\/h2>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">When users want to log into an app on a device and forget their password or fail to log in several times, they are directed to a device code authentication flow. This process requires users to enter a code on another device, like a phone or computer, that can type.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Hackers exploit this by contacting victims through messaging apps (such as WhatsApp, Signal, Microsoft Teams), pretending to be a trusted person and inviting them to a meeting or online transaction. In this invitation, the victim is given a device code\u2014but this code is created by the hacker. When the victim enters this code on the legitimate login page (Microsoft 365 login page), the system verifies it and provides the victim with an access token (and refresh token) as if they had successfully logged in.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Since this authentication token is considered a &#8220;digital certificate&#8221; that allows account access, the hacker can then use it to access Microsoft services (like email, cloud storage) without needing a password\u2014as long as the token remains valid.<\/span><\/p>\n<h2><span style=\"font-family: arial, helvetica, sans-serif;font-size: 18pt\"><strong>How Device Code Authentication Works<\/strong><\/span><\/h2>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Microsoft (and many other services) supports the\u00a0<strong>Device Code Flow<\/strong>\u00a0authentication method to help devices without a keyboard or browser log into accounts.<\/span><\/p>\n<h3><span style=\"font-family: arial, helvetica, sans-serif;font-size: 14pt\"><strong>Legitimate Process<\/strong>:<\/span><\/h3>\n<ol>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>User Initiates Login<\/strong>: When opening an app on a device without a keyboard, the device shows a\u00a0<strong>device code<\/strong>\u00a0and asks the user to enter this code on an official Microsoft website (e.g.,\u00a0<a href=\"https:\/\/microsoft.com\/devicelogin\" target=\"_blank\" rel=\"noopener nofollow\"><code>https:\/\/microsoft.com\/devicelogin<\/code><\/a>).<a href=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-2-1743059466.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20869\" src=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-2-1743059466.png\" alt=\"Microsoft Device Code Fpt Is 2 1743059466\" width=\"400\" height=\"299\" \/><\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>User Enters Code on Another Device<\/strong>: The user uses a computer or phone with a browser to enter the code.<a href=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-3-1743059468.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20870\" src=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-3-1743059468.png\" alt=\"Microsoft Device Code Fpt Is 3 1743059468\" width=\"400\" height=\"299\" \/><\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>Microsoft verifies identity<\/strong>\u00a0\u2192 If correct, the user&#8217;s account is linked to the device, and the device is given an\u00a0<strong>access token<\/strong>\u00a0to use Microsoft services like email and OneDrive.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">According to Microsoft&#8217;s intelligence center, there have been many phishing campaigns recently, possibly by a Russian hacker group called &#8216;Storm-237&#8217;, targeting various organizations and businesses worldwide. Based on preferences, targeted victims, and transaction techniques, researchers can confirm that this activity is linked to a state-sponsored campaign aligned with Russian interests.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Devices with limited input\u2014those without a keyboard or browser support, like smart TVs and some IoT devices\u2014rely on the device code flow to let users log into an app by entering an authorization code on another device, such as a smartphone or computer.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Microsoft researchers have discovered that since last August, Storm-237 has exploited this authentication flow by tricking users into entering device codes created by attackers on legitimate login pages. They launch the attack after establishing a connection with the target by &#8220;impersonating a prominent person related to the target&#8221; through messaging platforms like WhatsApp, Signal, and Microsoft Teams.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">The scam method used by Storm-2372 is to\u00a0<strong>trick victims into entering device codes<\/strong>\u00a0created by them on Microsoft&#8217;s legitimate login page, allowing them to gain account access.<\/span><\/p>\n<h3><span style=\"font-family: arial, helvetica, sans-serif;font-size: 14pt\"><strong>Storm-2372&#8217;s attack method<\/strong>:<\/span><\/h3>\n<ol>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>Building trust<\/strong>: Hackers impersonate a trusted person and contact victims through platforms like WhatsApp, Signal, and Teams.<a href=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-4-1743059471.webp\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20871\" src=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-4-1743059471.webp\" alt=\"Microsoft Device Code Fpt Is 4 1743059471\" width=\"800\" height=\"352\" srcset=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-4-1743059471.webp 800w, https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-4-1743059471-700x308.webp 700w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>Sending fake meeting invites<\/strong>: They send emails or messages with a Teams meeting invitation, including a\u00a0<strong>device code<\/strong>\u00a0they have created.<\/span><span style=\"font-family: arial, helvetica, sans-serif\"><a href=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-5-1743059473.webp\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20872\" src=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-5-1743059473.webp\" alt=\"Microsoft Device Code Fpt Is 5 1743059473\" width=\"278\" height=\"253\" \/><\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>Victim enters the code on Microsoft&#8217;s official page<\/strong>: Since Microsoft supports the Device Code Flow feature, the victim unsuspectingly enters the code at\u00a0<a href=\"https:\/\/microsoft.com\/devicelogin\" target=\"_blank\" rel=\"noopener nofollow\"><code>https:\/\/microsoft.com\/devicelogin<\/code><\/a>.<a href=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-6-1743059475.webp\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-20873\" src=\"https:\/\/cdn.fpt-is.com\/en\/sites\/3\/Microsoft-device-code-FPT-IS-6-1743059475.webp\" alt=\"Microsoft Device Code Fpt Is 6 1743059475\" width=\"454\" height=\"382\" \/><\/a><\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\"><strong>Hackers gain access<\/strong>: Because the hackers created the code beforehand, when the victim enters it, Microsoft grants them account access, allowing full control without further verification.<\/span><\/li>\n<\/ol>\n<h3><span style=\"font-family: arial, helvetica, sans-serif;font-size: 14pt\"><strong>Why this phishing attack is sophisticated and hard to detect:<\/strong><\/span><\/h3>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">No need to know the victim&#8217;s password.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Bypasses two-factor authentication (MFA) because the Device Code process doesn&#8217;t always require it.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Allows access to email, OneDrive, and Teams without raising suspicion.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Can register the device with\u00a0<strong>Microsoft Entra ID<\/strong>\u00a0to maintain long-term access.<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-family: arial, helvetica, sans-serif;font-size: 18pt\">Recommendations<\/span><\/h2>\n<p><span style=\"font-family: arial, helvetica, sans-serif\"><strong>FPT Threat Intelligence<\/strong>\u00a0recommends several measures to prevent phishing attacks by Storm-2372:<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Check the configuration of applications and devices used for logging in, then adjust them to disable device code authentication if it&#8217;s not necessary.<\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Apply Conditional Access policies in Microsoft Entra ID: Set up policies to clearly define the conditions under which users can log in, such as IP address, geographic location, and device status (registered and secure).<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Allow device code login only when the device or network conditions match a trusted list.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Adjust configurations based on the organization&#8217;s specific criteria to limit unauthorized access from unknown sources.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Use Microsoft&#8217;s &#8216;revokeSignInSessions&#8217; command to revoke all refresh tokens of suspected users.<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Revoking tokens forces users to log in again, ensuring that tokens no longer allow unauthorized access.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Combine with Conditional Access policies to require users to re-authenticate on verified safe devices and networks.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: arial, helvetica, sans-serif\">Use Microsoft Entra ID login logs to monitor unusual activities:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Track a large number of authentication attempts in a short period. If there are many consecutive login requests beyond the normal rate, it could indicate an automated attack (brute force).<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Monitor device code logins from unidentified IP addresses or those not part of the organization&#8217;s trusted network.<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Check if there are multiple device code authentication requests sent to many users at once, as this could also indicate a large-scale attack.<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-family: arial, helvetica, sans-serif;font-size: 18pt\">References<\/span><\/h2>\n<ol>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Microsoft: Hackers steal emails in device code phishing attacks &lt;<a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/microsoft-hackers-steal-emails-in-device-code-phishing-attacks\/\" target=\"_blank\" rel=\"noopener nofollow\">https:\/\/www.bleepingcomputer.com\/news\/security\/microsoft-hackers-steal-emails-in-device-code-phishing-attacks\/<\/a>\u00a0&gt;<\/span><\/li>\n<li><span style=\"font-family: arial, helvetica, sans-serif\">Storm-2372 conducts device code phishing campaign &lt;<a href=\"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2025\/02\/13\/storm-2372-conducts-device-code-phishing-campaign\/#Update-February-14\" target=\"_blank\" rel=\"noopener nofollow\">https:\/\/www.microsoft.com\/en-us\/security\/blog\/2025\/02\/13\/storm-2372-conducts-device-code-phishing-campaign\/#Update-February-14<\/a>\\&gt;<\/span><\/li>\n<\/ol>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 99.9071%\"><span style=\"font-family: arial, helvetica, sans-serif\"><strong>Exclusive article by FPT IS Technology Experts<\/strong><\/span><\/p>\n<p><em style=\"font-family: arial, helvetica, sans-serif;font-size: inherit\">Nguyen Van Trung \u2013 FPT IS Cyber Security Center<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"author":21,"featured_media":20868,"parent":0,"template":"","nang_luc":[880,790,821],"danh_muc_goc_nhin_so":[882],"dich_vu":[537,712],"linh_vuc":[],"platform":[],"san_pham":[],"the_goc_nhin_so":[],"class_list":["post-20867","goc_nhin_so","type-goc_nhin_so","status-publish","has-post-thumbnail","hentry","nang_luc-data","nang_luc-experts-sharing","nang_luc-security","danh_muc_goc_nhin_so-data-ai-insights","dich_vu-insights-data-ai","dich_vu-security"],"acf":[],"_links":{"self":[{"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/goc_nhin_so\/20867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/goc_nhin_so"}],"about":[{"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/types\/goc_nhin_so"}],"author":[{"embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/users\/21"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/media\/20868"}],"wp:attachment":[{"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/media?parent=20867"}],"wp:term":[{"taxonomy":"nang_luc","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/nang_luc?post=20867"},{"taxonomy":"danh_muc_goc_nhin_so","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/danh_muc_goc_nhin_so?post=20867"},{"taxonomy":"dich_vu","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/dich_vu?post=20867"},{"taxonomy":"linh_vuc","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/linh_vuc?post=20867"},{"taxonomy":"platform","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/platform?post=20867"},{"taxonomy":"san_pham","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/san_pham?post=20867"},{"taxonomy":"the_goc_nhin_so","embeddable":true,"href":"https:\/\/fpt-is.com\/en\/wp-json\/wp\/v2\/the_goc_nhin_so?post=20867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}