{"id":2600,"date":"2024-08-07T07:00:00","date_gmt":"2024-08-07T05:00:00","guid":{"rendered":"https:\/\/certitude.consulting\/blog\/?p=2600"},"modified":"2025-02-13T13:01:10","modified_gmt":"2025-02-13T11:01:10","slug":"o365-anti-phishing-measures","status":"publish","type":"post","link":"https:\/\/certitude.consulting\/blog\/en\/o365-anti-phishing-measures\/","title":{"rendered":"Exploring Anti-Phishing Measures in Microsoft 365"},"content":{"rendered":"\n<p><strong>In this post we will explore some of the anti-phishing measures employed by Microsoft 365 (formally Office 365) as well as their weaknesses. Cert<span style=\"text-decoration: underline\">it<\/span>ude was able to identify an issue in that allows malicious actors to bypass anti-phishing measures.<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">When an Outlook user receives an e-mail from an address they don&#8217;t typically communicate with, Outlook shows an alert which reads <em>&#8220;You don&#8217;t often get email from xyz@example.com. Learn why this is important&#8221;<\/em>. This is what Microsoft calls the <a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365\/security\/office-365-security\/anti-phishing-policies-about?view=o365-worldwide#first-contact-safety-tip\" data-type=\"link\" data-id=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365\/security\/office-365-security\/anti-phishing-policies-about?view=o365-worldwide#first-contact-safety-tip\"><em>First Contact Safety Tip<\/em><\/a>, and it is one of the various anti-phishing measures available in Exchange Online Protection (EOP) and Microsoft Defender to organizations using Office 365:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"137\" src=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/1.png\" alt=\"\" class=\"wp-image-3370\" srcset=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/1.png 530w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/1-300x78.png 300w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">The <em>First Contact Safety Tip<\/em> is prepended to the body of an HTML email, which means it is possible to alter the way it is displayed through the use of CSS style tags.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1517\" height=\"674\" src=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2.webp\" alt=\"\" class=\"wp-image-3372\" srcset=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2.webp 1517w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2-300x133.webp 300w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2-1024x455.webp 1024w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2-768x341.webp 768w\" sizes=\"auto, (max-width: 1517px) 100vw, 1517px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">As a proof of concept, let&#8217;s demonstrate an HTML email which &#8220;hides&#8221; the <em>First Contact Safety Tip<\/em> from the user. Although applying some more common CSS rules such as <code>display: none<\/code>, <code>height: 0px<\/code>, and <code>opacity: 0<\/code> to the table itself doesn&#8217;t seem to work (either due to the inline CSS in the elements, or due to lack of support by the rendering engine Outlook uses), it is possible to change the background and font colors to white so that the alert is effectively invisible when rendered to the end user viewing the email:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;head&gt;\n&lt;\/head&gt;\n&lt;head&gt;\n    &lt;style&gt;\n        a {\n            display: none;\n        }\n        td div {\n            color: white;\n            font-size: 0px;\n        }\n        table tbody tr td {\n            background-color: white !important;\n            color: white !important;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n\n...&#091;SNIP]...<\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">By using this HTML code in an e-mail, the alert does not show up in the email body anymore!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"315\" src=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2025-02-13-11_59_09-Archive-w.moody@certitude.consulting-Outlook-1-1024x315.png\" alt=\"\" class=\"wp-image-3377\" srcset=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2025-02-13-11_59_09-Archive-w.moody@certitude.consulting-Outlook-1-1024x315.png 1024w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2025-02-13-11_59_09-Archive-w.moody@certitude.consulting-Outlook-1-300x92.png 300w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2025-02-13-11_59_09-Archive-w.moody@certitude.consulting-Outlook-1-768x236.png 768w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/2025-02-13-11_59_09-Archive-w.moody@certitude.consulting-Outlook-1.png 1483w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Note that the e-mail preview (highlighted in red) still begins with the Safety Tip.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">One Step Further<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">Since we&#8217;re already on the topic of phishing, we can take this a step further, and spoof the icons Microsoft Outlook adds to emails that are encrypted and\/or signed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...&#091;SNIP]...\n        #mainTable {\n            width: 100%;\n            z-index: 1;\n            margin-bottom: 1em;\n        }\n        #signedBy {\n            font-size: 0.9em;\n        }\n        .badge {\n            width: 2.8em;\n            text-align: right;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;table id=\"mainTable\"&gt;\n    &lt;tr&gt;\n        &lt;td id=\"signedBy\" style=\"color:#666 !important;\"&gt;\n            Signed By &amp;nbsp;&amp;nbsp;nimmerrichtermarc@gmail\u2024com\n        &lt;\/td&gt;\n        &lt;td class=\"badge\"&gt;\n            &lt;img src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAQCAYAAADAvYV+AAAACXBIWXMAAA7DAAAOwwHHb6hkAA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&gt;\n    &lt;\/tr&gt;\n&lt;\/table&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"221\" src=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/result-1024x221.webp\" alt=\"\" class=\"wp-image-3375\" srcset=\"https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/result-1024x221.webp 1024w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/result-300x65.webp 300w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/result-768x166.webp 768w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/result-1536x331.webp 1536w, https:\/\/certitude.consulting\/blog\/wp-content\/uploads\/2024\/08\/result.webp 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">One thing to note here is that the <em>&#8216;.&#8217;<\/em> character in <em>&#8216;Signed By nimmerrichtermarc@gmail.com&#8217;<\/em> is actually the Unicode character <a href=\"https:\/\/www.compart.com\/de\/unicode\/U+2024\" data-type=\"link\" data-id=\"https:\/\/www.compart.com\/de\/unicode\/U+2024\">U+2024<\/a>, and not a regular period. This is because when left as a period, Outlook will automatically detect <em>nimmerrichtermarc@gmail.com<\/em> as an email address and generate a <em>mailto <\/em>link, which would look noticeably different from the original text we are trying to spoof.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">When compared to an email which is actually signed and encrypted, more attentive users will of course notice a difference in formatting, however some users will not. It only takes one person to fall for the phishing attack for an adversary to gain a foothold in the organization!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Responsible Disclosure<\/h2>\n\n\n\n<p class=\"has-medium-font-size\">After developing a proof of concept, and preparing an advisory, we made Microsoft aware of these issues through the Microsoft Researcher Portal (MSRC). Microsoft chose to not address this behavior for now:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-medium-font-size\">We determined your finding is valid but does not meet our bar for immediate servicing considering this is mainly applicable for phishing attacks. However, we have still marked your finding for future review as an opportunity to improve our products.<\/p>\n<cite>Microsoft MSRC, 14.02.2024<\/cite><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Authors<\/h2>\n\n\n\n<p>This research was conducted by William Moody and Wolfgang Ettlinger.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post we will explore some of the anti-phishing measures employed by Microsoft 365 (formally Office 365) as well as their weaknesses. Certitude was able to identify an issue in that allows malicious actors to bypass anti-phishing measures. When an Outlook user receives an e-mail from an address they don&#8217;t typically communicate with, Outlook [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":2803,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,103],"tags":[524,520,440,318],"class_list":["post-2600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-analysis","category-vulnerability-research-en","tag-microsoft-en","tag-outlook","tag-phishing-en","tag-social-engineering"],"_links":{"self":[{"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/posts\/2600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/comments?post=2600"}],"version-history":[{"count":20,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/posts\/2600\/revisions"}],"predecessor-version":[{"id":3378,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/posts\/2600\/revisions\/3378"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/media\/2803"}],"wp:attachment":[{"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/media?parent=2600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/categories?post=2600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/certitude.consulting\/blog\/wp-json\/wp\/v2\/tags?post=2600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}