{"id":26193,"date":"2026-09-21T15:14:48","date_gmt":"2026-09-21T23:14:48","guid":{"rendered":"https:\/\/www.palada.net\/index.php\/2026\/09\/21\/hunting-device-code-phishing-pages\/"},"modified":"2026-09-21T15:14:48","modified_gmt":"2026-09-21T23:14:48","slug":"hunting-device-code-phishing-pages","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2026\/09\/21\/hunting-device-code-phishing-pages\/","title":{"rendered":"Hunting Device Code Phishing Pages"},"content":{"rendered":"<div class=\"rich-text_richText__UyrDZ\" data-anchor-headings=\"true\" data-component=\"rich-text\" data-reader-view=\"false\">\n<div class=\"payload-richtext\">\n<p>Last week, RL discovered an active Microsoft 365 device code phishing campaign that abuses Microsoft&#8217;s legitimate OAuth 2.0 Device Authorization Grant flow to obtain access to victim accounts.<\/p>\n<p>Rather than stealing passwords through a counterfeit login page, the phishing kit persuades victims to complete a legitimate Microsoft authentication process that authorizes an attacker-controlled device.<\/p>\n<p>In this companion Spectra Analyze in Action post, you&#8217;ll find a deep dive on how it works, including the phishing lure and attack workflow, code for the landing page, IOCs, and detection opportunities <a href=\"https:\/\/www.reversinglabs.com\/blog\/device-code-phishing-campaign\"><span style=\"text-decoration:underline\">at RL Blog.<\/span><\/a><\/p>\n<h2 id=\"yara-rule\">YARA rule<\/h2>\n<p>The full-length blog, above, includes a YARA rule that can be used to detect phishing landing pages. <\/p>\n<div class=\"p code-block_codeBlock__uEaiL\" data-component=\"code-block\">\n<pre><code>rule DeviceCode_Phishing_LandingPageHTML\n{\n    meta:\n        author = \"Malware Utkonos\"\n        date = \"2026-05-20\"\n        description = \"Detects Device Code phishing kit landing page HTML.\"\n    strings:\n        $login_akam = \"aka.ms\/devicelogin\"\n        $login_msft = \"microsoft.com\/devicelogin\"\n        $login_mso1 = \"login.microsoftonline.com\/common\/oauth2\/deviceauth\"\n        $login_mso2 = \"login.microsoftonline.com\/common\/oauth2\/v2.0\/deviceauth\"\n        $login_live = \"login.live.com\/oauth20_remoteconnect.srf\"\n        $login_link = \"microsoft.com\/link\"\n\n        $unicode_zws = { E2808B }\n        $unicode_zwnj = { E2808C }\n        $unicode_wj = { E281A0 }\n\n        $dc = \"\\\"dc=\"\n\n        $evosts = \"\\x15\\x15\\xd9\\xbd\\x4d\\xd1\\xcd\\x05\\xc9\\xd1\\xa5\\x99\\x85\\x8d\\xd1\\xcc\" base64(\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\")\n\n    condition:\n        any of ($login*) and\n        any of ($unicode*) and\n        $dc and $evosts and\n        filesize &lt; 1MB\n}<\/code><\/pre>\n<\/div>\n<p>You can enable this rule in Spectra Analyze and run a retrohunt to identify any historic landing pages in either our own locally submitted files or the ReversingLabs file corpus. In Spectra Analyze, select the YARA option in the upper right corner. Then, select \u201cAdd Ruleset\u201d and \u201cCreate Ruleset\u201d from the drop down menu. Copy and paste the YARA rule above, and then save it, as shown below. You select the \u201cEnable Ruleset\u201d option on the upper left, as well as the \u201cRun Ruleset Continuously in Spectra Intelligence\u201d option if you want to match against any future submitted samples.<\/p>\n<div class=\"rich-media_container__AH6jG media-block_mediaBlock__nZBDJ\" data-position=\"center\" data-restrict=\"true\" data-size=\"fill\">\n<div class=\"rich-media_media__trppT\"><template id=\"P:e\"><\/template><\/p>\n<div class=\"rich-media_overlay__LSRfe\"><svg aria-hidden=\"true\" class=\"lucide lucide-expand\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewbox=\"0 0 24 24\" width=\"24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"m15 15 6 6\"><\/path><path d=\"m15 9 6-6\"><\/path><path d=\"M21 16v5h-5\"><\/path><path d=\"M21 8V3h-5\"><\/path><path d=\"M3 16v5h5\"><\/path><path d=\"m3 21 6-6\"><\/path><path d=\"M3 8V3h5\"><\/path><path d=\"M9 9 3 3\"><\/path><\/svg><\/div>\n<\/div>\n<\/div>\n<p style=\"text-align:center\"><em>Figure 1. Spectra Analyze\u2019s YARA rule editing mode<\/em><\/p>\n<p>After saving our rule, select the button on the right and \u201cRun Cloud Retro Hunt\u201d from the dropdown menu. This kicks off our hunt. A status bar will appear that tracks the progress of our hunt. <\/p>\n<div class=\"rich-media_container__AH6jG media-block_mediaBlock__nZBDJ\" data-position=\"center\" data-restrict=\"true\" data-size=\"fill\">\n<div class=\"rich-media_media__trppT\"><template id=\"P:f\"><\/template><\/p>\n<div class=\"rich-media_overlay__LSRfe\"><svg aria-hidden=\"true\" class=\"lucide lucide-expand\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewbox=\"0 0 24 24\" width=\"24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"m15 15 6 6\"><\/path><path d=\"m15 9 6-6\"><\/path><path d=\"M21 16v5h-5\"><\/path><path d=\"M21 8V3h-5\"><\/path><path d=\"M3 16v5h5\"><\/path><path d=\"m3 21 6-6\"><\/path><path d=\"M3 8V3h5\"><\/path><path d=\"M9 9 3 3\"><\/path><\/svg><\/div>\n<\/div>\n<\/div>\n<p><em>Figure 2: Enabling a cloud retro hunt in Spectra Analyze.<\/em><\/p>\n<p>After the hunt finishes, you can review our results. In this case, the results of the YARA rule are device code phishing page response content of this campaign. These landing pages are available for threat hunting and analysis in Spectra Analyze due to a key feature of Spectra Intelligence\u2019s URL analysis. Spectra Intelligence\u2019s URL analysis, a cloud service, captures the HTML response page when crawling a URL and saves it as a \u201cfirst citizen\u201d file. This makes it very straightforward to hunt through these HTML response files during a threat hunt. <\/p>\n<div class=\"rich-media_container__AH6jG media-block_mediaBlock__nZBDJ\" data-position=\"center\" data-restrict=\"true\" data-size=\"fill\">\n<div class=\"rich-media_media__trppT\"><template id=\"P:10\"><\/template><\/p>\n<div class=\"rich-media_overlay__LSRfe\"><svg aria-hidden=\"true\" class=\"lucide lucide-expand\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewbox=\"0 0 24 24\" width=\"24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"m15 15 6 6\"><\/path><path d=\"m15 9 6-6\"><\/path><path d=\"M21 16v5h-5\"><\/path><path d=\"M21 8V3h-5\"><\/path><path d=\"M3 16v5h5\"><\/path><path d=\"m3 21 6-6\"><\/path><path d=\"M3 8V3h5\"><\/path><path d=\"M9 9 3 3\"><\/path><\/svg><\/div>\n<\/div>\n<\/div>\n<p><em>Figure 3. YARA rule results in Spectra Analyze.<\/em><\/p>\n<p>Above, you can see that our YARA hunt matches 765 samples, with the newest samples seen only a few hours ago. This makes it clear that this is still ongoing malicious activity. If youYo select and view the first sample, we can fetch and analyze the sample locally by clicking the button in the upper right corner. After analysis completes, refresh the page. Now, we are able to select the \u201cpreview\/visualizations\u201d option under \u201cFile Analysis\u201d in the top left corner. <\/p>\n<div class=\"rich-media_container__AH6jG media-block_mediaBlock__nZBDJ\" data-position=\"center\" data-restrict=\"true\" data-size=\"fill\">\n<div class=\"rich-media_media__trppT\"><template id=\"P:11\"><\/template><\/p>\n<div class=\"rich-media_overlay__LSRfe\"><svg aria-hidden=\"true\" class=\"lucide lucide-expand\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewbox=\"0 0 24 24\" width=\"24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"m15 15 6 6\"><\/path><path d=\"m15 9 6-6\"><\/path><path d=\"M21 16v5h-5\"><\/path><path d=\"M21 8V3h-5\"><\/path><path d=\"M3 16v5h5\"><\/path><path d=\"m3 21 6-6\"><\/path><path d=\"M3 8V3h5\"><\/path><path d=\"M9 9 3 3\"><\/path><\/svg><\/div>\n<\/div>\n<\/div>\n<p><em>Figure 4. Hex preview of matching sample <\/em>87158731a98f30ff8a6280e5e14f094a402a861d<em>.<\/em><\/p>\n<p>A neat feature in Spectra Analyze allows us to highlight the matches of our YARA rule corresponding to specific strings. You can actually use the arrows to flip through and highlight all of the matches in our rule.\u00a0<\/p>\n<div class=\"rich-media_container__AH6jG media-block_mediaBlock__nZBDJ\" data-position=\"center\" data-restrict=\"true\" data-size=\"fill\">\n<div class=\"rich-media_media__trppT\"><template id=\"P:12\"><\/template><\/p>\n<div class=\"rich-media_overlay__LSRfe\"><svg aria-hidden=\"true\" class=\"lucide lucide-expand\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewbox=\"0 0 24 24\" width=\"24\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"m15 15 6 6\"><\/path><path d=\"m15 9 6-6\"><\/path><path d=\"M21 16v5h-5\"><\/path><path d=\"M21 8V3h-5\"><\/path><path d=\"M3 16v5h5\"><\/path><path d=\"m3 21 6-6\"><\/path><path d=\"M3 8V3h5\"><\/path><path d=\"M9 9 3 3\"><\/path><\/svg><\/div>\n<\/div>\n<\/div>\n<p>If you select the \u201cNetwork Locations\u201d option under \u201cSources\u201d in the left hand toolbar, you can see the malicious URL this HTML landing page was collected from, corresponding to the shortened URL highlighted in Figure 4. As discussed, Spectra Intelligence saves landing pages as primary files, directly corresponding to the source URL, which makes it a powerful tool for threat hunting scenarios.<\/p>\n<\/p>\n<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Last week, RL discovered an active Microsoft 365 device code phishing campaign that abuses Microsoft&#8217;s legitimate OAuth 2.0 Device Authorization Grant flow to obtain access to victim accounts.Rather than stealing passwords through a counterfeit login page, the phishing kit persuades victims to complete a legitimate Microsoft authentication process that authorizes an attacker-controlled device.In this companion Spectra Analyze in Action post, you&#8217;ll find a deep dive on how it works, including the<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[32775],"tags":[],"class_list":["post-26193","post","type-post","status-publish","format-standard","hentry","category-reversinglabs"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/26193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=26193"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/26193\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=26193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=26193"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=26193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}