<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Security - Modern Security</title><link>https://www.modernsecurity.nl/security/</link><description>In-depth security blogs on Microsoft Defender XDR, exposure management, SOC operations, threat detection, and real-world security architecture.</description><language>en-us</language><copyright>© 2026 Modern Security</copyright><generator>Hugo</generator><lastBuildDate>Mon, 02 Nov 2026 00:00:00 +0100</lastBuildDate><atom:link href="https://www.modernsecurity.nl/security/index.xml" rel="self" type="application/rss+xml"/><image><url>https://www.modernsecurity.nl/img/logo-light_hu_98d13a0e48fc51de.png</url><title>Security - Modern Security</title><link>https://www.modernsecurity.nl/security/</link></image><item><title>Why Modern Security left WordPress: rebuilding the blog with Hugo and Blowfish</title><link>https://www.modernsecurity.nl/modern-security-moved-to-hugo-and-blowfish/</link><guid isPermaLink="true">https://www.modernsecurity.nl/modern-security-moved-to-hugo-and-blowfish/</guid><pubDate>Thu, 29 Oct 2026 00:00:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><description>Modern Security moved from WordPress to a static Hugo and Blowfish site on Cloudflare Workers. Why I did it, how the migration worked, and what changed for you.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>If you&rsquo;re reading this, you&rsquo;re looking at a completely new Modern Security. Same articles, same URLs, same Microsoft security focus. But under the hood almost nothing is left of the old site.</p>
<p>For years this blog ran on WordPress. It worked, but every month I spent more time maintaining the platform than writing about Microsoft security. Plugin updates, a security plugin to protect the other plugins, a cache plugin to make it fast again, a cookie plugin to explain all the other plugins. At some point I asked myself the question I ask customers all the time: why is the attack surface this big for what it actually needs to do?</p>
<p>So I rebuilt it. Modern Security is now a static site built with <a href="https://gohugo.io/"  target="_blank" rel="noreferrer">Hugo</a> and the <a href="https://blowfish.page/"  target="_blank" rel="noreferrer">Blowfish</a> theme, hosted on <a href="https://developers.cloudflare.com/workers/static-assets/"  target="_blank" rel="noreferrer">Cloudflare Workers</a>. In this post I explain why I made the move, how I migrated every article without breaking a single link, what I built on top of Blowfish, and what changed for you as a reader.</p>

<h2 class="relative group">Why leave WordPress?
    <div id="why-leave-wordpress" class="anchor"></div>
    
</h2>
<p>WordPress isn&rsquo;t bad. It runs a huge part of the internet for good reasons. But for a blog like this one, the trade-offs had tipped the wrong way.</p>
<p>Over time the old site needed a long list of plugins: Rank Math Pro for SEO, Wordfence for security, LiteSpeed Cache for performance, Complianz for cookie consent, Google Tag Manager, reCAPTCHA for the contact form, and a newsletter plugin. Each of them is code that runs on every request, needs updates, and can have its own vulnerabilities.</p>
<p>For a security blog that felt wrong for three reasons:</p>
<ul>
<li><strong>Attack surface:</strong> A login page, a database, PHP and a stack of plugins, all reachable from the internet, to serve articles that change a few times a month.</li>
<li><strong>Maintenance:</strong> Updates were never &ldquo;just&rdquo; updates. Something always needed checking afterwards.</li>
<li><strong>Privacy:</strong> The cookie policy listed cookies from WordPress, Wordfence, LiteSpeed, Google, Facebook, Twitter and LinkedIn. That&rsquo;s a lot of third parties for reading an article about Defender XDR.</li>
</ul>
<p>A static site removes most of that by design. The pages are plain files: there is no database behind them to inject into, no WordPress login to brute-force and no plugins to patch.</p>

<h2 class="relative group">The new stack
    <div id="the-new-stack" class="anchor"></div>
    
</h2>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Part</th>
              <th>Old site</th>
              <th>New site</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Platform</td>
            <td>WordPress with PHP and a database</td>
            <td>Hugo static site generator</td>
        </tr>
        <tr>
            <td>Theme</td>
            <td>WordPress theme plus page builder blocks</td>
            <td>Blowfish, with my own layouts on top</td>
        </tr>
        <tr>
            <td>Hosting</td>
            <td>Web hosting with a LiteSpeed server</td>
            <td>Cloudflare Workers (static assets)</td>
        </tr>
        <tr>
            <td>SEO</td>
            <td>Rank Math Pro</td>
            <td>Built into the templates (titles, descriptions, structured data, sitemap)</td>
        </tr>
        <tr>
            <td>Security</td>
            <td>Wordfence</td>
            <td>No WordPress login or plugins; the only admin page sits behind Cloudflare Access</td>
        </tr>
        <tr>
            <td>Contact form</td>
            <td>WordPress form with reCAPTCHA</td>
            <td>A small Cloudflare Worker with Cloudflare Turnstile</td>
        </tr>
        <tr>
            <td>Cookie consent</td>
            <td>Complianz plugin</td>
            <td>A small self-hosted consent banner</td>
        </tr>
        <tr>
            <td>Writing</td>
            <td>WordPress editor</td>
            <td>Markdown files in Git</td>
        </tr>
    </tbody>
  </table>
</div>
<p><strong>Hugo</strong> turns Markdown files into plain HTML pages in seconds. <strong>Blowfish</strong> gives a modern, fast theme with dark mode, search and an accessibility panel. <strong>Cloudflare Workers</strong> builds the site from GitHub on every change and serves it from Cloudflare&rsquo;s network. Pages are plain files; code only runs for the contact form.</p>
<p>One rule I set myself from day one: <strong>never edit the Blowfish theme files.</strong> Blowfish is a Git submodule, pinned to a fixed version, and everything that makes the site look like Modern Security lives in my own layouts and styles. Where I had to replace a Blowfish template, it&rsquo;s documented, so I know exactly what to check when Blowfish releases a new version.</p>

<h2 class="relative group">Migrating every article without breaking a link
    <div id="migrating-without-breaking-a-link" class="anchor"></div>
    
</h2>
<p>The scariest part of any migration is SEO. Years of articles are indexed by Google, linked from LinkedIn posts and bookmarked by readers. If URLs change, all of that turns into 404 errors overnight.</p>
<p>So the migration started with an audit, not with a design. I exported everything from the WordPress REST API: posts, pages, categories, media, and the SEO data Rank Math generated for every page. Then a Python converter turned each WordPress article into a Hugo page bundle: one folder per article with the Markdown text and its images next to it.</p>
<p>A few things the converter had to get right:</p>
<ol>
<li><strong>Identical URLs:</strong> Every article, category and page keeps exactly the same address as on WordPress. One article even had a non-breaking hyphen (U+2011) in its URL, which Hugo silently strips. That one now has its URL set explicitly.</li>
<li><strong>Identical SEO:</strong> Titles, meta descriptions and robots settings are copied exactly as Rank Math had them. A comparison script checks the old and new page headers side by side.</li>
<li><strong>Tables:</strong> Many of my articles are full of tables with KQL queries and settings. The converter checked all 133 tables against the original. That&rsquo;s how I found that a WordPress math plugin had quietly eaten the <code>$</code> signs in a PowerShell command at some point.</li>
<li><strong>Images:</strong> Every screenshot is converted to WebP, and Hugo now creates several sizes of each image, so a phone downloads a small version and a 4K screen a sharp one.</li>
<li><strong>KQL highlighting:</strong> Hugo&rsquo;s code highlighter doesn&rsquo;t know KQL, so the site highlights KQL itself while building. No JavaScript needed in your browser.</li>
</ol>
<p>The old cookie policy pages for different countries now point to one cookie policy, and the remaining old WordPress addresses get permanent redirects. Google sees the same pages, with the same titles, at the same addresses.</p>

<h2 class="relative group">Building the frontend
    <div id="building-the-frontend" class="anchor"></div>
    
</h2>
<p>Blowfish is a great starting point, but I wanted the site to stay recognisably Modern Security: the black top bar, the big logo, black section headings and the photo tiles on the homepage. So most of what you see is built on top of the theme:</p>
<ul>
<li><strong>Homepage:</strong> a mosaic of featured articles, the Security, Identity and Compliance tiles, and every other article with pagination.</li>
<li><strong>Articles:</strong> a table of contents at the top, a featured posts and categories sidebar, a reading progress bar and code blocks with a copy button.</li>
<li><strong>Topic pages:</strong> a photo banner, an introduction per topic, related topics and the articles in that topic.</li>
<li><strong>Dark mode and accessibility:</strong> a dark-mode switch and Blowfish&rsquo;s accessibility panel for text size, link underlines and a distraction-free reading mode.</li>
<li><strong>Sharing without trackers:</strong> share buttons for LinkedIn, X, Bluesky and email are plain links. Nothing from those networks loads until you click.</li>
<li><strong>Comments:</strong> moderated comments under every article, with replies and an Author badge for my answers.</li>
<li><strong>Mobile:</strong> every page type was checked at phone size, so nothing scrolls sideways and every button is big enough to tap.</li>
</ul>

<h2 class="relative group">Privacy and security by design
    <div id="privacy-and-security-by-design" class="anchor"></div>
    
</h2>
<p>This is the part I&rsquo;m most happy with, because it&rsquo;s where the old site felt most uncomfortable.</p>
<p><strong>Nothing tracks you before you choose:</strong> The site uses Google Analytics and Microsoft Clarity to see which articles are read, but only after you allow it in the cookie banner. Before that choice, no Google or Microsoft script is loaded at all. Rejecting is exactly as easy as accepting, and advertising features are switched off in both tools. The only thing that runs without consent is Cloudflare Web Analytics, which counts page views without cookies and without identifying you. You can change your mind at any time via the <em>Cookie settings</em> button on the <a href="https://www.modernsecurity.nl/cookie-policy-eu/" >Cookie Policy</a>, linked at the bottom of every page.</p>
<p><strong>The contact form has no database behind it:</strong> Messages go through a small Cloudflare Worker that checks Cloudflare Turnstile on the server and sends the message by email through an EU mail provider. No form plugin, no stored submissions.</p>
<p><strong>Comments without trackers:</strong> You can now comment under every article. Every comment waits for my approval before it appears, Cloudflare Turnstile keeps bots out, and comments are stored in a Cloudflare D1 database in the EU. No cookies and no third-party comment service, and Turnstile only loads once you start typing. The moderation page sits behind Cloudflare Access, and the Worker checks the Access token again on every request.</p>
<p><strong>A security.txt file:</strong> If you find a vulnerability, <a href="https://www.modernsecurity.nl/.well-known/security.txt" >/.well-known/security.txt</a> tells you how to report it, following RFC 9116. Fitting for a security blog, and something the old site never had.</p>
<p><strong>A responsible disclosure policy:</strong> The <a href="https://www.modernsecurity.nl/responsible-disclosure/" >Responsible Disclosure</a> page explains what is in scope, what I expect from researchers and what they can expect from me, including a Hall of Fame for everyone who helps make the site safer.</p>
<p><strong>Strict security headers:</strong> Every page is served with a strict Content Security Policy that only allows scripts from the site itself and the few services it really uses, HSTS to force HTTPS, and a rule that stops other sites from loading Modern Security in a frame.</p>
<p><strong>Fewer moving parts:</strong> There is no WordPress admin to attack and no plugin to exploit. The only dynamic parts are the contact form and the comments, each handled by a small Cloudflare Worker. The most important thing to protect is now the GitHub account that publishes the site, so that&rsquo;s where the security effort goes.</p>

<h2 class="relative group">The results
    <div id="the-results" class="anchor"></div>
    
</h2>
<p>After the switch I checked the live site the same way I check a customer environment: measure first, then believe it.</p>
<ul>
<li><strong>PageSpeed Insights (desktop):</strong> 100 for Performance, Accessibility, Best Practices and SEO.</li>
<li><strong>Accessibility:</strong> every article scores 100 in Lighthouse.</li>
<li><strong>Redirects:</strong> about 1,850 permanent redirects send old WordPress addresses, including old image URLs, to their new location. After launch I tested every old address, and none of them ends in a 404.</li>
</ul>

<h2 class="relative group">Writing new articles
    <div id="writing-new-articles" class="anchor"></div>
    
</h2>
<p>Every article is now a Markdown file in a Git repository. I write in VS Code, screenshots go into the same folder as the article, and every change is version-controlled. If I make a mistake, I can roll back. If a reader spots an error, the history shows exactly what changed and when.</p>
<p>For quick fixes away from my laptop, the site is set up for <a href="https://pagescms.org/"  target="_blank" rel="noreferrer">Pages CMS</a>, a simple editor in the browser that commits straight to the repository. When I push a change, Cloudflare builds and publishes the site automatically.</p>

<h2 class="relative group">What I learned
    <div id="what-i-learned" class="anchor"></div>
    
</h2>
<ol>
<li><strong>Audit before you design:</strong> Exporting all URLs and SEO data first made every later decision easier. You can&rsquo;t keep what you never wrote down.</li>
<li><strong>Treat a theme like a dependency:</strong> Pin the version, don&rsquo;t edit it, and keep a list of what you override. Upgrades become a checklist instead of a gamble.</li>
<li><strong>Check the content, not just the pages:</strong> Automated checks on tables and images found problems that had been invisible on the old site for years.</li>
<li><strong>Privacy is a design choice:</strong> Loading nothing before consent was easier to build from scratch than to bolt onto a plugin stack.</li>
<li><strong>Static is a security feature:</strong> The safest login page is the one that isn&rsquo;t on your own server.</li>
</ol>
<p>I&rsquo;ll share real performance numbers (Lighthouse and Core Web Vitals) once the new site has been live for a few weeks. If you notice anything that looks broken or a link that no longer works, please <a href="https://www.modernsecurity.nl/contact-form/" >let me know</a>.</p>

<h2 class="relative group">Sources
    <div id="sources" class="anchor"></div>
    
</h2>
<ul>
<li><a href="https://gohugo.io/documentation/"  target="_blank" rel="noreferrer">Hugo documentation</a> (Hugo)</li>
<li><a href="https://blowfish.page/docs/"  target="_blank" rel="noreferrer">Blowfish documentation</a> (Blowfish)</li>
<li><a href="https://developers.cloudflare.com/workers/static-assets/"  target="_blank" rel="noreferrer">Cloudflare Workers static assets</a> (Cloudflare)</li>
<li><a href="https://developers.cloudflare.com/turnstile/"  target="_blank" rel="noreferrer">Cloudflare Turnstile documentation</a> (Cloudflare)</li>
<li><a href="https://learn.microsoft.com/clarity/setup-and-installation/clarity-consent-api-v2"  target="_blank" rel="noreferrer">Clarity Consent API</a> (Microsoft Learn)</li>
<li><a href="https://www.rfc-editor.org/rfc/rfc9116"  target="_blank" rel="noreferrer">RFC 9116: A File Format to Aid in Security Vulnerability Disclosure</a> (RFC Editor)</li>
<li><a href="https://pagescms.org/"  target="_blank" rel="noreferrer">Pages CMS</a> (Pages CMS)</li>
</ul>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Moving Modern Security from WordPress to Hugo and Blowfish wasn&rsquo;t about chasing a new tool. It was about applying the same principles I write about here to my own site: reduce the attack surface, control what runs, and don&rsquo;t collect more data than you need.</p>
<p>The result is a blog that&rsquo;s faster to maintain, easier to secure and more respectful of your privacy, with every old link still working.</p>
<p>Same content. Same addresses. Far fewer moving parts.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/modern-security-moved-to-hugo-and-blowfish/featured_hu_d9e5466d223133fb.jpg" medium="image" type="image/jpeg" width="1200" height="750"/><enclosure url="https://www.modernsecurity.nl/modern-security-moved-to-hugo-and-blowfish/featured_hu_d9e5466d223133fb.jpg" type="image/jpeg" length="66708"/></item><item><title>Automatic Attack Disruption in Microsoft Defender XDR</title><link>https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/</link><guid isPermaLink="true">https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/</guid><pubDate>Wed, 13 Aug 2025 16:06:47 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Defender XDR</category><category>Security</category><description>Step-by-step guide to implementing Microsoft's Automatic Attack Disruption in Defender XDR, with all the configuration and products needed.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>

<h3 class="relative group">The reality of modern ransomware response
    <div id="the-reality-of-modern-ransomware-response" class="anchor"></div>
    
</h3>
<p>Picture this: It’s 2 AM. Your on-call engineer gets an alert about suspicious activity. By the time they log in, investigate, and start containment procedures, the attackers have already pivoted through three critical servers and begun encrypting your file shares. Sound familiar?</p>
<p>This scenario plays out in organizations worldwide every week. The traditional detect-alert-investigate-respond cycle simply can’t keep pace with modern attack velocities. Human-operated ransomware groups know they have a window, typically 1-3 hours, before security teams mobilize effectively. They exploit this gap ruthlessly.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="low"
    alt="Automatic Attack Disruption XDR M365 Defender"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/autoattackdistruption-graphic-1005.gif"
    width="950"
      height="534"></figure><p><strong>This is where Microsoft’s Attack Disruption fundamentally changes the game.</strong></p>
<p>After implementing Attack Disruption across dozens of enterprise environments over the past two years, I’ve seen firsthand how it transforms incident response from a frantic race against time into a controlled, methodical process. When configured correctly, it reduces attacker dwell time from hours to minutes, automatically containing threats while your team sleeps.</p>
<p>But here’s the catch: getting it right requires meticulous attention to detail across multiple Microsoft Defender products. <em>One misconfiguration, one outdated agent, one missing integration point, and you’re back to manual firefighting.</em></p>
<p>In this guide, I’ll walk you through I ran into from my previous deployments: the configurations that work, the pitfalls to avoid, and the validation steps that ensure your Attack Disruption capability is battle-ready when you need it most.</p>

<h2 class="relative group">Understanding Attack Disruption’s threat coverage
    <div id="understanding-attack-disruptions-threat-coverage" class="anchor"></div>
    
</h2>
<p>Attack Disruption isn’t a silver bullet. It’s a precision tool designed for specific high-impact attack patterns. Understanding exactly what it protects against helps set appropriate expectations and complementary defenses.</p>

<h3 class="relative group">Primary attack vectors addressed
    <div id="primary-attack-vectors-addressed" class="anchor"></div>
    
</h3>
<p>The system excels at disrupting these specific attack types:</p>
<p><strong>Adversary-in-the-middle (AiTM) attacks</strong> – These sophisticated session hijacking attacks bypass MFA by stealing authentication cookies. Attack Disruption identifies the anomalous authentication patterns and immediately suspends compromised accounts. Microsoft has specifically enhanced this capability following recent FIDO downgrade attacks discovered in 2025.</p>
<p><strong>Business Email Compromise (BEC)</strong> – Financial fraud attempts through compromised email accounts trigger rapid containment based on unusual mailbox behavior and suspicious financial communications. With mail bombing attacks now detectable as of June 2025, the system can identify DDoS attempts that often precede BEC attacks.</p>
<p><sub>Example flow of a attack disruption in a BEC attack:</sub></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Diagram of a BEC attack stopped by automatic attack disruption after the account compromise"
    width="944"
    height="398"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/gzdwoh-xqaa-4av_hu_9dabf97a489069d2.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/gzdwoh-xqaa-4av.webp"></figure><p><strong>Human-operated ransomware</strong> – The bread and butter of Attack Disruption. It recognizes hands-on-keyboard patterns, lateral movement attempts, and pre-encryption behaviors, automatically containing affected systems before encryption begins.</p>
<p><sub>Example flow of a attack disruption in STORM-1567:</sub></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Diagram of Storm-1567 Akira ransomware attack stopped by user containment before encryption"
    width="1443"
    height="468"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/fig1-user-contiainment-akira-ransomware_hu_1783b10944bde858.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/fig1-user-contiainment-akira-ransomware.webp"></figure><p><strong>Credential theft and privilege escalation</strong> – When attackers compromise domain admin accounts or attempt privilege escalation, the system responds with immediate account suspension and device isolation.</p>
<p><strong>Multi-stage phishing campaigns</strong> – Complex attack chains targeting high-value assets trigger coordinated responses across email, endpoint, and identity planes.</p>

<h2 class="relative group">The three-stage defense architecture
    <div id="the-three-stage-defense-architecture" class="anchor"></div>
    
</h2>
<p>Attack Disruption operates through a sophisticated correlation engine that processes signals in three distinct stages:</p>

<h3 class="relative group">Stage 1: Multi-vector signal correlation
    <div id="stage-1-multi-vector-signal-correlation" class="anchor"></div>
    
</h3>
<p>The system continuously ingests and correlates telemetry from all deployed Defender products: endpoint behavioral analytics, identity anomalies, email security indicators, and cloud application activity. This cross-product visibility is crucial; isolated signals that seem benign become critical when correlated across domains.</p>

<h3 class="relative group">Stage 2: Compromised asset identification
    <div id="stage-2-compromised-asset-identification" class="anchor"></div>
    
</h3>
<p>Once high-confidence attack patterns emerge, the system maps the attack’s progression across your environment. It identifies not just currently compromised assets but also likely next targets based on lateral movement patterns and attacker TTPs (Tactics, Techniques, and Procedures).</p>

<h3 class="relative group">Stage 3: Automated response execution
    <div id="stage-3-automated-response-execution" class="anchor"></div>
    
</h3>
<p>Based on the threat scope and your configured automation levels, the system executes appropriate containment actions while preserving forensic evidence. These aren’t random isolations. They’re surgical strikes designed to break the attack chain while minimizing business disruption.</p>

<h2 class="relative group">Automated response actions in practice
    <div id="automated-response-actions-in-practice" class="anchor"></div>
    
</h2>
<p>The platform can execute four primary response actions, each serving a specific defensive purpose:</p>
<ul>
<li>
<p><strong>Device containment</strong> isolates compromised endpoints from network communications while maintaining a forensic channel to the Defender portal. I’ve seen this stop ransomware spread in its tracks during active attacks.</p>
</li>
<li>
<p><strong>User account suspension</strong> immediately disables compromised accounts in both Active Directory and Microsoft Entra ID (formerly Azure AD). This is particularly effective against BEC attacks where every minute counts.</p>
</li>
<li>
<p><strong>User containment</strong> provides temporary identity-based blocking that prevents lateral movement without fully disabling accounts, perfect for investigating suspicious but unconfirmed activity.</p>
</li>
<li>
<p><strong>IP address containment</strong> blocks malicious IP addresses associated with command-and-control infrastructure or compromised unmanaged devices attempting network access.</p>
</li>
</ul>

<h2 class="relative group">High-confidence decision making
    <div id="high-confidence-decision-making" class="anchor"></div>
    
</h2>
<p>What sets Attack Disruption apart from basic automated response tools is its sophisticated decision-making framework:</p>
<ul>
<li><strong>Multi-vector convergent analysis</strong> requires corroborating evidence from multiple security domains before taking action</li>
<li><strong>Threat intelligence integration</strong> leverages Microsoft’s visibility into thousands of real-world incidents daily</li>
<li><strong>Advanced AI models</strong> trained on confirmed attack patterns, not just anomalies</li>
<li><strong>Temporal and contextual correlation</strong> understands that certain behaviors together in sequence indicate attacks</li>
</ul>
<p>This multi-layered approach maintains exceptionally low false positive rates, critical for maintaining trust in automation.</p>

<h2 class="relative group">Licensing requirements and architecture
    <div id="licensing-requirements-and-architecture" class="anchor"></div>
    
</h2>

<h3 class="relative group">License requirements
    <div id="license-requirements" class="anchor"></div>
    
</h3>
<p>Full Attack Disruption functionality requires one of these licensing combinations:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Subscription Type</th>
              <th>Coverage</th>
              <th>Best for</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Microsoft 365 E5</strong></td>
            <td>Complete</td>
            <td>Most organizations – best value</td>
        </tr>
        <tr>
            <td><strong>Microsoft 365 A5</strong></td>
            <td>Complete</td>
            <td>Educational institutions</td>
        </tr>
        <tr>
            <td><strong>Microsoft 365 E3 + E5 Security</strong></td>
            <td>Complete</td>
            <td>Organizations with existing E3</td>
        </tr>
        <tr>
            <td><strong>Microsoft 365 A3 + A5 Security</strong></td>
            <td>Complete</td>
            <td>Educational alternative</td>
        </tr>
    </tbody>
  </table>
</div>
<p>Partial coverage options (requiring additional products):</p>
<ul>
<li>Windows 10/11 Enterprise E5</li>
<li>EMS E5</li>
<li>Office 365 E5</li>
</ul>

<h3 class="relative group">Essential product dependencies
    <div id="essential-product-dependencies" class="anchor"></div>
    
</h3>
<p>These four products must all be deployed for complete Attack Disruption coverage:</p>
<ol>
<li><strong>Microsoft Defender for Endpoint Plan 2</strong> – Provides device containment and behavioral analytics</li>
<li><strong>Microsoft Defender for Identity</strong> – Enables Active Directory and Entra ID account suspension</li>
<li><strong>Microsoft Defender for Cloud Apps</strong> – Supplies cloud application signals and OAuth app governance</li>
<li><strong>Microsoft Defender for Office 365 Plan 2</strong> – Delivers email security signals and SafeLinks protection</li>
</ol>
<blockquote><p><em><strong>Missing any component creates coverage gaps that sophisticated attackers will exploit. I don’t dive into how to configure MDE/MDI/MDCA/MDO, below I have added the steps that are often forgotten. Make sure to check them!</strong></em> And again: the wider the deployment, the greater the <em>protection coverage</em> is</p>
</blockquote>
<h2 class="relative group">Permission configuration
    <div id="permission-configuration" class="anchor"></div>
    
</h2>
<p>Proper role assignment ensures your team can manage Attack Disruption effectively:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Role</th>
              <th>Purpose</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Global Administrator</strong></td>
            <td>Full configuration access</td>
        </tr>
        <tr>
            <td><strong>Security Administrator</strong></td>
            <td>Manage Attack Disruption settings</td>
        </tr>
        <tr>
            <td><strong>Security Reader</strong></td>
            <td>View actions and incidents</td>
        </tr>
        <tr>
            <td><strong>Security Operator</strong></td>
            <td>Approve/reject pending actions</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Microsoft Defender for Endpoint configuration (important for HumOR and AiTM)
    <div id="microsoft-defender-for-endpoint-configuration-important-for-humor-and-aitm" class="anchor"></div>
    
</h2>

<h3 class="relative group">Agent version requirements
    <div id="agent-version-requirements" class="anchor"></div>
    
</h3>
<p>When you have deployed Microsoft Defender for Endpoint (MDE), you must verify the minimum Sense Agent version for full functionality is <strong>10.8470</strong>. This version enables the critical “Contain User” action essential for stopping human-operated attacks. Running older versions severely limits your defensive capabilities.</p>
<p>Validate your current deployment with this KQL query:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql"><span class="c1">// Identify devices with outdated agent versions</span>
DeviceInfo
<span class="o">|</span> <span class="k">where</span> Timestamp <span class="o">&gt;</span> <span class="nf">ago</span>(1d)
<span class="o">|</span> <span class="k">where</span> OnboardingStatus <span class="o">==</span> <span class="s">&#34;Onboarded&#34;</span>
<span class="o">|</span> <span class="k">summarize</span> <span class="nf">arg_max</span>(Timestamp, *) <span class="k">by</span> DeviceId
<span class="o">|</span> <span class="k">extend</span> AgentVersionNumber = <span class="nf">toint</span>(<span class="nf">substring</span>(ClientVersion, 0, <span class="nf">indexof</span>(ClientVersion, <span class="s">&#34;.&#34;</span>)))
<span class="o">|</span> <span class="k">where</span> AgentVersionNumber <span class="o">&lt;</span> 10 <span class="k">or</span> (AgentVersionNumber <span class="o">==</span> 10 <span class="k">and</span> 
    <span class="nf">toint</span>(<span class="nf">substring</span>(ClientVersion, <span class="nf">indexof</span>(ClientVersion, <span class="s">&#34;.&#34;</span>) + 1)) <span class="o">&lt;</span> 8470)
<span class="o">|</span> <span class="k">project</span> DeviceName, ClientVersion, OnboardingStatus, OSPlatform
<span class="o">|</span> <span class="k">sort by</span> DeviceName <span class="k">asc</span></code></pre></div>
</div>
<p>Local verification:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Check agent version locally</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-ItemProperty</span> <span class="n">-Path</span> <span class="s1">&#39;Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Advanced Threat Protection\Status&#39;</span> <span class="n">-Name</span> <span class="s2">&#34;MsSenseDllVersion&#34;</span></span></span></code></pre></div></div>

<h3 class="relative group">Device Group automation strategy
    <div id="device-group-automation-strategy" class="anchor"></div>
    
</h3>
<p>Device groups control automation levels across your environment. Strategic configuration balances security effectiveness with business continuity.</p>
<p><strong>Manual configuration steps:</strong></p>
<ol>
<li>Navigate to the Microsoft Defender portal (<a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">https://security.microsoft.com</a>)</li>
<li>Go to <strong>Settings &gt; Endpoints &gt; Permissions &gt; Device groups</strong></li>
<li>Click <strong>+ Add device group</strong></li>
<li>Configure the following settings:
<ul>
<li><strong>Name and description</strong> – Use clear, function-based naming (e.g., “Production Servers – Semi-Auto”)</li>
<li><strong>Automation level</strong> – Choose based on device criticality:</li>
</ul>
</li>
</ol>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Automation level</th>
              <th>Description</th>
              <th>When actions are taken</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Full – remediate threats automatically</strong></td>
            <td>Recommended setting</td>
            <td>Malicious verdicts = automatic remediation</td>
        </tr>
        <tr>
            <td><strong>Semi – require approval for any remediation</strong></td>
            <td>All actions need approval</td>
            <td>All verdicts require manual approval</td>
        </tr>
        <tr>
            <td><strong>Semi – require approval for core folders remediation</strong></td>
            <td>Core system folders protected</td>
            <td>Malicious in system folders = approval needed; elsewhere = automatic</td>
        </tr>
        <tr>
            <td><strong>Semi – require approval for non-temp folders remediation</strong></td>
            <td>Temp folders automated</td>
            <td>Temp folders = automatic; other locations = approval needed</td>
        </tr>
        <tr>
            <td><strong>Semi – require approval for all folders</strong></td>
            <td>Investigation only</td>
            <td>All remediation requires approval</td>
        </tr>
        <tr>
            <td><strong>No automated response</strong></td>
            <td>Not recommended</td>
            <td>No automated investigation or remediation</td>
        </tr>
    </tbody>
  </table>
</div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender endpoint device groups with their automated remediation levels"
    width="1501"
    height="935"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-6_hu_f2cc3213e09e60e8.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-6.webp"></figure>
<h3 class="relative group">Device Discovery configuration
    <div id="device-discovery-configuration" class="anchor"></div>
    
</h3>
<p>Standard discovery mode is essential for Attack Disruption to identify and respond to unmanaged devices attempting network access.</p>
<p><strong>Configuration steps:</strong></p>
<ol>
<li>In the Microsoft Defender portal, go to <strong>Settings &gt; <strong>Device discovery</strong></strong></li>
<li>Ensure <strong>Standard discovery</strong> is enabled (not Basic)</li>
<li>Configure monitored networks as needed</li>
<li>Save changes</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Device discovery settings with Standard discovery enabled"
    width="1490"
    height="889"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-7_hu_85a9d84f85ee2ad8.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-7.webp"></figure><p>Monitor discovery of devices after a bit of time:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql"><span class="c1">// Check for devices that should be onboarded</span>
DeviceInfo 
<span class="o">|</span> <span class="k">summarize</span> <span class="nf">arg_max</span>(Timestamp, *) <span class="k">by</span> DeviceId
<span class="o">|</span> <span class="k">where</span> <span class="k">isempty</span>(MergedToDeviceId)
<span class="o">|</span> <span class="k">where</span> OnboardingStatus <span class="o">==</span> <span class="s">&#34;Can be onboarded&#34;</span>
<span class="o">|</span> <span class="k">project</span> DeviceName, OnboardingStatus, LastSeen = Timestamp, OSPlatform</code></pre></div>
</div>

<h2 class="relative group">Microsoft Defender for Identity configuration (important for hybrid users)
    <div id="microsoft-defender-for-identity-configuration-important-for-hybrid-users" class="anchor"></div>
    
</h2>

<h3 class="relative group">Domain Controller audit requirements
    <div id="domain-controller-audit-requirements" class="anchor"></div>
    
</h3>
<p>Proper audit policies enable Defender for Identity to detect and respond to credential-based attacks. See <a href="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/" >my extensive guide on Defender for Identity</a>, below the important things to keep in mind.</p>
<p><strong>Manual audit configuration via Group Policy:</strong></p>
<ol>
<li>Open Group Policy Management Console on a domain controller</li>
<li>Navigate to <strong>Computer Configuration &gt; Policies &gt; Windows Settings &gt; Security Settings &gt; Advanced Audit Policy Configuration &gt; Audit Policies</strong></li>
<li>Configure the following audit subcategories for Success and Failure:
<ul>
<li><strong>Account Logon &gt; Audit Credential Validation</strong></li>
<li><strong>Account Management &gt; Audit Computer Account Management</strong></li>
<li><strong>Account Management &gt; Audit Distribution Group Management</strong></li>
<li><strong>Account Management &gt; Audit Security Group Management</strong></li>
<li><strong>Account Management &gt; Audit User Account Management</strong></li>
<li><strong>DS Access &gt; Audit Directory Service Changes</strong></li>
<li><strong>DS Access &gt; Audit Directory Service Access</strong></li>
<li><strong>System &gt; Audit Security System Extension</strong></li>
</ul>
</li>
<li>Apply the GPO to all domain controllers</li>
<li>Verify with PowerShell:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Install the Defender for Identity PowerShell module</span>
</span></span><span class="line"><span class="cl"><span class="nb">Install-Module</span> <span class="n">-Name</span> <span class="n">DefenderForIdentity</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Set all required audit configurations</span>
</span></span><span class="line"><span class="cl"><span class="nb">Set-MDIConfiguration</span> <span class="n">-Mode</span> <span class="n">Domain</span> <span class="n">-Configuration</span> <span class="n">All</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Test if all configurations are correct</span>
</span></span><span class="line"><span class="cl"><span class="nb">Test-MDIConfiguration</span> <span class="n">-Mode</span> <span class="n">Domain</span> <span class="n">-Configuration</span> <span class="n">All</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># View current configuration status</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-MDIConfiguration</span> <span class="n">-Mode</span> <span class="n">Domain</span> <span class="n">-Configuration</span> <span class="n">All</span></span></span></code></pre></div></div>

<h3 class="relative group">Action account configuration
    <div id="action-account-configuration" class="anchor"></div>
    
</h3>
<p>Defender for Identity uses the LocalSystem account on domain controllers for automated responses by default. The sensor must be deployed on the DC where Active Directory accounts will be disabled.</p>
<p><strong>Important considerations:</strong></p>
<ul>
<li>Validate that no automation conflicts exist that might re-enable disabled accounts</li>
<li>Ensure the LocalSystem account maintains proper permissions</li>
<li>Test account suspension in a controlled environment first</li>
</ul>
<p>Verify sensor deployment:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Check Defender for Identity sensor service</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-Service</span> <span class="n">-Name</span> <span class="s2">&#34;AATPSensor&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Verify sensor deployment on domain controllers</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-WmiObject</span> <span class="n">-Class</span> <span class="n">Win32_Service</span> <span class="n">-Filter</span> <span class="s2">&#34;Name=&#39;AATPSensor&#39;&#34;</span> <span class="p">|</span> <span class="nb">Select-Object</span> <span class="n">Name</span><span class="p">,</span> <span class="n">State</span><span class="p">,</span> <span class="n">StartMode</span></span></span></code></pre></div></div>

<h3 class="relative group">Entra ID integration
    <div id="entra-id-integration" class="anchor"></div>
    
</h3>
<p>With the rebranding from Azure AD to Microsoft Entra ID, it’s important to understand how Attack Disruption handles different account types:</p>
<p><strong>For hybrid accounts (synced from AD):</strong></p>
<ul>
<li>Defender for Identity disables the on-premises AD account</li>
<li>Attack Disruption also disables the Entra ID synced account</li>
</ul>
<p><strong>For cloud-only accounts (Entra ID native):</strong></p>
<ul>
<li>Attack Disruption disables the account directly in Entra ID</li>
<li>This doesn’t require Defender for Identity deployment</li>
</ul>

<h2 class="relative group">Microsoft Defender for Cloud Apps integration (important for BEC detections)
    <div id="microsoft-defender-for-cloud-apps-integration-important-for-bec-detections" class="anchor"></div>
    
</h2>

<h3 class="relative group">Office 365 Connector configuration
    <div id="office-365-connector-configuration" class="anchor"></div>
    
</h3>
<p>The Office 365 connector provides essential visibility for detecting for example BEC attacks and suspicious OAuth applications.</p>
<p><strong>Detailed setup process:</strong></p>
<ol>
<li>Navigate to the Microsoft Defender portal (<a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">https://security.microsoft.com</a>)</li>
<li>Go to <strong>Settings &gt; Cloud Apps &gt; Connected apps &gt; App connectors</strong></li>
<li>Click <strong>Connect an app</strong> and select <strong>Office 365</strong></li>
<li>In the connection wizard, grant the following permissions:
<ul>
<li>Microsoft Entra Users and groups</li>
<li>Microsoft Entra ID Management events</li>
<li>Microsoft Entra ID Sign-in events</li>
<li>Microsoft Entra ID Apps</li>
<li>Microsoft 365 activities</li>
<li>Microsoft 365 files</li>
</ul>
</li>
<li>Review and accept the permission consent</li>
<li>Verify connection status shows “Connected”</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender for Cloud Apps app connectors with Microsoft 365 and Microsoft Azure connected"
    width="1493"
    height="935"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-9_hu_44cd86c0ed0e4856.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-9.webp"></figure>
<h3 class="relative group">App Governance configuration
    <div id="app-governance-configuration" class="anchor"></div>
    
</h3>
<p>App Governance provides critical OAuth application visibility to detect malicious apps used in attacks. Also for this, <a href="https://www.modernsecurity.nl/oauth-attacks-microsoft-app-governance-mda/" >check my blogpost</a> which I created before, below the short steps to enable it.</p>
<p><strong>Enablement steps:</strong></p>
<ol>
<li>In Microsoft Defender portal, navigate to <strong>Cloud Apps &gt; App governance</strong></li>
<li>If not activated, click <strong>Get started</strong> to enable App Governance</li>
<li>Accept the terms and conditions</li>
<li>Wait for initial discovery (can take 1-2 hours)</li>
<li>Configure OAuth app policies:
<ul>
<li>Go to <strong>Policies &gt; Create policy</strong></li>
<li>Select <strong>OAuth app anomaly detection</strong></li>
<li>Configure thresholds for suspicious app behavior</li>
<li>Enable automatic remediation where appropriate</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="App governance overview in Defender for Cloud Apps with app and incident counts"
    width="1489"
    height="925"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-10_hu_173dce7d2cbd962f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-10.webp"></figure>
<h3 class="relative group">Network requirements update (critical)
    <div id="network-requirements-update-critical" class="anchor"></div>
    
</h3>
<p><strong>Important</strong>: Microsoft has announced critical network requirement changes for Defender for Cloud Apps:</p>
<p><strong>For commercial tenants (by April 29, 2025):</strong></p>
<ul>
<li>Update firewall configurations to allow the new Azure service tags</li>
<li>Add <strong>AzureFrontDoor.MicrosoftSecurity</strong> tag to allowlist</li>
<li>Configure outbound traffic on port 443</li>
</ul>
<p><strong>For GCC/Government Tenants (by August 25, 2025):</strong></p>
<ul>
<li>Allow outbound traffic on port 443 to specified IP ranges</li>
<li>Add Azure Gov service tag <strong>AzureFrontDoor.MicrosoftSecurity</strong></li>
</ul>
<p>Failure to update these configurations will result in service disruption.</p>

<h2 class="relative group">Microsoft Defender for Office 365 configuration (important for AiTM)
    <div id="microsoft-defender-for-office-365-configuration-important-for-aitm" class="anchor"></div>
    
</h2>

<h3 class="relative group">Mailbox auditing
    <div id="mailbox-auditing" class="anchor"></div>
    
</h3>
<p>Enable auditing for all mailboxes to detect attack patterns. The following events must be audited at minimum:</p>
<ul>
<li>MailItemsAccessed (tracks email access patterns)</li>
<li>UpdateInboxRules (detects malicious rule creation)</li>
<li>MoveToDeletedItems (monitors email manipulation)</li>
<li>SoftDelete (tracks email deletion)</li>
<li>HardDelete (tracks permanent deletion)</li>
</ul>
<p><strong>Complete PowerShell configuration:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Connect to Exchange Online</span>
</span></span><span class="line"><span class="cl"><span class="nb">Connect-ExchangeOnline</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Step 1: Enable unified audit log ingestion (for admin actions)</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-AdminAuditLogConfig</span> <span class="p">|</span> <span class="nb">Format-List</span> <span class="n">UnifiedAuditLogIngestionEnabled</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># If False, enable it:</span>
</span></span><span class="line"><span class="cl"><span class="nb">Set-AdminAuditLogConfig</span> <span class="n">-UnifiedAuditLogIngestionEnabled</span> <span class="vm">$true</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Step 2: Enable mailbox auditing by default (for mailbox actions)</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-OrganizationConfig</span> <span class="p">|</span> <span class="nb">Format-List</span> <span class="n">AuditDisabled</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># If True (auditing is disabled), enable it:</span>
</span></span><span class="line"><span class="cl"><span class="nb">Set-OrganizationConfig</span> <span class="n">-AuditDisabled</span> <span class="vm">$false</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Step 3: Configure specific audit events for all mailboxes</span>
</span></span><span class="line"><span class="cl"><span class="nv">$AuditEvents</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;MailItemsAccessed&#34;</span><span class="p">,</span><span class="s2">&#34;UpdateInboxRules&#34;</span><span class="p">,</span><span class="s2">&#34;MoveToDeletedItems&#34;</span><span class="p">,</span><span class="s2">&#34;SoftDelete&#34;</span><span class="p">,</span><span class="s2">&#34;HardDelete&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">Get-Mailbox</span> <span class="n">-ResultSize</span> <span class="n">Unlimited</span> <span class="n">-Filter</span> <span class="s2">&#34;RecipientTypeDetails -eq &#39;UserMailbox&#39;&#34;</span> <span class="p">|</span> 
</span></span><span class="line"><span class="cl">    <span class="nb">ForEach-Object</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="nb">Set-Mailbox</span> <span class="n">-Identity</span> <span class="nv">$_</span><span class="p">.</span><span class="py">Identity</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">            <span class="n">-AuditEnabled</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">            <span class="n">-AuditLogAgeLimit</span> <span class="mf">90</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">            <span class="n">-AuditAdmin</span> <span class="p">(</span><span class="nv">$AuditEvents</span> <span class="n">-join</span> <span class="s2">&#34;,&#34;</span><span class="p">)</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">            <span class="n">-AuditDelegate</span> <span class="p">(</span><span class="nv">$AuditEvents</span> <span class="n">-join</span> <span class="s2">&#34;,&#34;</span><span class="p">)</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">            <span class="n">-AuditOwner</span> <span class="p">(</span><span class="nv">$AuditEvents</span> <span class="n">-join</span> <span class="s2">&#34;,&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Verify configuration</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-Mailbox</span> <span class="n">-ResultSize</span> <span class="mf">10</span> <span class="p">|</span> <span class="nb">Format-List</span> <span class="n">Name</span><span class="p">,</span> <span class="n">AuditEnabled</span><span class="p">,</span> <span class="n">AuditLogAgeLimit</span></span></span></code></pre></div></div>

<h3 class="relative group">SafeLinks policy configuration
    <div id="safelinks-policy-configuration" class="anchor"></div>
    
</h3>
<p>At least one active SafeLinks policy must be configured for Attack Disruption email threat detection.</p>
<p><strong>Manual Configuration Steps:</strong></p>
<ol>
<li>Navigate to Microsoft 365 Defender portal (<a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">https://security.microsoft.com</a>)</li>
<li>Go to <strong>Email &amp; collaboration &gt; Policies &amp; rules &gt; Threat policies &gt; Safe Links</strong></li>
<li>Click <strong>Create</strong> to add a new policy</li>
<li>Configure policy settings:
<ul>
<li><strong>Name</strong>: “Custom – SafeLinks Policy”</li>
<li><strong>URL scanning</strong>: Enable “On: Safe Links checks a list of known, malicious links”</li>
<li><strong>Real-time scanning</strong>: Enable “Apply real-time URL scanning for suspicious links”</li>
<li><strong>Wait for scanning</strong>: Enable “Wait for URL scanning to complete before delivering”</li>
<li><strong>Internal emails</strong>: Enable “Apply Safe Links to email messages sent within the organization”</li>
<li><strong>Click protection</strong>: Enable “Track user clicks”</li>
<li><strong>User override</strong>: Disable “Do not let users click through to original URL”</li>
</ul>
</li>
<li>Configure app protection:
<ul>
<li>Enable Safe Links for <strong>Office 365 applications</strong></li>
<li>Enable Safe Links for <strong>Microsoft Teams</strong></li>
</ul>
</li>
<li>Apply to recipients:
<ul>
<li>Condition: <strong>The recipient domain is</strong></li>
<li>Value: Select all accepted domains</li>
</ul>
</li>
<li>Set priority to <strong>0</strong> (highest)</li>
<li>Review and <strong>Save</strong></li>
</ol>
<p><strong>Configuration and verification via PowerShell:</strong></p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Connect to Security &amp; Compliance PowerShell</span>
</span></span><span class="line"><span class="cl"><span class="nb">Connect-IPPSSession</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Create a new SafeLinks policy</span>
</span></span><span class="line"><span class="cl"><span class="nb">New-SafeLinksPolicy</span> <span class="n">-Name</span> <span class="s2">&#34;Custom - SafeLinks Policy&#34;</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-EnableSafeLinksForEmail</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-EnableSafeLinksForOffice</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-EnableSafeLinksForTeams</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-ScanUrls</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-DeliverMessageAfterScan</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-EnableForInternalSenders</span> <span class="vm">$true</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-AllowClickThrough</span> <span class="vm">$false</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-TrackUserClicks</span> <span class="vm">$true</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Create and apply the SafeLinks rule</span>
</span></span><span class="line"><span class="cl"><span class="nb">New-SafeLinksRule</span> <span class="n">-Name</span> <span class="s2">&#34;Custom - SafeLinks Policy&#34;</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-SafeLinksPolicy</span> <span class="s2">&#34;Custom - SafeLinks Policy&#34;</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-RecipientDomainIs</span> <span class="p">(</span><span class="nb">Get-AcceptedDomain</span><span class="p">).</span><span class="py">Name</span> <span class="p">`</span>
</span></span><span class="line"><span class="cl">    <span class="n">-Enabled</span> <span class="vm">$true</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Verify the policy is active</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-SafeLinksPolicy</span> <span class="n">-Identity</span> <span class="s2">&#34;Custom - SafeLinks Policy&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">Get-SafeLinksRule</span> <span class="n">-Identity</span> <span class="s2">&#34;Custom - SafeLinks Policy&#34;</span></span></span></code></pre></div></div>

<h2 class="relative group">Strategic exclusion management
    <div id="strategic-exclusion-management" class="anchor"></div>
    
</h2>

<h3 class="relative group">User account exclusions
    <div id="user-account-exclusions" class="anchor"></div>
    
</h3>
<p>While the platform allows excluding specific accounts from automated responses, use this capability sparingly. High-value accounts, often targeted in attacks, need maximum protection.</p>
<p><strong>Configure user exclusions:</strong></p>
<ol>
<li>In the Microsoft Defender portal, go to <strong>Settings &gt; Microsoft Defender XDR</strong></li>
<li>Under <strong>Automated response</strong>, select <strong>Identities</strong></li>
<li>Click <strong>Add user exclusion</strong></li>
<li>Enter user account names (UPN format)</li>
<li>Select <strong>Exclude users</strong> to save</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Identity automated response settings with a user added to the exclusion list"
    width="1498"
    height="928"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-1_hu_4076bd3df32614dc.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-1.webp"></figure><p><strong>Appropriate exclusions include:</strong></p>
<ul>
<li>Emergency break-glass accounts (with compensating controls)</li>
<li>Critical service accounts with unique authentication patterns</li>
<li>Test accounts in completely isolated environments</li>
</ul>
<p><strong>Never exclude:</strong></p>
<ul>
<li>C-level executives or VIPs (prime targets for BEC/AiTM)</li>
<li>Domain administrators</li>
<li>Service accounts with broad permissions</li>
</ul>

<h3 class="relative group">Device Group exclusions
    <div id="device-group-exclusions" class="anchor"></div>
    
</h3>
<p>Device exclusions affect both Attack Disruption and broader automated investigation capabilities.</p>
<p><strong>Configuration process:</strong></p>
<ol>
<li>Navigate to <strong>Settings &gt; Microsoft Defender XDR &gt; Automated response &gt; Devices</strong></li>
<li>In the <strong>Device groups</strong> tab, select the group to configure</li>
<li>Choose the appropriate automation level</li>
<li>Document business justification for any “No automated response” settings</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Automation levels for a device group under Devices automated response"
    width="1497"
    height="934"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-2_hu_c86c2e62342485c8.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image-2.webp"></figure>
<h2 class="relative group">Action Center operations
    <div id="action-center-operations" class="anchor"></div>
    
</h2>

<h3 class="relative group">Understanding the Action Center interface
    <div id="understanding-the-action-center-interface" class="anchor"></div>
    
</h3>
<p>The Action Center (<a href="https://security.microsoft.com/action-center"  target="_blank" rel="noreferrer">https://security.microsoft.com/action-center</a>) serves as your command center for Attack Disruption events.</p>
<p><strong>Pending Actions tab:</strong></p>
<ul>
<li>Displays actions awaiting approval in semi-automated scenarios</li>
<li>Provides bulk approval/rejection for similar action types</li>
<li>Shows full incident context and affected assets</li>
<li>Critical for maintaining automated investigation flow</li>
</ul>
<p><strong>History tab:</strong></p>
<ul>
<li>Complete audit trail of all automated actions</li>
<li>Tracks automated investigations and Live Response sessions</li>
<li>Provides ability to undo certain completed actions</li>
<li>Serves as compliance documentation</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Action Center history filtered on attack disruption actions such as Disable User"
    width="1853"
    height="999"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image_hu_8da58c5d6ac825dd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/image.webp"></figure>
<h3 class="relative group">Incident recognition
    <div id="incident-recognition" class="anchor"></div>
    
</h3>
<p>Attack Disruption incidents are easily identifiable through several indicators:</p>
<ol>
<li><strong>Attack Disruption tag</strong> in the incident queue for easy filtering</li>
<li><strong>Yellow banner</strong> at the top of incident pages highlighting automatic actions taken</li>
<li><strong>Asset status indicators</strong> in the incident graph showing contained devices and disabled accounts</li>
<li><strong>(attack disruption)</strong> string added to incident titles via API</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="BEC financial fraud incident in Defender XDR with an account disabled by attack disruption"
    width="1274"
    height="768"
    src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/fig1-auto-attack-disruption_hu_f4a4d5f8ff9910be.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/fig1-auto-attack-disruption.webp"></figure>
<h3 class="relative group">Managing automated responses
    <div id="managing-automated-responses" class="anchor"></div>
    
</h3>
<p>When investigations confirm threats have been remediated, contained assets can be released:</p>
<p><strong>Device release process:</strong></p>
<ol>
<li>Navigate to the incident page or Action Center</li>
<li>Locate the contained device in the incident graph</li>
<li>Click on the device to open asset details</li>
<li>Select <strong>“Release from containment”</strong></li>
<li>Provide business justification</li>
<li>Confirm the release action</li>
</ol>
<p><strong>User account re-enablement:</strong></p>
<ol>
<li>Locate the disabled user account in incident details</li>
<li>Click on the user account</li>
<li>Select <strong>“Enable user”</strong></li>
<li>Provide justification for enablement</li>
<li>Confirm the action</li>
</ol>

<h2 class="relative group">Advanced Monitoring queries
    <div id="advanced-monitoring-queries" class="anchor"></div>
    
</h2>

<h3 class="relative group">Attack Disruption effectiveness
    <div id="attack-disruption-effectiveness" class="anchor"></div>
    
</h3>
<p>List compromised accounts</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">kql
DisruptionAndResponseEvents
<span class="o">|</span> <span class="k">where</span> <span class="k">isnotempty</span>( CompromisedAccountCount)</code></pre></div>
</div>
<p>Show policies applied</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">kql
DisruptionAndResponseEvents
<span class="o">|</span> <span class="k">distinct</span> PolicyName</code></pre></div>
</div>
<p>Show unique ActionTypes</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">kql
DisruptionAndResponseEvents
<span class="o">|</span> <span class="k">distinct</span> ActionType</code></pre></div>
</div>

<h2 class="relative group">Additional resources
    <div id="additional-resources" class="anchor"></div>
    
</h2>
<p><a href="https://learn.microsoft.com/en-us/defender-xdr/automatic-attack-disruption"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/defender-xdr/automatic-attack-disruption</a></p>
<lite-youtube videoid="kH2f8PdDj7A" playlabel="kH2f8PdDj7A" params=""></lite-youtube>


<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Attack Disruption represents a paradigm shift in automated threat response. When properly deployed with all components, Microsoft Entra ID integration, complete Defender product suite, proper network configurations, and comprehensive auditing, it transforms your security posture from reactive to preemptive, containing sophisticated attacks in minutes rather than hours.</p>
<p>Success requires more than just turning on features. It demands:</p>
<ul>
<li>Comprehensive product deployment across all four Defender products</li>
<li>Minimum configuration must contain at least Entra ID data, mailbox auditing, and SafeLinks</li>
<li>Thoughtful automation level selection balancing security and operations</li>
<li>Continuous optimization based on real-world performance</li>
<li>Regular updates to meet evolving network and security requirements</li>
</ul>
<p>The organizations I’ve worked with report dramatic improvements after full implementation: ransomware attacks contained before encryption, BEC attempts stopped before wire transfers, AiTM attacks disrupted before token theft, and lateral movement halted at the first compromised credential.</p>
<p>But perhaps most importantly, their security teams can focus on threat hunting and strategic improvements rather than fighting fires. In an era where attackers operate 24/7 with increasing sophistication, Attack Disruption serves as your organization’s immune system: always on, constantly learning, and ready to respond automatically when threats strike.</p>
<p>As the threat landscape evolves, from FIDO downgrade attacks to OAuth app exploitation, Microsoft continues enhancing Attack Disruption capabilities. Stay engaged with the security community, monitor Microsoft’s security updates, and continuously refine your implementation.</p>
<p>Remember: <em>Attack Disruption isn’t just another security tool. It’s your organization’s automatic defense system, ready to protect your environment when every second counts. Configure it thoughtfully, monitor it diligently, and trust it to protect your organization during those critical moments when human response simply isn’t fast enough.</em></p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/featured_hu_b9a1436ff814a875.jpg" medium="image" type="image/jpeg" width="1200" height="723"/><enclosure url="https://www.modernsecurity.nl/automatic-attack-disruption-defender-xdr/featured_hu_b9a1436ff814a875.jpg" type="image/jpeg" length="78563"/></item><item><title>Selective Isolation in Defender for Endpoint – Combining tools like Velociraptor for DFIR</title><link>https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/</link><guid isPermaLink="true">https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/</guid><pubDate>Sun, 13 Jul 2025 16:05:03 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Defender for Endpoint</category><category>Microsoft Defender XDR</category><category>Security</category><description>Use Microsoft Defender for Endpoint's Selective Isolation with Velociraptor to investigate compromised endpoints remotely, full DFIR without losing access.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>With the <a href="https://techcommunity.microsoft.com/blog/microsoftdefenderatpblog/maintain-connectivity-for-essential-services-with-selective-network-isolation/4422938"  target="_blank" rel="noreferrer">introduction of Selective Isolation</a>, Microsoft Defender for Endpoint has taken a significant step toward more flexible incident response. Instead of fully isolating an endpoint from the network, security teams can now allow specific outbound connections, enabling secure communication with approved services such as a forensic server or response platform.</p>
<p>This development removes a critical blocker for incident responders: the trade-off between containment and investigation. Defender’s own investigation tools, including Live Response and Timeline, provide powerful capabilities. But for deeper forensics, with tools like Velociraptor still offer value: especially in scenarios involving memory analysis, persistence detection, or large-scale artifact collection.</p>
<p>In this article, we explore how Selective Isolation works, what <a href="https://www.modernsecurity.nl/microsoft-defender-for-endpoint/" >Microsoft Defender for Endpoint (MDE)</a> can offer natively, how it can be extended with Velociraptor, and what a modern DFIR process looks like when combining containment with full investigative access.</p>

<h2 class="relative group">Native Defender for Endpoint capabilities
    <div id="native-defender-for-endpoint-capabilities" class="anchor"></div>
    
</h2>
<p>Before considering third-party tooling, it is important to recognize that Microsoft Defender for Endpoint already includes a mature and evolving set of response and investigation capabilities. When a device is onboarded, the following functions become available to security analysts:</p>
<ul>
<li><strong>Device Timeline</strong>: Provides detailed visibility into process execution, file creation, registry activity, and more.</li>
<li><strong>Alert Storyline</strong>: Automatically correlates signals from various components to show attack progression.</li>
<li><strong>Advanced Hunting</strong>: Allows threat analysts to write custom KQL queries across telemetry.</li>
<li><strong>Live Response</strong>: A remote PowerShell-based shell that can retrieve files, kill processes, and execute scripts.</li>
<li><strong>Investigation Graph</strong>: Visualizes relationships between alerts, identities, devices, and evidence.</li>
<li><strong>File and Registry Evidence</strong>: Enables analysts to isolate and inspect malicious binaries and registry modifications.</li>
<li><strong>Integration across XDR</strong>: Correlation with signals from Defender for Identity, Cloud Apps, and Office 365.</li>
</ul>
<p>However, during an active DFIR case, you may encounter situations where critical visibility is missing, and physically retrieving the device is not a viable option when remote investigation is possible. Traditionally, isolating a device for containment meant losing remote access, and the Investigation Package alone was often insufficient. Selective Isolation addresses this limitation by allowing secure connectivity to approved forensic tools during containment.</p>

<h2 class="relative group">Selective Isolation: overview and modes
    <div id="selective-isolation-overview-and-modes" class="anchor"></div>
    
</h2>
<p>Selective Isolation is a network containment feature within Defender for Endpoint that allows administrators to restrict all outbound traffic <strong>except</strong> specific destinations required for investigation or remediation.</p>
<p>Unlike traditional full isolation, which only permits communication with Microsoft security services, Selective Isolation introduces configurable allowlists for IP addresses <a href="https://learn.microsoft.com/en-us/defender-endpoint/isolation-exclusions"  target="_blank" rel="noreferrer">and more</a>.</p>
<p>Microsoft formally introduced Selective Isolation in June 2025 in public preview, and it is available to all customers with Microsoft Defender for Endpoint Plan 2 or via Microsoft 365 E5 licensing.</p>

<h2 class="relative group">Supported modes
    <div id="supported-modes" class="anchor"></div>
    
</h2>
<p>There are currently two modes of network isolation available:</p>
<ul>
<li><strong>Full Isolation</strong>: All outbound traffic is blocked except communication with Microsoft Defender backend services.</li>
<li><strong>Selective Isolation</strong>: Communication is blocked except to destinations defined by the organization in an isolation exclusion profile.</li>
</ul>
<p>Selective Isolation enables secure interaction with:</p>
<ul>
<li>Internal forensic servers (e.g., Velociraptor)</li>
<li>SOAR or IR orchestration platforms</li>
<li>Secure file repositories or cloud storage</li>
<li>Internal services such as revocation servers or proxies</li>
</ul>

<h2 class="relative group">Configuration and application of Selective Isolation
    <div id="configuration-and-application-of-selective-isolation" class="anchor"></div>
    
</h2>
<p>Implementing Selective Isolation requires a small number of preparatory steps. Once configured, it becomes an operational tool during containment or escalation procedures.</p>

<h3 class="relative group">Step 1: Enable Isolation exclusion rules
    <div id="step-1-enable-isolation-exclusion-rules" class="anchor"></div>
    
</h3>
<ol>
<li>Log into the <strong>Microsoft 365 Defender portal</strong></li>
<li>Navigate to <strong>Settings → Endpoints → Advanced Features</strong></li>
<li>Enable <strong>Isolation Exclusion Rules</strong> and <strong>Live Response unsigned script execution</strong> (or else you have to sign the PS1 files later on – which is better ofcourse 🙁 )</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Selective Isolation Velociraptor MDE Defender for Endpoint"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-1_hu_b3425c188dd21115.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-1.webp"></figure><p>This enables the option to apply Selective Isolation and define custom allowlists.</p>

<h3 class="relative group">Step 2: Create an exclusion profile
    <div id="step-2-create-an-exclusion-profile" class="anchor"></div>
    
</h3>
<ol>
<li>Navigate to <strong>Settings → Endpoints → Isolation Exclusion</strong> <strong>Rules</strong></li>
<li>Click <strong>Add device isolation exclusion</strong> (make sure to add an inbound and outbound rule to your server IP which we create in the steps below)</li>
<li>Provide a clear name (e.g., <code>velociraptor-access-policy</code>)</li>
<li>Define one or more destinations:
<ul>
<li>IP addresses (e.g., <code>10.1.2.10</code>)</li>
</ul>
</li>
<li>Save the policy</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Adding an isolation exclusion rule named velociraptor-access-policy for outbound traffic"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-2_hu_231e2a311f7cde21.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-2.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Isolation exclusion rule successfully created"
    width="2000"
    height="1079"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-3_hu_472e4c8d360a1b72.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-3.webp"></figure>
<h3 class="relative group">Step 3: Apply isolation with exclusion
    <div id="step-3-apply-isolation-with-exclusion" class="anchor"></div>
    
</h3>
<ol>
<li>Go to <strong>Device inventory</strong> and select the affected endpoint</li>
<li>Choose <strong>Isolate Device</strong> from the action menu</li>
<li>Select <strong>Isolation</strong> <strong>Exclusions</strong> to be allowed</li>
<li>Confirm</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Isolate Device action in the device page of the Defender portal"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-4_hu_42c61f8bc0cc54c8.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-4.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Isolate computer dialog with the option to use isolation exclusions"
    width="2000"
    height="1081"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-5_hu_d48bb7ceef6151f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-5.webp"></figure><p>The device will be isolated from all other network activity except the explicitly defined destinations.</p>

<h3 class="relative group">Step 4: Validate behavior
    <div id="step-4-validate-behavior" class="anchor"></div>
    
</h3>
<p>Once isolated, validate the configuration:</p>
<ul>
<li>The device will appear as <strong>Isolated</strong></li>
<li>Live Response remains available</li>
<li>Connectivity to defined destinations should succeed</li>
<li>Other network activity will be blocked</li>
</ul>
<p>This isolation mode preserves investigation access without allowing lateral movement or external communication.</p>

<h2 class="relative group">Extending DFIR with Velociraptor
    <div id="extending-dfir-with-velociraptor" class="anchor"></div>
    
</h2>
<p>Velociraptor is an open-source DFIR platform that complements Defender for Endpoint by providing deep forensic visibility. It enables memory acquisition, advanced artifact collection, and persistent hunt capability at scale.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Cartoon dinosaur with two pistols, a nod to Velociraptor"
    width="1024"
    height="1024"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-10_hu_13965c91718285cd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-10.webp"><figcaption>Yeah lets post a stupid AI picture too</figcaption></figure><p>While Defender for Endpoint offers excellent detection and triage, Velociraptor adds:</p>
<ul>
<li>Memory dumps and YARA scanning</li>
<li>Collection of Amcache, Prefetch, MFT, and Registry artifacts</li>
<li>In-memory malware detection and process forensics</li>
<li>Live artifact scheduling across multiple endpoints</li>
<li>Persistence across reboots and sessions</li>
</ul>
<p>When paired with Selective Isolation, Velociraptor can continue to operate securely on an endpoint under containment.</p>

<h2 class="relative group">Deploying Velociraptor for use with isolated endpoints
    <div id="deploying-velociraptor-for-use-with-isolated-endpoints" class="anchor"></div>
    
</h2>
<p>There are several ways to deploy Velociraptor in a secure and scalable manner. One notable example is a project by <strong>Eric Mannon</strong>, who developed a clean and efficient Azure-based Velociraptor deployment method that avoids the need for a persistent VM.</p>
<p>This approach is ideal for scalable and ephemeral deployments in modern cloud environments. You can even use his <a href="https://github.com/msdirtbag/MDEAutomator"  target="_blank" rel="noreferrer">MDEAutomator</a> to push the files to Live Response.</p>
<p>More information can be found on his GitHub repository and LinkedIn article:</p>
<ul>
<li><strong>GitHub</strong>: <a href="https://github.com/msdirtbag/azurevelo"  target="_blank" rel="noreferrer">link</a></li>
<li><strong>LinkedIn:</strong> <a href="https://www.linkedin.com/posts/ericmanon_velociraptor-dfir-azure-activity-7178038809747333120-xpB9/"  target="_blank" rel="noreferrer">link</a></li>
</ul>
<p>In this blog, however, I will do a traditional legacy lame VM-based deployment. That can be used for environments that require or prefer direct control over server infrastructure.</p>

<h2 class="relative group">Server Deployment
    <div id="server-deployment" class="anchor"></div>
    
</h2>
<ol>
<li>Deploy a Linux virtual machine (tested with Ubuntu 24.10)</li>
<li>Paste the script below and make sure to chmod +x it and run (beware I <em>hardcoded</em> the lastest version as of per july 2025)</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="cp">#!/usr/bin/env bash
</span></span></span><span class="line"><span class="cl"><span class="nb">set</span> -euo pipefail
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nv">VR_BIN</span><span class="o">=</span><span class="s2">&#34;/usr/local/bin/velociraptor&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">VR_USER</span><span class="o">=</span><span class="s2">&#34;velociraptor&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">VR_CONFIG</span><span class="o">=</span><span class="s2">&#34;/etc/velociraptor/server.config.yaml&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">VR_SERVICE</span><span class="o">=</span><span class="s2">&#34;/etc/systemd/system/velociraptor.service&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Installing curl&#34;</span>
</span></span><span class="line"><span class="cl">apt-get update -y
</span></span><span class="line"><span class="cl">apt-get install -y curl
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Creating Velociraptor user if not exists&#34;</span>
</span></span><span class="line"><span class="cl">id -u <span class="s2">&#34;</span><span class="nv">$VR_USER</span><span class="s2">&#34;</span> <span class="p">&amp;</span>&gt;/dev/null <span class="o">||</span> useradd -r -s /usr/sbin/nologin <span class="s2">&#34;</span><span class="nv">$VR_USER</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Downloading Velociraptor v0.74.5&#34;</span>
</span></span><span class="line"><span class="cl">curl -L -o <span class="s2">&#34;</span><span class="nv">$VR_BIN</span><span class="s2">&#34;</span> https://github.com/Velocidex/velociraptor/releases/download/v0.74/velociraptor-v0.74.5-linux-amd64
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Validating binary&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> ! file <span class="s2">&#34;</span><span class="nv">$VR_BIN</span><span class="s2">&#34;</span> <span class="p">|</span> grep -q <span class="s2">&#34;ELF 64-bit&#34;</span><span class="p">;</span> <span class="k">then</span>
</span></span><span class="line"><span class="cl">    <span class="nb">echo</span> <span class="s2">&#34;[✗] Invalid Velociraptor binary&#34;</span>
</span></span><span class="line"><span class="cl">    rm -f <span class="s2">&#34;</span><span class="nv">$VR_BIN</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="nb">exit</span> <span class="m">1</span>
</span></span><span class="line"><span class="cl"><span class="k">fi</span>
</span></span><span class="line"><span class="cl">chmod <span class="m">755</span> <span class="s2">&#34;</span><span class="nv">$VR_BIN</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Generating server config&#34;</span>
</span></span><span class="line"><span class="cl">mkdir -p <span class="s2">&#34;</span><span class="k">$(</span>dirname <span class="s2">&#34;</span><span class="nv">$VR_CONFIG</span><span class="s2">&#34;</span><span class="k">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="s2">&#34;</span><span class="nv">$VR_BIN</span><span class="s2">&#34;</span> config generate &gt; <span class="s2">&#34;</span><span class="nv">$VR_CONFIG</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Setting permissions&#34;</span>
</span></span><span class="line"><span class="cl">chown -R <span class="s2">&#34;</span><span class="nv">$VR_USER</span><span class="s2">:</span><span class="nv">$VR_USER</span><span class="s2">&#34;</span> /etc/velociraptor
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Creating systemd service&#34;</span>
</span></span><span class="line"><span class="cl">cat &gt;<span class="s2">&#34;</span><span class="nv">$VR_SERVICE</span><span class="s2">&#34;</span> <span class="s">&lt;&lt;EOF
</span></span></span><span class="line"><span class="cl"><span class="s">[Unit]
</span></span></span><span class="line"><span class="cl"><span class="s">Description=Velociraptor DFIR Server
</span></span></span><span class="line"><span class="cl"><span class="s">After=network.target
</span></span></span><span class="line"><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="cl"><span class="s">[Service]
</span></span></span><span class="line"><span class="cl"><span class="s">Type=simple
</span></span></span><span class="line"><span class="cl"><span class="s">User=$VR_USER
</span></span></span><span class="line"><span class="cl"><span class="s">Group=$VR_USER
</span></span></span><span class="line"><span class="cl"><span class="s">ExecStart=$VR_BIN -c $VR_CONFIG frontend -v
</span></span></span><span class="line"><span class="cl"><span class="s">Restart=on-failure
</span></span></span><span class="line"><span class="cl"><span class="s">LimitNOFILE=20000
</span></span></span><span class="line"><span class="cl"><span class="s">
</span></span></span><span class="line"><span class="cl"><span class="s">[Install]
</span></span></span><span class="line"><span class="cl"><span class="s">WantedBy=multi-user.target
</span></span></span><span class="line"><span class="cl"><span class="s">EOF</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[+] Starting Velociraptor&#34;</span>
</span></span><span class="line"><span class="cl">systemctl daemon-reload
</span></span><span class="line"><span class="cl">systemctl <span class="nb">enable</span> --now velociraptor
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">echo</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;[✓] Velociraptor is running!&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;    Web UI (no TLS): http://</span><span class="k">$(</span>hostname -I <span class="p">|</span> awk <span class="s1">&#39;{print $1}&#39;</span><span class="k">)</span><span class="s2">:8889&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s2">&#34;    Agent check-in:  http://</span><span class="k">$(</span>hostname -I <span class="p">|</span> awk <span class="s1">&#39;{print $1}&#39;</span><span class="k">)</span><span class="s2">:8000&#34;</span></span></span></code></pre></div></div>
<ol start="3">
<li>Edit the Config yaml: <code>nano /etc/velociraptor/server.config.yaml</code></li>
<li>Configure GUI and Frontend <code>bind_address</code> to <code>0.0.0.0</code> and change the <code>bind_</code>port to 8443 (I had to change the default port for a specific reason – you can leave as default too)</li>
<li>Change the Client <code>server_urls</code> to your URL and check if the correct port is used too (8443 in my case)</li>
<li><a href="https://docs.velociraptor.app/blog/2024/2024-07-22-how-to-use-your-own-certificates/"  target="_blank" rel="noreferrer">Define custom SSL certificates and change it too as per following link</a> (by default you get a self signed SSL)</li>
<li>Save the yaml file</li>
<li>Add an admin account: <code>./velociraptor --config server.config.yaml user add admin P@ss123 --role administrator</code></li>
<li>Restart Velociraptor: <code>sudo systemctl restart velociraptor</code></li>
<li>Check the logs in case Velociraptor can’t run: <code>/usr/local/bin/velociraptor -c /etc/velociraptor/server.config.yaml frontend -v</code></li>
</ol>

<h2 class="relative group">Agent Deployment (on isolated device)
    <div id="agent-deployment-on-isolated-device" class="anchor"></div>
    
</h2>
<p>Follow the steps below to manually install the agent on the isolated endpoint. For an automated approach you can use the <a href="https://learn.microsoft.com/en-us/defender-endpoint/api/run-live-response"  target="_blank" rel="noreferrer">Live Response API</a> too.</p>
<ol>
<li>First grab the client.root.config.yaml from the Velociraptor portal, by logging in with the admin account created above and save the config as client.config.yaml:</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Velociraptor admin page with the client.root.config.yaml download"
    width="2000"
    height="1076"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image_hu_4c44ad38cd25a726.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image.webp"></figure><ol start="2">
<li>Download the corresponding .msi file (<a href="https://github.com/Velocidex/velociraptor/releases/download/v0.74/velociraptor-v0.74.5-windows-amd64.msi"  target="_blank" rel="noreferrer">velociraptor-vx.xx.x-windows-amd64.msi</a>) <a href="https://github.com/Velocidex/velociraptor/releases"  target="_blank" rel="noreferrer">from here</a> and save it as velociraptor.msi (you can also wrap a bundle yourself through <a href="https://docs.velociraptor.app/docs/deployment/clients/"  target="_blank" rel="noreferrer">this link</a>)</li>
<li>Create a fresh powershell and name it like install_velociraptor.ps1 with the code below:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Paths</span>
</span></span><span class="line"><span class="cl"><span class="nv">$MsiPath</span> <span class="p">=</span> <span class="s2">&#34;C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads\velociraptor.msi&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$ConfigPath</span> <span class="p">=</span> <span class="s2">&#34;C:\ProgramData\Microsoft\Windows Defender Advanced Threat Protection\Downloads\client.config.yaml&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">Write-Output</span> <span class="s2">&#34;---- Velociraptor MSI installation initiated ----&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Step 1: Copy config to the expected location</span>
</span></span><span class="line"><span class="cl"><span class="nv">$ConfigDest</span> <span class="p">=</span> <span class="s2">&#34;C:\Program Files\Velociraptor\client.config.yaml&#34;</span>
</span></span><span class="line"><span class="cl"><span class="k">if</span> <span class="p">(!(</span><span class="nb">Test-Path</span> <span class="s2">&#34;C:\Program Files\Velociraptor&#34;</span><span class="p">))</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="nb">New-Item</span> <span class="n">-Path</span> <span class="s2">&#34;C:\Program Files\Velociraptor&#34;</span> <span class="n">-ItemType</span> <span class="n">Directory</span> <span class="n">-Force</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="nb">Copy-Item</span> <span class="n">-Path</span> <span class="nv">$ConfigPath</span> <span class="n">-Destination</span> <span class="nv">$ConfigDest</span> <span class="n">-Force</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Step 2: Install the MSI silently</span>
</span></span><span class="line"><span class="cl"><span class="nb">Start-Process</span> <span class="n">msiexec</span><span class="p">.</span><span class="py">exe</span> <span class="n">-ArgumentList</span> <span class="s2">&#34;/i </span><span class="se">`&#34;</span><span class="nv">$MsiPath</span><span class="se">`&#34;</span><span class="s2"> /qn&#34;</span> <span class="n">-Wait</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Step 3: Start the service</span>
</span></span><span class="line"><span class="cl"><span class="nb">Start-Service</span> <span class="n">-Name</span> <span class="n">velociraptor</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">Write-Output</span> <span class="s2">&#34;Velociraptor installed and service started.&#34;</span></span></span></code></pre></div></div>
<ol start="4">
<li>Now upload the install_velociraptor.ps1, client.config.yaml and velociraptor.msi via Live Response and submit:</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Uploading a file to the live response library during a live response session"
    width="2000"
    height="1077"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-6_hu_a2674abf80dea468.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-6.webp"></figure><ol start="5">
<li><a href="https://learn.microsoft.com/en-us/defender-endpoint/live-response-command-examples"  target="_blank" rel="noreferrer">Start a Live Response session</a> and type putfile and the filenames, to download them onto the device:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">putfile velociraptor.msi
</span></span><span class="line"><span class="cl">putfile client.config.yaml
</span></span><span class="line"><span class="cl">putfile install_velociraptor.ps1</span></span></code></pre></div></div>
<ol start="6">
<li>Now start the Powershell file to install the MSI (I’m using the MSI to be able to install the service and gain persistency):</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Live response running install_velociraptor.ps1, which installs the MSI and starts the service"
    width="2000"
    height="222"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-7_hu_19ab19f6c0ccc7a6.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-7.webp"></figure><ol start="7">
<li>At this point if you check the Timeline in MDE, the events start popping up:</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Device timeline showing Velociraptor connecting to its server while the device is isolated"
    width="1729"
    height="197"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-8_hu_ab3709ce036ad17b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-8.webp"></figure><ol start="8">
<li>From my setup I can interact with my isolated endpoint and do all the fancy stuff now 🙂</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Velociraptor collecting scheduled tasks from the isolated endpoint"
    width="2000"
    height="1079"
    src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-9_hu_c7cc1fff704c1723.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/image-9.webp"></figure>
<h2 class="relative group">Using Velociraptor
    <div id="using-velociraptor" class="anchor"></div>
    
</h2>
<p>I’m not going to dive in how you can use Velociraptor, I recommend going through these docs and video:</p>
<p><a href="https://training.velociraptor.app"  target="_blank" rel="noreferrer">https://training.velociraptor.app</a></p>
<p>And make sure to <a href="https://github.com/EricZimmerman/KapeFiles"  target="_blank" rel="noreferrer">check KAPE too</a></p>
<lite-youtube videoid="ibl4-MzW-KI" playlabel="ibl4-MzW-KI" params=""></lite-youtube>


<h2 class="relative group">Practical use cases
    <div id="practical-use-cases" class="anchor"></div>
    
</h2>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Scenario</th>
              <th>MDE + Live Response</th>
              <th>Velociraptor</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Memory dump</td>
            <td>✖</td>
            <td>✔</td>
        </tr>
        <tr>
            <td>Shimcache, Amcache</td>
            <td>✖</td>
            <td>✔</td>
        </tr>
        <tr>
            <td>YARA scan (memory/disk)</td>
            <td>✖</td>
            <td>✔</td>
        </tr>
        <tr>
            <td>Registry and autoruns</td>
            <td>✔ (limited)</td>
            <td>✔</td>
        </tr>
        <tr>
            <td>Event log timeline</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td>Multi-endpoint hunt</td>
            <td>✔ (AH)</td>
            <td>✔</td>
        </tr>
        <tr>
            <td>Persistent session (DFIR)</td>
            <td>✖</td>
            <td>✔</td>
        </tr>
    </tbody>
  </table>
</div>
<p>Combined, these tools provide layered insight without lifting containment.</p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Selective Isolation introduces a meaningful improvement to containment and investigation in Microsoft Defender for Endpoint. Where previously an isolated endpoint was also inaccessible to responders, we now have the ability to safely maintain access to critical tools such as Velociraptor or Live Response.</p>
<p>Security operations teams can confidently apply isolation without compromising forensic capability. Defender provides strong triage and analysis features natively, while Velociraptor extends the response lifecycle into memory analysis, execution tracing, and attacker behavior correlation.</p>
<p>For organizations dealing with modern threats, this combination enables rapid containment, effective root cause investigation, and informed remediation, without delay or exposure.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/featured_hu_d4429d58fad27cfb.jpg" medium="image" type="image/jpeg" width="1200" height="800"/><enclosure url="https://www.modernsecurity.nl/mde-selective-isolation-velociraptor/featured_hu_d4429d58fad27cfb.jpg" type="image/jpeg" length="70940"/></item><item><title>Integrating Microsoft Defender EASM with Exposure Management</title><link>https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/</link><guid isPermaLink="true">https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/</guid><pubDate>Mon, 23 Jun 2025 10:40:15 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Defender XDR</category><description>Integrate Microsoft Defender EASM with Exposure Management to enrich attack paths with external risk data and strengthen your posture.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>Microsoft has taken another step in closing the gap between internal risk and external exposure. With the June 2025 public preview release of <strong>Microsoft Defender External Attack Surface Management (EASM)</strong> integration into <strong>Defender Exposure Management</strong>, organizations can now analyze attacker pathways that begin <em>outside</em> the enterprise perimeter.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Illustration of the external attack surface around an organization"
    width="1920"
    height="1080"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/external-attack-tbmnl-en-us_hu_c3892487a8bf819c.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/external-attack-tbmnl-en-us.webp"></figure><p>This addition enables a more realistic, end-to-end understanding of exploitable risks, bringing external visibility directly into the risk modeling engine of Microsoft Defender XDR. In this guide, in addition to my earlier posts about <a href="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/" >Defender EASM</a> and <a href="https://www.modernsecurity.nl/microsoft-security-exposure-management/" >Exposure Management</a>, I walk through how this integration works, what it unlocks, how to enable it, and what to look out for when validating the setup.</p>

<h2 class="relative group">From internal misconfigurations to external threat vectors
    <div id="from-internal-misconfigurations-to-external-threat-vectors" class="anchor"></div>
    
</h2>
<p>Traditional exposure management has largely focused on the internal environment: devices, identities, configurations, and software vulnerabilities. While these remain foundational, the increasing complexity of digital footprints means that <strong>external exposures</strong>, publicly accessible assets, misconfigured services, and shadow IT, pose an equally significant risk.</p>
<p>Microsoft Defender EASM is designed to continuously discover and monitor an organization’s public-facing assets, such as:</p>
<ul>
<li>Untracked or legacy subdomains</li>
<li>Exposed endpoints (e.g., RDP, VPN, or admin portals)</li>
<li>Expired or weak TLS certificates</li>
<li>Public cloud assets or services configured without proper access control</li>
</ul>
<p>By integrating this data into <strong>Defender Exposure Management</strong>, security teams gain the ability to <strong>prioritize and remediate exposures</strong> that attackers are most likely to exploit.</p>

<h2 class="relative group">What this integration enables
    <div id="what-this-integration-enables" class="anchor"></div>
    
</h2>
<p>The integration between EASM and Exposure Management introduces several critical capabilities:</p>
<ul>
<li>
<p><strong>Unified visibility across surfaces</strong><br>
Previously siloed views of internal and external risk are now converged in a single pane of glass, enabling defenders to take action with complete context.</p>
</li>
<li>
<p><strong>Attack Path enrichment</strong><br>
External assets discovered by EASM are now included in attack path modeling within Defender Exposure Management. This allows for the identification of realistic exploitation scenarios beginning from internet-facing infrastructure.</p>
</li>
<li>
<p><strong>Risk-based prioritization</strong><br>
Exposure paths involving externally accessible services, especially those lacking MFA, endpoint protection, or conditional access, are now scored with higher severity, ensuring the most exploitable risks are surfaced.</p>
</li>
</ul>

<h2 class="relative group">How it works: a technical perspective
    <div id="how-it-works-a-technical-perspective" class="anchor"></div>
    
</h2>
<p>At the core of this integration is Microsoft’s threat intelligence pipeline, which now ingests telemetry from Defender EASM and correlates it with internal signals across Entra ID, Defender for Endpoint, and Microsoft 365.</p>
<p>The process is fully automated:</p>
<ol>
<li><strong>EASM continuously discovers external assets</strong> using DNS resolution, certificate analysis, and passive fingerprinting.</li>
<li><strong>Exposure Management ingests EASM findings</strong> into its graph-based risk engine.</li>
<li><strong>Correlations are established</strong> between public-facing assets and internal objects (identities, devices, configurations).</li>
<li><strong>Attack paths are recalculated</strong> to reflect real-world attacker entry points.</li>
</ol>
<p>No additional agents, scripts, or connectors are required.</p>

<h2 class="relative group">Licensing and prerequisites
    <div id="licensing-and-prerequisites" class="anchor"></div>
    
</h2>
<p>Before you begin, ensure the following conditions are met:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Requirement</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Microsoft Defender EASM</strong></td>
            <td>Active EASM workspace with validated domains and discovered assets</td>
        </tr>
        <tr>
            <td><strong>Microsoft Defender XDR</strong></td>
            <td>Exposure Management (Preview) must be enabled in the tenant</td>
        </tr>
        <tr>
            <td><strong>License requirements</strong></td>
            <td>Microsoft 365 E5 + EASM (standalone or bundled license)</td>
        </tr>
        <tr>
            <td><strong>Same tenant</strong></td>
            <td>EASM workspace must be associated with the same Entra tenant as Defender XDR</td>
        </tr>
        <tr>
            <td><strong>Public preview availability</strong></td>
            <td>Feature is available in supported regions as of June 2025</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Step-by-step guide
    <div id="step-by-step-guide" class="anchor"></div>
    
</h2>
<p>This guide explains how to integrate your Microsoft Defender EASM workspace into the Exposure Management experience in Microsoft Defender XDR.</p>

<h3 class="relative group">Step 1 – Open Exposure Management in Defender XDR
    <div id="step-1-open-exposure-management-in-defender-xdr" class="anchor"></div>
    
</h3>
<ol>
<li>Go to the <a href="https://security.microsoft.com/"  target="_blank" rel="noreferrer">Microsoft 365 Defender portal</a></li>
<li>In the left-hand menu, select <strong>Exposure management</strong></li>
<li>Under <strong>Key initiatives</strong>, locate <strong>External Attack Surface Protection</strong></li>
<li>Click <strong>Open initiative page</strong></li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="External Attack Surface Protection initiative in Exposure Management with no data yet"
    width="1827"
    height="975"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-4_hu_d1b5a83eb5e52f8e.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-4.webp"></figure>
<h3 class="relative group">Step 2 – Connect EASM data to the initiative
    <div id="step-2-connect-easm-data-to-the-initiative" class="anchor"></div>
    
</h3>
<ol>
<li>In the initiative view, click <strong>Connect data to see initiative details</strong></li>
<li>Choose one of the following options:
<ul>
<li><strong>Connect your MDEASM workspace</strong></li>
<li><strong>Search for your organization’s pre-built footprint</strong></li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="EASM  Exposure Management"
    width="1829"
    height="975"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-5_hu_4ec69d2209f963bc.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-5.webp"></figure>
<h3 class="relative group">Step 3 – Fill in workspace details (if applicable)
    <div id="step-3-fill-in-workspace-details-if-applicable" class="anchor"></div>
    
</h3>
<p>If you choose to connect a workspace:</p>
<ul>
<li>Enter the following:
<ul>
<li><strong>Resource name</strong> (e.g., <code>secmanagementeasmprd001</code>)</li>
<li><strong>Subscription ID</strong></li>
<li><strong>Resource group name</strong></li>
<li><strong>Region</strong></li>
</ul>
</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Connecting a Defender EASM workspace to the External Attack Surface Protection initiative"
    width="1827"
    height="975"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-6_hu_e71d94e8f7f48932.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-6.webp"></figure><p>If using the pre-built option:</p>
<ul>
<li>Enter your organization’s name</li>
</ul>
<p>Click <strong>Connect</strong> to finalize the integration</p>

<h3 class="relative group">Step 4 – Wait for data ingestion
    <div id="step-4-wait-for-data-ingestion" class="anchor"></div>
    
</h3>
<ul>
<li>A notification will confirm the configuration was successful</li>
<li>It may take up to <strong>32 hours</strong> for data to populate within the initiative</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Notifications confirming the configuration was saved and data will appear within about 32 hours"
    width="878"
    height="417"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-7_hu_eb6afdb7ee31bf0f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-7.webp"></figure><ul>
<li>Once complete, EASM data will enrich the <strong>External Attack Surface Protection</strong> dashboard with information:</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="External Attack Surface Protection initiative at 73 percent with EASM and network recommendations"
    width="1932"
    height="1122"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-8_hu_fb52feb8f7c7044a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-8.webp"></figure>
<h3 class="relative group">Step 5 – Review security metrics
    <div id="step-5-review-security-metrics" class="anchor"></div>
    
</h3>
<ol>
<li>In the <strong>External Attack Surface Protection</strong> initiative, go to the <strong>Security metrics</strong> tab</li>
<li>Review metrics such as:
<ul>
<li>Assets allowing remote access</li>
<li>Recently expired SSL certificates</li>
<li>Expired domains</li>
<li>Internet-facing assets with critical CVEs</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Security metrics of the External Attack Surface Protection initiative"
    width="1932"
    height="1122"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-9_hu_baf2a93b99c63677.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-9.webp"></figure><p>Each metric will show progress, affected asset count, and remediation state</p>

<h3 class="relative group">Step 6 – Check security recommendations
    <div id="step-6-check-security-recommendations" class="anchor"></div>
    
</h3>
<ol>
<li>Navigate to the <strong>Security recommendations</strong> tab</li>
<li>Review actionable recommendations such as:
<ul>
<li>Replace weak certificates (e.g., SHA1)</li>
<li>Reclaim expired domains</li>
<li>Remove public remote access</li>
<li>Remediate exposed high-severity CVEs</li>
</ul>
</li>
</ol>
<p>Click on any recommendation for remediation steps and affected asset details</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Security recommendations of the External Attack Surface Protection initiative"
    width="1932"
    height="1122"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-10_hu_8fc5ec76e397618f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-10.webp"></figure>
<h3 class="relative group">Step 7 – View affected assets
    <div id="step-7-view-affected-assets" class="anchor"></div>
    
</h3>
<ol>
<li>From any metric or recommendation, switch to the <strong>Affected assets</strong> tab</li>
<li>Confirm:
<ul>
<li>Asset type (e.g., IP address, domain)</li>
<li>Last seen timestamp</li>
<li>Severity and impact</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Affected assets for the metric assets allowing remote access"
    width="1932"
    height="1122"
    src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-11_hu_132e9722cc0bd604.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/image-11.webp"></figure><p>You can export this list or use it to plan mitigation</p>

<h2 class="relative group">Attack Paths and example scenarios enabled by the integration
    <div id="attack-paths-and-example-scenarios-enabled-by-the-integration" class="anchor"></div>
    
</h2>

<h3 class="relative group">Explore Attack Paths
    <div id="explore-attack-paths" class="anchor"></div>
    
</h3>
<ol>
<li>Go to <strong>Exposure management &gt; Attack paths</strong> (outside the initiative page)</li>
<li>Filter by:
<ul>
<li>Entry point: External</li>
<li>Signal source: External Attack Surface Management</li>
</ul>
</li>
<li>Identify if any paths link:
<ul>
<li>External assets → exposed service → identity → privilege escalation</li>
</ul>
</li>
</ol>
<p>Here are some realistic use cases that become visible after the integration:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Scenario</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Legacy web admin portal</strong></td>
            <td>An untracked admin subdomain is publicly exposed. The linked service uses an expired TLS cert and leads to a backend server with no endpoint protection</td>
        </tr>
        <tr>
            <td><strong>Unmanaged cloud asset</strong></td>
            <td>A forgotten Azure Web App is exposed via a verified domain and linked to an Entra ID identity without Conditional Access</td>
        </tr>
        <tr>
            <td><strong>Shadow IT domain</strong></td>
            <td>EASM discovers a new subdomain with an open port. That system communicates with internal infrastructure and can be reached without authentication</td>
        </tr>
        <tr>
            <td><strong>Guest user access</strong></td>
            <td>A guest account in Entra has permissions on an externally accessible application discovered by EASM</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Known limitations (preview)
    <div id="known-limitations-preview" class="anchor"></div>
    
</h2>
<p>As of the June 2025 public preview, note the following:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Limitation</th>
              <th>Detail</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Partial regional availability</strong></td>
            <td>Not all tenants may have access immediately</td>
        </tr>
        <tr>
            <td><strong>UI improvements ongoing</strong></td>
            <td>Path visualizations are improving but may not show full context in all cases</td>
        </tr>
        <tr>
            <td><strong>Asset linking</strong></td>
            <td>Some public assets may not resolve correctly if ownership or DNS metadata is incomplete</td>
        </tr>
        <tr>
            <td><strong>No backfill</strong></td>
            <td>EASM data is used prospectively. It does not retroactively enrich old attack paths</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Extra resources
    <div id="extra-resources" class="anchor"></div>
    
</h2>
<p><a href="https://learn.microsoft.com/en-us/security-exposure-management/whats-new"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/security-exposure-management/whats-new</a></p>
<p><a href="https://learn.microsoft.com/en-us/security-exposure-management/external-attack-surface-management-initiative"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/security-exposure-management/external-attack-surface-management-initiative</a></p>
<p><a href="https://learn.microsoft.com/en-us/security-exposure-management/integration-licensing"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/security-exposure-management/integration-licensing</a></p>
<p><a href="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/microsoft-security-insider-cyberthreat-minute-infographic-9-1-22.pdf" >Download</a></p>

<h2 class="relative group">Final thoughts
    <div id="final-thoughts" class="anchor"></div>
    
</h2>
<p>As someone who regularly advises organizations on exposure management, this integration is the most strategic improvement Microsoft has released this year. It aligns your visibility with the attacker’s perspective and moves beyond the internal bubble most tooling still lives in.</p>
<p>For security teams working with Defender XDR and EASM, enabling this is low-effort and high-impact. And if you haven’t explored Microsoft Exposure Management yet, this is a compelling reason to start. Seeing your attack surface as an attacker would is no longer optional. It’s foundational :).</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/featured_hu_435e6b2a34f94737.jpg" medium="image" type="image/jpeg" width="1200" height="697"/><enclosure url="https://www.modernsecurity.nl/integrate-defender-easm-exposure-management/featured_hu_435e6b2a34f94737.jpg" type="image/jpeg" length="79881"/></item><item><title>Stopping malicious Browser Extensions with Microsoft Defender TVM and Intune</title><link>https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/</link><guid isPermaLink="true">https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/</guid><pubDate>Wed, 16 Apr 2025 14:00:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Defender XDR</category><description>Learn how to manage and block risky browser extensions using Microsoft Defender TVM, and Intune. Protect your users from modern browser threats.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>Browser extensions have quietly evolved into one of the most dangerous and overlooked attack vectors in modern enterprise environments. What started as simple tools for productivity or convenience now often function as fully-fledged malware: capable of harvesting data, hijacking sessions, and persisting through identity tokens and cloud sync.</p>
<p>We’ve seen a sharp rise in advanced threats hidden in extensions that appear legitimate. Some exploit OAuth permissions to maintain persistent access to Microsoft 365 environments. Others load malicious scripts only when specific conditions are met, like visiting a login page or opening a corporate web app. Many abuse the trust placed in browser extension ecosystems.</p>
<p>This blog post provides a few examples how to manage browser extension risk using <a href="https://www.modernsecurity.nl/microsoft-defender-xdr/" >Microsoft Defender Vulnerability Management (TVM)</a>, Microsoft Defender for Endpoint (MDE), and Intune. It offers some guidance, examples, and detection tactics that you can immediately apply to harden your environment.</p>

<h2 class="relative group">Common threats posed by malicious browser extensions
    <div id="common-threats-posed-by-malicious-browser-extensions" class="anchor"></div>
    
</h2>
<p>Malicious or poorly managed browser extensions can lead to a wide range of security and compliance issues:</p>
<ul>
<li><strong>Data exfiltration:</strong> Many extensions request broad permissions (like access to all websites) which can be abused to harvest sensitive information including cookies, passwords, and session tokens. This is particularly concerning for enterprise environments handling confidential data.</li>
<li><strong>Session hijacking and credential theft:</strong> Extensions may inject JavaScript into web pages to intercept user credentials during login or hijack sessions by stealing authentication tokens.</li>
<li><strong>AI-powered threats and plugin blind spots:</strong> With the rapid rise of AI-enhanced plugins, including those for LLMs like ChatGPT or copilots integrated in browsers, we are witnessing new risks:
<ul>
<li>Extensions that use AI for productivity can generate, analyze, and leak sensitive context.</li>
<li>LLM-enhanced plugins might dynamically alter content or provide deceptive outputs.</li>
<li>Organizations often lose visibility into these tools due to rapid user adoption, poor audit logging, and unverified code origins.</li>
</ul>
</li>
<li><strong>Unauthorized lateral movement:</strong> Malicious extensions can exfiltrate browser data to command and control (C2) servers, from which adversaries escalate privileges or move laterally across an environment.</li>
<li><strong>Persistence via OAuth abuse:</strong> Some extensions exploit OAuth permissions to maintain persistent, often silent access to a user’s Microsoft 365 or Google Workspace account, even after password resets.</li>
</ul>
<p>Only in the beginning of 2025 there have been already plenty reported malicious browser extensions:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Extension / Campaign</th>
              <th>Attack Type</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Cyberhaven Extension</td>
            <td>Supply Chain / OAuth Abuse</td>
            <td>Legit extension compromised post-release. Injected content scripts at <code>document_start</code>, harvested Facebook OAuth tokens, cookies, and form data.</td>
        </tr>
        <tr>
            <td>Blipshot</td>
            <td>Data Theft / Script Injection</td>
            <td>Screenshot tool updated to exfiltrate data to C2 via injected remote JavaScript.</td>
        </tr>
        <tr>
            <td>WAToolkit</td>
            <td>Session Hijacking</td>
            <td>WhatsApp Web companion hijacked to steal sessions and redirect users.</td>
        </tr>
        <tr>
            <td>Emojis Emoji Keyboard</td>
            <td>Credential Stealing</td>
            <td>Re-uploaded with new permissions to extract user credentials and clipboard data.</td>
        </tr>
        <tr>
            <td>Color Changer (YouTube)</td>
            <td>Tracking / Redirect Injection</td>
            <td>Hijacked to inject tracking scripts and monetize search traffic through redirects.</td>
        </tr>
        <tr>
            <td>Video Effects for YouTube</td>
            <td>Data Exfiltration / Ad Fraud</td>
            <td>Previously benign extension modified to serve custom ads and skim affiliate revenue.</td>
        </tr>
        <tr>
            <td>GraphQL Network Inspector</td>
            <td>Credential Theft / Token Logging</td>
            <td>Fake dev tool extracting network data, tokens, and cookies from major cloud services.</td>
        </tr>
        <tr>
            <td>Operation RedDirection (Cluster)</td>
            <td>Tracking / Ad Fraud</td>
            <td>18 extensions (color pickers, VPNs, emoji tools) used to track URLs and inject ads. Estimated 2.3M users affected.</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">OAuth-based attacks and extension exploitation
    <div id="oauth-based-attacks-and-extension-exploitation" class="anchor"></div>
    
</h2>
<p>OAuth is a secure delegation protocol, but its misuse is increasingly being weaponized by attackers. The pas few months we’ve seen some interesting cases with OAuth attacks, which lead to serious issues.</p>
<p>Common exploitation patterns include:</p>
<ul>
<li>
<p><strong>Fake extension pairing:</strong> Extensions can present themselves as benign tools (e.g., productivity or translation apps) but request OAuth permissions to data not related to their declared function.</p>
</li>
<li>
<p><strong>Consent phishing:</strong> Threat actors craft OAuth apps impersonating trusted platforms, tricking users into granting high-privilege access like Mail.ReadWrite, Files.Read.All, or even offline_access. Once consent is granted, the attacker has persistent access.</p>
</li>
<li>
<p><strong>Token reuse and refresh exploits:</strong> Malicious apps can refresh tokens automatically, retaining access for long periods. When combined with browser-based access, this undermines even strong identity policies.</p>
</li>
</ul>

<h2 class="relative group">Threat &amp; Vulnerability Management (TVM) for browser extensions
    <div id="threat-vulnerability-management-tvm-for-browser-extensions" class="anchor"></div>
    
</h2>
<p>Microsoft Defender’s TVM provides organizations with real-time visibility into browser extensions installed across their network.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender TVM malicious browser extensions"
    width="1443"
    height="674"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/mdvm-asset_hu_985b79dcafe93976.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/mdvm-asset.webp"></figure><p>Key features include:</p>
<ul>
<li><strong>Comprehensive extension inventory:</strong> A centralized list of all browser extensions detected within the organization.</li>
<li><strong>Risk assessment:</strong> Evaluation of each extension’s risk level based on permissions requested and observed behaviors.</li>
<li><strong>Permission analysis:</strong> Detailed insights into the specific permissions each extension requires and their potential security implications.</li>
<li><strong>Usage monitoring:</strong> Tracking of extension deployment across devices, including user-specific installation data.</li>
</ul>
<p>This comprehensive assessment enables organizations to make informed decisions about which extensions to allow or block, enhancing overall security posture.</p>

<h2 class="relative group">Prerequisites
    <div id="prerequisites" class="anchor"></div>
    
</h2>
<p>Before stepping into Defender TVM, make sure you’ve met the following prerequisites:</p>

<h3 class="relative group">Licenses
    <div id="licenses" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Feature</th>
              <th>Requirement</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>TVM for browser extensions</td>
            <td>Included in Microsoft Defender Vulnerability Management (Add-on)</td>
        </tr>
        <tr>
            <td>Defender for Endpoint integration</td>
            <td>Required (Plan 2 or Microsoft 365 E5)</td>
        </tr>
        <tr>
            <td>Advanced hunting with Defender XDR</td>
            <td>Microsoft 365 Defender (E5 or Defender for Endpoint P2)</td>
        </tr>
        <tr>
            <td>Intune policy management</td>
            <td>Intune via Microsoft 365 E3/E5 or EMS</td>
        </tr>
        <tr>
            <td><a href="https://www.modernsecurity.nl/oauth-attacks-microsoft-app-governance-mda/" >App Governance (optional)</a></td>
            <td>Included in Microsoft 365 E5 or Microsoft Defender for Cloud Apps</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Technical prerequisites
    <div id="technical-prerequisites" class="anchor"></div>
    
</h3>
<ul>
<li>Devices must be onboarded into Microsoft Defender for Endpoint</li>
<li>Defender sensor must be actively running and reporting</li>
<li>Minimum supported OS: Windows 10 1809+</li>
<li>Supported browsers: Microsoft Edge / Google Chrome</li>
<li>Chrome requires cloud sync and Chrome ADMX or ExtensionSettings policy</li>
</ul>

<h3 class="relative group">Required permissions
    <div id="required-permissions" class="anchor"></div>
    
</h3>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td>Portal</td><td>Role Required</td></tr><tr><td>Microsoft Defender portal</td><td>Security Reader / Security Admin / Global Admin</td></tr><tr><td>Microsoft Intune portal</td><td>Intune Admin / Policy &amp; Profile Manager</td></tr><tr><td>Microsoft Entra portal</td><td>App Administrator (for OAuth app consent investigation)</td></tr><tr><td>Microsoft Defender for Cloud Apps</td><td>Security Reader or Admin</td></tr></tbody></table>
</div>

<h2 class="relative group">Step-by-Step: Accessing and using the browser extensions inventory
    <div id="step-by-step-accessing-and-using-the-browser-extensions-inventory" class="anchor"></div>
    
</h2>
<ol>
<li><strong>Sign in to the Microsoft Defender portal:</strong>
<ul>
<li>Navigate to <a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Defender</a></li>
</ul>
</li>
<li><strong>Access the browser extensions inventory:</strong>
<ul>
<li>Go to <strong>Endpoints &gt; Vulnerability Management &gt; Inventories</strong></li>
<li>Click on the <strong>Browser extensions</strong> tab</li>
</ul>
</li>
<li><strong>Review the extension data:</strong>
<ul>
<li>Review the list of extensions, including names, browser types, number of installations, enabled status, and associated risk levels.</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Browser extensions inventory in Defender Vulnerability Management with permission risk levels"
    width="2000"
    height="998"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-14_hu_406025434b5c008b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-14.webp"></figure><ol start="4">
<li><strong>Investigate a high-risk extension:</strong>
<ul>
<li>Click on a high-risk extension to view:
<ul>
<li>Risk justification</li>
<li>Permissions used</li>
<li>Publisher information</li>
<li>List of affected devices</li>
</ul>
</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Extension details of a critical-risk browser extension in Defender Vulnerability Management"
    width="938"
    height="552"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-17_hu_13a96194f8a57caa.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-17.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Permissions requested by a browser extension with their risk levels"
    width="933"
    height="742"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-16_hu_aec132675fa16ec4.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-16.webp"></figure><ol start="5">
<li><strong>Export the inventory:</strong>
<ul>
<li>Use the export button to download data for reporting or offline analysis.</li>
</ul>
</li>
<li><strong>Remediation actions:</strong>
<ul>
<li>Tag devices for follow-up</li>
<li>Open a security task</li>
<li>Assign to a remediation team or automation rule</li>
</ul>
</li>
</ol>

<h2 class="relative group">Advanced Hunting with Kusto Query Language (KQL)
    <div id="advanced-hunting-with-kusto-query-language-kql" class="anchor"></div>
    
</h2>
<p>Advanced hunting enables security analysts to proactively search for threats and vulnerabilities related to browser extensions using KQL:</p>

<h3 class="relative group">Example: Top 100 critical browser extensions with the most critical permissions required
    <div id="example-top-100-critical-browser-extensions-with-the-most-critical-permissions-required" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">DeviceTvmBrowserExtensions
<span class="o">|</span> <span class="k">where</span> ExtensionRisk <span class="o">==</span> <span class="s">&#34;Critical&#34;</span>
<span class="o">|</span> <span class="k">summarize</span> TotalExtentions = <span class="k">count</span>(), ExtentionNames = <span class="nf">make_set</span>(ExtensionName) <span class="k">by</span> DeviceId
<span class="o">|</span> <span class="k">join</span> DeviceInfo <span class="k">on</span> DeviceId
<span class="o">|</span> <span class="k">project</span> DeviceName, TotalExtentions, ExtentionNames
<span class="o">|</span> <span class="k">top</span> 100 <span class="k">by</span> TotalExtentions</code></pre></div>
</div>
<p>Source: <a href="https://www.kqlsearch.com/query/Browserextension%20-%20Top100mostpermissiveextensionsinstalled&amp;clmo2b18x00btmc0jdkxnawh6"  target="_blank" rel="noreferrer">KQL Search</a></p>

<h3 class="relative group">Example: Top 100 devices with the most browser extensions installed
    <div id="example-top-100-devices-with-the-most-browser-extensions-installed" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">DeviceTvmBrowserExtensions
<span class="o">|</span> <span class="k">summarize</span>
     TotalExtensions = <span class="nf">dcount</span>(ExtensionId),
     ExtensionNames = <span class="nf">make_set</span>(ExtensionName)
     <span class="k">by</span> DeviceId
<span class="o">|</span> <span class="k">join</span> DeviceInfo <span class="k">on</span> DeviceId
<span class="o">|</span> <span class="k">project</span> DeviceName, TotalExtensions, ExtensionNames
<span class="o">|</span> <span class="k">top</span> 100 <span class="k">by</span> TotalExtensions</code></pre></div>
</div>
<p>Source: <a href="https://www.kqlsearch.com/query/Browserextension%20-%20Top100deviceswiththemostbrowserextensions&amp;clmo2awib00brmc0jgvbo6q8b"  target="_blank" rel="noreferrer">KQL Search</a></p>

<h3 class="relative group">Example: Classifying browser extension by type and risk severity
    <div id="example-classifying-browser-extension-by-type-and-risk-severity" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql"><span class="k">let</span> Browser_Extension_info = <span class="k">externaldata</span>(browser_extension:string ,metadata_category:string ,metadata_type:string ,metadata_link:string ,metadata_comment:string)[<span class="s">@&#34;https://raw.githubusercontent.com/mthcht/awesome-lists/refs/heads/main/Lists/Browser%20Extensions/browser_extensions_list.csv&#34;</span>] <span class="k">with</span> (format=<span class="s">&#34;csv&#34;</span>, ignoreFirstRecord=True);
Browser_Extension_info
<span class="o">|</span> <span class="k">join</span> <span class="k">kind</span>= <span class="k">inner</span> (DeviceTvmBrowserExtensions) <span class="k">on</span> $left.browser_extension <span class="o">==</span> $right.ExtensionName
<span class="o">|</span> <span class="k">project</span> metadata_type, Extension_Group= browser_extension, Severity= metadata_link, metadata_comment, DeviceId, ExtensionDescription, ExtensionVersion</code></pre></div>
</div>
<p>Source: <a href="https://www.kqlsearch.com/query/Classifying%20Browser%20Extension%20By%20Type%20And%20Risk%20Severity&amp;cm47qq2md007ymc0ldul8ipna"  target="_blank" rel="noreferrer">KQL Search</a></p>

<h3 class="relative group">Example: Identify browser extensions with “Can turnoff malware protections” permissions in endpoints with no tamper protection
    <div id="example-identify-browser-extensions-with-can-turnoff-malware-protections-permissions-in-endpoints-with-no-tamper-protection" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql"><span class="k">let</span> BrowserExtMalwareProtectionKB = DeviceTvmBrowserExtensionsKB
    <span class="o">|</span> <span class="k">where</span> PermissionName <span class="k">contains</span> <span class="s">&#34;Can turn off malware protections&#34;</span>
    <span class="o">|</span> <span class="k">project</span> ExtensionId, ExtensionName, ExtensionRisk, PermissionName;
<span class="k">let</span> BrowserExtMalwareProtection = DeviceTvmBrowserExtensions
    <span class="o">|</span> <span class="k">project</span> ExtensionId, DeviceId;
<span class="k">let</span> DeviceWoTamperProtection = DeviceTvmSecureConfigurationAssessment
    <span class="o">|</span> <span class="k">where</span> ConfigurationId <span class="k">has</span> <span class="s">&#34;scid-2003&#34;</span>
    <span class="o">|</span> <span class="k">where</span> IsCompliant <span class="o">==</span> <span class="s">&#34;0&#34;</span>
    <span class="o">|</span> <span class="k">where</span> IsApplicable <span class="o">==</span> <span class="s">&#34;1&#34;</span>
    <span class="o">|</span> <span class="k">project</span> DeviceId, DeviceName, OSPlatform, Timestamp;
<span class="k">union</span> BrowserExtMalwareProtection, BrowserExtMalwareProtectionKB,
        DeviceWoTamperProtection
    <span class="o">|</span> <span class="k">summarize</span> <span class="k">by</span> ExtensionId, DeviceId
    <span class="o">|</span> <span class="k">join</span> ( BrowserExtMalwareProtectionKB ) <span class="k">on</span> ExtensionId
    <span class="o">|</span> <span class="k">join</span> <span class="k">kind</span>=<span class="k">rightouter</span> ( BrowserExtMalwareProtection ) <span class="k">on</span> ExtensionId
    <span class="o">|</span> <span class="k">join</span> ( DeviceWoTamperProtection ) <span class="k">on</span> DeviceId
    <span class="o">|</span> <span class="k">summarize</span> DeviceCount=<span class="nf">dcount</span>(DeviceName), <span class="nf">arg_max</span>(Timestamp, *) <span class="k">by</span> ExtensionName, ExtensionRisk
    <span class="o">|</span> <span class="k">sort by</span> DeviceCount <span class="k">asc</span>, ExtensionRisk</code></pre></div>
</div>
<p>Source: <a href="https://www.kqlsearch.com/query/Identify-endpoint-browser-extensions-with-can-turnoff-malware-protections-permissions&amp;cm0fef3z500mymc0pg0a0nfhb"  target="_blank" rel="noreferrer">KQL Search</a></p>

<h3 class="relative group">Example: Query the installed extensions with the most required permissions
    <div id="example-query-the-installed-extensions-with-the-most-required-permissions" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql"><span class="k">let</span> ExtentionsWithNotification = DeviceTvmBrowserExtensionsKB
     <span class="o">|</span> <span class="k">where</span> PermissionId <span class="k">contains</span> <span class="s">&#34;Notification&#34;</span>
     <span class="o">|</span> <span class="k">summarize</span> <span class="nf">make_set</span>(ExtensionId) <span class="k">by</span> ExtensionId;
DeviceTvmBrowserExtensions
<span class="o">|</span> <span class="k">where</span> ExtensionId <span class="k">in</span> (ExtentionsWithNotification)
<span class="o">|</span> <span class="k">distinct</span> DeviceId, ExtensionName
<span class="o">|</span> <span class="k">summarize</span> TotalInstalledDevices = <span class="k">count</span>() <span class="k">by</span> ExtensionName
<span class="o">|</span> <span class="k">sort by</span> TotalInstalledDevices</code></pre></div>
</div>
<p>Source: <a href="https://www.kqlsearch.com/query/Browserextension%20-%20Installedextensionswithnotificationpermissions&amp;clmo2am9800bnmc0jgzb5t7em"  target="_blank" rel="noreferrer">KQL Search</a></p>
<p>For more queries, visit the <a href="https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-query-language"  target="_blank" rel="noreferrer">Advanced Hunting documentation</a>.</p>

<h2 class="relative group">Step-by-Step: Controlling browser extensions with Microsoft Intune
    <div id="step-by-step-controlling-browser-extensions-with-microsoft-intune" class="anchor"></div>
    
</h2>
<p>Microsoft Intune allows administrators to enforce policies that control browser extension installations across an organization:</p>

<h3 class="relative group">Blocking Google Chrome Extensions
    <div id="blocking-google-chrome-extensions" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Open the Microsoft Intune Admin Center:</strong>
<ul>
<li>Go to <a href="https://endpoint.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Intune Admin Center</a></li>
</ul>
</li>
<li><strong>Create a Configuration Profile:</strong>
<ul>
<li>Navigate to <strong>Devices &gt; Configuration profiles</strong></li>
<li>Click on <strong>+ Create profile</strong></li>
<li>Choose <strong>Platform: Windows 10 and later</strong></li>
<li>Profile Type: <strong>Settings catalog</strong></li>
</ul>
</li>
<li><strong>Add Settings:</strong>
<ul>
<li>In the Settings picker, search for <strong>Google Chrome\Extensions</strong></li>
<li>Select <strong>Configure extension installation blocklist</strong></li>
</ul>
</li>
<li><strong>Block All Extensions:</strong>
<ul>
<li>Enable the setting</li>
<li>Add a wildcard (<code>*</code>) to block all Chrome extensions</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Intune settings picker configuring the Google Chrome extension installation blocklist"
    width="2000"
    height="996"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-19_hu_5c5c24512ed423ae.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-19.webp"></figure>
<h3 class="relative group">Allow Specific Chrome Extensions (Exceptions)
    <div id="allow-specific-chrome-extensions-exceptions" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Modify or create a policy as above</strong></li>
<li><strong>Add Settings:</strong>
<ul>
<li>Search and add:
<ul>
<li><strong>Configure extension installation allow list</strong></li>
<li><strong>Extension IDs to exempt from the blocklist (device)</strong></li>
</ul>
</li>
</ul>
</li>
<li><strong>Enable Allow List:</strong>
<ul>
<li>Add extension IDs (from Chrome Web Store URL)</li>
<li>One ID per rule (e.g., <code>nngceckbapebfimnlniiiahkandclblb</code>)</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Intune profile exempting a Google Chrome extension ID from the blocklist"
    width="2000"
    height="998"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-20_hu_6e0a7b449b0c68ee.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-20.webp"></figure>
<h3 class="relative group">Blocking Microsoft Edge Extensions
    <div id="blocking-microsoft-edge-extensions" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Open the Microsoft Intune Admin Center:</strong>
<ul>
<li>Go to <a href="https://endpoint.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Intune Admin Center</a></li>
</ul>
</li>
<li><strong>Create a Configuration Profile:</strong>
<ul>
<li>Navigate to <strong>Devices &gt; Configuration profiles</strong></li>
<li>Click on <strong>+ Create profile</strong></li>
<li>Choose <strong>Platform: Windows 10 and later</strong></li>
<li>Profile Type: <strong>Settings catalog</strong></li>
</ul>
</li>
<li><strong>Configure Extension Settings for Microsoft Edge:</strong>
<ul>
<li>In the Settings picker, search for <strong>Microsoft Edge\Extensions</strong></li>
<li>Add settings like:
<ul>
<li><strong>Control which extensions cannot be installed</strong> (blocklist)</li>
</ul>
</li>
</ul>
</li>
<li><strong>Deploy the Policy:</strong>
<ul>
<li>Assign the profile to the appropriate user/device groups</li>
<li>Monitor deployment status under <strong>Device status</strong></li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Intune profile controlling which Microsoft Edge extensions cannot be installed"
    width="2000"
    height="997"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-21_hu_13c91e67b6d7d96f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-21.webp"></figure><p>And the same goes for allowing ID’s to be installed:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Intune profile allowing specific Microsoft Edge extensions to be installed"
    width="2000"
    height="997"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-22_hu_32b479606591def9.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-22.webp"></figure>
<h2 class="relative group">Block Extensions via MDE Custom Detection
    <div id="block-extensions-via-mde-custom-detection" class="anchor"></div>
    
</h2>
<p>We can also block extensions through MDE and Indicators, but for first for that we need to know a bit more about the anatomy of an extension:</p>
<p>A standard browser extension is packaged as a <code>.crx</code> (Chrome Extension) file, which is essentially a ZIP archive. It typically contains:</p>
<ul>
<li><strong><code>manifest.json</code></strong> – The core configuration file defining the extension’s metadata, permissions, scripts, and runtime behavior.</li>
<li><strong>Content scripts</strong> – JavaScript files injected into webpages to interact with the DOM.</li>
<li><strong>Background scripts</strong> – Run persistently or event-driven in the background (e.g., <code>background.js</code> or <code>worker.js</code>).</li>
<li><strong>UI elements</strong> – HTML/CSS for popups or browser buttons.</li>
<li><strong>Assets</strong> – Icons, images, localization files, and sometimes configuration files (like <code>config.txt</code>).</li>
</ul>
<p>When installed, extensions are stored locally under the user’s profile:</p>
<ul>
<li>On <strong>Windows</strong>:<br>
<code>C:\Users\&lt;username&gt;\AppData\Local\Google\Chrome\User Data\Default\Extensions\&lt;extension-id&gt;</code></li>
<li>On <strong>macOS</strong>:<br>
<code>~/Library/Application Support/Google/Chrome/Default/Extensions/</code></li>
<li>On <strong>Microsoft Edge</strong>:<br>
Similar path under <code>Microsoft\Edge\User Data</code></li>
</ul>
<p>Once installed, the browser evaluates the <code>manifest.json</code>, grants permissions (like <code>tabs</code>, <code>cookies</code>, <code>storage</code>), and loads content or background scripts accordingly.</p>
<p>So…. if we hunt for .crx files we can lookup the SHA1 hashes and block them:</p>
<ol>
<li><strong>Open the Microsoft 365 Defender Portal:</strong>
<ul>
<li>Go to <a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">https://security.microsoft.com</a></li>
</ul>
</li>
<li><strong>Use Advanced Hunting:</strong>
<ul>
<li>Navigate to <strong>Hunting &gt; Advanced Hunting</strong></li>
<li>Use the table: <code>DeviceFileEvents</code></li>
</ul>
</li>
<li><strong>Apply Query to Detect Malicious Extensions:</strong>
<ul>
<li>Use this query example by Steven Lim: <a href="https://github.com/SlimKQL/Hunting-Queries-Detection-Rules/blob/main/DefenderXDR/Hunting%20Malicious%20Chrome%20Extension.kql"  target="_blank" rel="noreferrer">GitHub KQL – Malicious Chrome Extension Detection</a></li>
</ul>
</li>
<li><strong>Create Custom Detection Rule:</strong>
<ul>
<li>When detection is matched, trigger remediation</li>
<li>Action: <strong>Block SHA1 hash</strong> or create alert</li>
</ul>
</li>
<li><strong>Apply block on detection:</strong>
<ul>
<li>Configure automated response settings</li>
<li>Suitable for organizations not using TVM add-on</li>
</ul>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Custom detection rule automated action blocking and quarantining a file by SHA1"
    width="1554"
    height="858"
    src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-24_hu_80c831a972df55fe.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/image-24.webp"></figure>
<h2 class="relative group">Recommendations
    <div id="recommendations" class="anchor"></div>
    
</h2>
<ul>
<li>Monitor new browser plugins, especially those involving <strong>AI or LLM tools</strong></li>
<li>Perform regular browser extension reviews via <strong>TVM Inventory</strong></li>
<li>Detect risky behavior using <strong>KQL + advanced hunting</strong></li>
<li>Enforce restrictions using <strong>Microsoft Intune</strong>, <strong>GPO</strong>, or <strong>MDE Indicators</strong></li>
<li>Conduct OAuth permission reviews through <strong>App Governance</strong></li>
</ul>

<h2 class="relative group">Additional resources
    <div id="additional-resources" class="anchor"></div>
    
</h2>
<ul>
<li><a href="https://gitlab-com.gitlab.io/gl-security/security-tech-notes/threat-intelligence-tech-notes/malicious-browser-extensions-feb-2025/"  target="_blank" rel="noreferrer">https://gitlab-com.gitlab.io/gl-security/security-tech-notes/threat-intelligence-tech-notes/malicious-browser-extensions-feb-2025/</a></li>
<li><a href="https://blog.pulsedive.com/compromised-browser-extensions-a-growing-threat-vector/"  target="_blank" rel="noreferrer">https://blog.pulsedive.com/compromised-browser-extensions-a-growing-threat-vector/</a></li>
<li><a href="https://arstechnica.com/security/2025/01/dozens-of-backdoored-chrome-extensions-discovered-on-2-6-million-devices/"  target="_blank" rel="noreferrer">https://arstechnica.com/security/2025/01/dozens-of-backdoored-chrome-extensions-discovered-on-2-6-million-devices/</a></li>
<li><a href="https://blog.sekoia.io/targeted-supply-chain-attack-against-chrome-browser-extensions/"  target="_blank" rel="noreferrer">https://blog.sekoia.io/targeted-supply-chain-attack-against-chrome-browser-extensions/</a></li>
</ul>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Malicious browser extensions are no longer just annoying adware. They’re part of sophisticated campaigns targeting enterprise credentials, OAuth tokens, and session cookies. The combination of user trust, browser permissions, and persistent access makes them especially dangerous.</p>
<p>Organizations need to move beyond passive awareness. By actively leveraging tools like Microsoft Defender Vulnerability Management (TVM), Microsoft Defender for Endpoint, and Microsoft Intune, you can:</p>
<ul>
<li>Detect high-risk extensions before they spread</li>
<li>Enforce strict install policies across Chrome and Edge</li>
<li>Continuously hunt for suspicious behavior or token abuse</li>
<li>Remove extensions and revoke OAuth grants at scale</li>
</ul>
<p>Modern threats demand modern visibility. If you haven’t yet reviewed your browser extension exposure across your environment, now is the time. The tools are there – and as attackers evolve, our defenses must too.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/featured_hu_9b6b75fae68aa827.jpg" medium="image" type="image/jpeg" width="1024" height="1024"/><enclosure url="https://www.modernsecurity.nl/malicious-browser-extensions-defender-tvm/featured_hu_9b6b75fae68aa827.jpg" type="image/jpeg" length="78786"/></item><item><title>Case management in Microsoft Defender and Sentinel: streamline your SecOps</title><link>https://www.modernsecurity.nl/microsoft-secops-case-management/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-secops-case-management/</guid><pubDate>Mon, 31 Mar 2025 22:13:23 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Sentinel</category><category>Microsoft Defender XDR</category><category>Security</category><description>Discover how to use Microsoft Case Management in Defender &amp; Sentinel to streamline SecOps with real-world tips, steps, and best practices.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>Managing complex security incidents has always been a challenge for Security Operations Centers (SOCs). From correlating alerts to assigning tasks and documenting steps, analysts often work across disparate tools, losing context and efficiency. To address this, Microsoft has introduced native <strong>Case Management</strong> within its unified security operations platform. This feature allows security teams to group related incidents, assign tasks, define custom workflows, and collaborate more effectively during investigations.</p>
<p>As someone deeply involved in security operations, I’m very happy and genuinely pleased to see this functionality being introduced within the Microsoft Ecosystem – as I normally use use tooling like <a href="https://strangebee.com/thehive/"  target="_blank" rel="noreferrer"><strong>TheHive</strong></a> in between, because Microsoft was lacking it’s case management. It’s a welcome improvement for <strong>SecOps</strong> teams everywhere.</p>
<p>In this post, I will provide a comprehensive, hands-on walkthrough of Case Management in <a href="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/" ><strong>Microsoft’s unified SOC platform</strong></a>. I’ll demonstrate how to use the new features, explain best practices, and show how to leverage this functionality to strengthen your security operations. This guide is based on the latest updates from Microsoft and is intended for security professionals looking to modernize and scale their incident response process.</p>

<h2 class="relative group">What is Microsoft case management?
    <div id="what-is-microsoft-case-management" class="anchor"></div>
    
</h2>
<p><strong>Microsoft case management</strong> is a centralized feature that supports structured security investigations within the unified security operations platform. It offers teams better visibility, accountability, and documentation when responding to complex threat scenarios. Instead of handling incidents in isolation, case management lets analysts connect the dots, document their findings, and collaborate more effectively.</p>
<p>Case Management is a new, native capability integrated into the Microsoft Defender portal, built specifically to streamline investigations. It is designed to centralize context from incidents and alerts, assign tasks, and support end-to-end tracking of remediation efforts. Unlike relying solely on individual incidents in <strong>Microsoft Sentinel</strong> or <strong>Defender XDR</strong>, Case Management provides a more structured and collaborative approach to security investigations.</p>

<h3 class="relative group">Key features:
    <div id="key-features" class="anchor"></div>
    
</h3>
<ul>
<li>Centralized case tracking across Microsoft Sentinel and Microsoft Defender XDR</li>
<li>Custom case status values to reflect your organization’s workflows</li>
<li>In-case task assignment with deadlines and ownership</li>
<li>Linking of multiple incidents to a single case</li>
<li>Role-based access controls for visibility and management</li>
<li>Built-in timeline and audit trail for case actions and comments</li>
</ul>
<p>These features are intended to support larger SOC teams who deal with overlapping investigations and need a system that goes beyond traditional incident-based response.</p>

<h2 class="relative group">Prerequisites
    <div id="prerequisites" class="anchor"></div>
    
</h2>
<p>Before using Case Management, make sure the following prerequisites are met:</p>
<ul>
<li>A Microsoft Sentinel workspace must be connected to the Microsoft Defender portal</li>
<li>Case Management is available only through the Defender portal, not the classic Azure portal</li>
<li>Proper role-based access control (RBAC) must be configured</li>
</ul>

<h3 class="relative group">Required permissions and configuration:
    <div id="required-permissions-and-configuration" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Role</th>
              <th>Description</th>
              <th>Required For</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Security Reader</td>
            <td>Read-only access to incidents and cases</td>
            <td>Viewing case queue and details</td>
        </tr>
        <tr>
            <td>Incident Responder</td>
            <td>Can update and take action on incidents and cases</td>
            <td>Assigning tasks, updating statuses</td>
        </tr>
        <tr>
            <td>Microsoft Sentinel Contributor</td>
            <td>Can manage content and configuration in Sentinel</td>
            <td>Linking Sentinel incidents to cases</td>
        </tr>
        <tr>
            <td>Custom Role (with specific permissions)</td>
            <td>Tailored access control based on tasks</td>
            <td>Fine-grained task management and access</td>
        </tr>
    </tbody>
  </table>
</div>
<p>Permissions required for custom roles include:</p>
<ul>
<li>View and manage incidents</li>
<li>Create and manage cases</li>
<li>Assign and complete tasks</li>
<li>View and edit timelines</li>
</ul>
<p>Ensure roles are scoped appropriately (e.g., at the tenant, M365 Defender, or Sentinel level). Navigate to <strong>Permissions &gt; Roles &amp; Scopes</strong> in the Defender portal to assign or validate access.</p>
<p>For multi-tenant or MSSP environments, use <strong>Azure Lighthouse</strong> or <strong>delegated access</strong> models to ensure secure and compliant access.</p>

<h2 class="relative group">Step-by-step guide: using Microsoft case management in practice
    <div id="step-by-step-guide-using-microsoft-case-management-in-practice" class="anchor"></div>
    
</h2>
<p>The hands-on examples below demonstrate how Microsoft case management functions in a real-world SOC environment. Whether you’re part of a blue team, an MSSP, or an incident response unit, these steps show how to operationalize Microsoft Defender and Sentinel’s unified case management.</p>
<p>Below is a hands-on walkthrough. These steps can be followed directly within your own Microsoft 365 security tenant.</p>

<h3 class="relative group">Step 1: Access the case management dashboard
    <div id="step-1-access-the-case-management-dashboard" class="anchor"></div>
    
</h3>
<p>Log in to the Microsoft Defender portal at <a href="https://security.microsoft.com/"  target="_blank" rel="noreferrer">https://security.microsoft.com</a>.</p>
<p>Navigate to “<strong>Cases</strong>” on the left-hand navigation pane. Click and open “<strong>Cases</strong>” You will now see a dedicated case queue.</p>
<p>This is where you can filter, search, and sort existing cases (or create a new one).</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Empty case queue in the Defender portal"
    width="2000"
    height="1081"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding_hu_35bb8567d15e58bf.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding.webp"></figure>
<h3 class="relative group">Step 2: Create a new case
    <div id="step-2-create-a-new-case" class="anchor"></div>
    
</h3>
<p>Click the “<strong>+ Create case</strong>” button.</p>
<p>Fill in the necessary metadata, including:</p>
<ul>
<li>Case name (e.g., “Ransomware Attempt – East Region”)</li>
<li>Description</li>
<li>Priority</li>
<li>Owner or team</li>
<li>Tags or classifications (optional)</li>
</ul>
<p>Click “<strong>Save</strong>” to save your case. It will now appear in the case queue.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Creating a case named Ransomware Attempt - East Region with critical priority"
    width="2000"
    height="1076"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-1_hu_5e475bbdaa9604b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-1.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Case summary for Ransomware Attempt - East Region with the case tasks panel"
    width="2000"
    height="1079"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-2_hu_9e4fd34a5020a297.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-2.webp"></figure>
<h3 class="relative group">Step 3: Link incidents to a case
    <div id="step-3-link-incidents-to-a-case" class="anchor"></div>
    
</h3>
<p>Open an existing incident that you want to associate with the case. Click on “<strong>Linked incidents</strong>” then choose “<strong>Link incidents</strong>”</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Link incidents button on the linked incidents tab of a case"
    width="2000"
    height="1076"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-3_hu_2fff24bea237ec72.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-3.webp"></figure><p>Select the relevant case from the dropdown list or create a new one directly from this screen. Once linked, the incident will now appear in the case overview.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Choosing incidents to link to a case"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-4_hu_86e17f5cd1faa252.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-4.webp"></figure><p>Repeat this for additional incidents that are part of the same investigation. This is especially useful for campaigns involving multiple endpoints, users, or threat vectors.</p>

<h3 class="relative group">Step 4: Add and assign tasks
    <div id="step-4-add-and-assign-tasks" class="anchor"></div>
    
</h3>
<p>Navigate to your case and go to the “<strong>Tasks</strong>” tab. Click “<strong>Add task</strong>” and define a specific investigation or remediation action.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Case summary after linking an incident, with the Add task button"
    width="2000"
    height="1081"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-5_hu_178eebba80a659ad.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-5.webp"></figure><p>Specify:</p>
<ul>
<li>Task title (e.g., “Review lateral movement on DC01”)</li>
<li>Description</li>
<li>Assigned analyst</li>
<li>Due date</li>
</ul>
<p>You can create multiple tasks per case and monitor their progress in the case overview</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Adding a task to review lateral movement on DC01"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-6_hu_c9e09d4c6b59640a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-6.webp"></figure>
<h3 class="relative group">Step 5: Define custom case statuses
    <div id="step-5-define-custom-case-statuses" class="anchor"></div>
    
</h3>
<p>Go to <strong>Settings</strong> &gt; <strong>Case Management</strong></p>
<p>Create new custom status values to reflect your organization’s process.</p>
<p>For example:</p>
<ul>
<li>Triage</li>
<li>Under Investigation</li>
<li>Awaiting IR Team</li>
<li>Resolved – Under Review</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Customizing case status values such as Triage, Under Investigation and Awaiting IR Team"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-7_hu_6c34ee2303061d90.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-7.webp"></figure><p>These status values allow you to move a case through predefined lifecycle stages, improving operational clarity.</p>

<h3 class="relative group">Step 6: Monitor case progress and close the case
    <div id="step-6-monitor-case-progress-and-close-the-case" class="anchor"></div>
    
</h3>
<p>Each case has a built-in activity timeline that logs:</p>
<ul>
<li>Linked incidents</li>
<li>Task updates</li>
<li>Analyst comments</li>
<li>Status changes</li>
</ul>
<p>Use this view during team handovers or incident review meetings to maintain continuity.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Case activity timeline with the linked incident and created task"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-26_hu_5d7b5810f475d692.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-secops-case-management/afbeelding-26.webp"></figure><p>Once all tasks are complete and incidents are resolved, set the case status to “<strong>Closed</strong>” or your designated final state (incidents that are linked will NOT be closed – be aware of this for now).</p>

<h2 class="relative group">Best practices for Microsoft case management
    <div id="best-practices-for-microsoft-case-management" class="anchor"></div>
    
</h2>
<p>Case Management is not just a tool but a process enabler. The following best practices will help you get the most value out of it:</p>

<h3 class="relative group">Group incidents by campaign or kill chain
    <div id="group-incidents-by-campaign-or-kill-chain" class="anchor"></div>
    
</h3>
<p>Instead of handling alerts one by one, group related incidents under a single case. For example, a phishing campaign that affects multiple users can be tracked centrally with linked incidents.</p>

<h3 class="relative group">Assign responsibility early
    <div id="assign-responsibility-early" class="anchor"></div>
    
</h3>
<p>Make sure each case has an owner. Use the task system to assign specific actions with deadlines. This helps avoid duplication and ensures accountability.</p>

<h3 class="relative group">Use custom statuses to reflect process maturity
    <div id="use-custom-statuses-to-reflect-process-maturity" class="anchor"></div>
    
</h3>
<p>Different organizations have different investigation lifecycles. Customize your case statuses to match internal playbooks or NIST/CSF response phases.</p>

<h3 class="relative group">Limit access based on sensitivity
    <div id="limit-access-based-on-sensitivity" class="anchor"></div>
    
</h3>
<p>Use RBAC to restrict access to sensitive cases (e.g., involving executives or insider threats). This helps ensure confidentiality and integrity.</p>

<h3 class="relative group">Document everything
    <div id="document-everything" class="anchor"></div>
    
</h3>
<p>Encourage analysts to log decisions, comments, and task outcomes in the case timeline. This helps build institutional knowledge and aids in post-incident reviews.</p>

<h2 class="relative group">What’s next for Microsoft case management
    <div id="whats-next-for-microsoft-case-management" class="anchor"></div>
    
</h2>
<p>This initial release is just the first step. Microsoft welcomes feedback from the community as it continues to expand this unified, security-focused case management experience tailored to SecOps workflows.</p>
<p>As Microsoft builds on this foundation, these upcoming capabilities are being prioritized:</p>
<ul>
<li>Automation and APIs</li>
<li>Multi-tenant support</li>
<li>Adding more evidence types and collection options</li>
<li>Workflow customization</li>
<li>Additional integrations within the Defender portal</li>
</ul>
<p>These enhancements will help case management become even more powerful for security teams of all sizes. Stay tuned for more information in the coming months</p>

<h2 class="relative group">Extra resources
    <div id="extra-resources" class="anchor"></div>
    
</h2>
<p><a href="https://learn.microsoft.com/en-us/unified-secops-platform/cases-overview"  target="_blank" rel="noreferrer">Official Case Management Overview – Microsoft Learn</a></p>
<p><a href="https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/improve-secops-collaboration-with-case-management/ba-p/4369044"  target="_blank" rel="noreferrer">Improve SecOps Collaboration with Case Management</a></p>
<p><a href="https://learn.microsoft.com/en-us/defender-xdr/"  target="_blank" rel="noreferrer">Microsoft Defender XDR Documentation</a></p>

<h2 class="relative group">Final thoughts
    <div id="final-thoughts" class="anchor"></div>
    
</h2>
<p>Microsoft’s native <strong>case management</strong> brings much-needed structure to investigations. Personally, I’ve found it incredibly refreshing to have this level of control and clarity built directly into the Defender and Sentinel experience. By combining context-rich incident handling with task assignments and flexible workflows, case management helps transform chaos into coordination.</p>
<p>This new feature feels especially valuable for those of us who live and breathe <strong>SecOps</strong> every day. Whether you’re a solo analyst or part of a <strong>24/7 SOC</strong>, having an integrated way to track progress, collaborate with teammates, and close cases confidently is a major leap forward.</p>
<p>For me, adopting case management isn’t just a helpful improvement. It feels like Microsoft is finally building for the way real security teams operate. <em><strong>Start exploring the new case management feature today.</strong></em> It’s intuitive, powerful, and, in my view, a must-have for any modern security operations environment.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-secops-case-management/featured_hu_2b43ca434e12abb5.jpg" medium="image" type="image/jpeg" width="1200" height="800"/><enclosure url="https://www.modernsecurity.nl/microsoft-secops-case-management/featured_hu_2b43ca434e12abb5.jpg" type="image/jpeg" length="119296"/></item><item><title>Integrating T-pot Honeypot with Microsoft Sentinel using Data Collection Rules (DCR)</title><link>https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/</link><guid isPermaLink="true">https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/</guid><pubDate>Mon, 30 Dec 2024 12:14:14 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Defender XDR</category><category>Microsoft Sentinel</category><description>Learn how to integrate T-Pot honeypots with AMA and Microsoft Sentinel using DCRs, visualize data and enhance threat detection with actionable insights.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>In the face of increasing cybersecurity threats, early detection and analysis of attack behaviors are essential for proactive defense. <strong><a href="https://www.modernsecurity.nl/security/" >Honeypots</a></strong> are invaluable tools that simulate vulnerable systems, attracting malicious actors and enabling security teams to study real attack methods without risking production environments.</p>
<p><strong>T-pot</strong> is an advanced honeypot framework that combines multiple honeypots, each simulating specific services like SSH, web servers, and industrial control systems (ICS). By integrating T-pot with <strong>Microsoft Sentinel</strong>, a cloud-native Security Information and Event Management (SIEM) tool, security teams can centralize honeypot data, enabling real-time analysis, monitoring, and automated alerting.</p>
<p>This guide walks you through each step to configure T-pot, set up <strong>data collection rules (DCR)</strong> with the <strong>Azure Monitor Agent (AMA)</strong>, and create visualizations and alerts in Sentinel to leverage T-pot data as a valuable source of threat intelligence.</p>

<h2 class="relative group">Prerequisites
    <div id="prerequisites" class="anchor"></div>
    
</h2>
<p>Ensure you have the following resources and configurations in place to successfully integrate T-pot with Microsoft Sentinel using data collection rules:</p>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><thead><tr><th>Requirement</th><th>Description</th></tr></thead><tbody><tr><td><strong>Azure subscription</strong></td><td>Required to access Log Analytics and Microsoft Sentinel</td></tr><tr><td><strong>Log Analytics workspace</strong></td><td>A Log Analytics workspace in Azure to collect and analyze logs from T-pot honeypots</td></tr><tr><td><strong>Dedicated server for T-pot</strong></td><td>Recommended specs: 4 CPU cores, 8 GB RAM (16 GB preferred), and 128 GB SSD</td></tr><tr><td><strong>Azure Monitor Agent (AMA)</strong></td><td>Installed on the T-pot server to securely forward <br/>logs using DCR</td></tr><tr><td><strong>Network configuration</strong></td><td>Assign a static IP to the T-pot server, with necessary ports open for Azure connectivity</td></tr></tbody></table>
</div>

<h2 class="relative group">T-pot basics
    <div id="t-pot-basics" class="anchor"></div>
    
</h2>
<p>T-Pot is designed as a highly modular and containerized honeypot solution, providing an out-of-the-box experience for capturing and analyzing malicious traffic. It comes preconfigured with several powerful modules that cater to various aspects of threat detection and analysis. Leveraging Docker containers for modularity, T-Pot ensures that each honeypot instance and its supporting services operate independently, making it highly flexible and resilient.</p>

<h3 class="relative group">Key Modules and Capabilities
    <div id="key-modules-and-capabilities" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Honeypots</strong>:
<ul>
<li>T-Pot integrates a variety of honeypots, including <strong>Cowrie</strong> (SSH/Telnet), <strong>Dionaea</strong> (malware collection), <strong>Elasticpot</strong> (Elasticsearch), and others, to attract and log different types of malicious activities.</li>
<li>Each honeypot is optimized for capturing specific threat vectors, from brute-force attacks to vulnerability exploits and malware delivery attempts.</li>
</ul>
</li>
<li><strong>Data Visualization and Management</strong>:
<ul>
<li><strong>Kibana</strong>: Offers a powerful web-based interface for visualizing logs and attack patterns stored in Elasticsearch. With prebuilt dashboards, you can quickly assess incoming threats and identify attack trends.</li>
<li><strong>Attack Map</strong>: T-Pot includes a live, real-time global attack map that visualizes connections and attack attempts, providing insights into threat actor origins and targets.</li>
<li><strong>Cockpit</strong>: A server management tool for monitoring system health, performance, and logs via a secure web interface.</li>
</ul>
</li>
<li><strong>Dockerized Architecture</strong>:
<ul>
<li>T-Pot uses Docker to isolate each honeypot and supporting service, ensuring operational independence and easier maintenance.</li>
<li>This architecture makes T-Pot highly scalable, as you can add or remove honeypots without affecting the core platform.</li>
</ul>
</li>
<li><strong>Integrated Threat Analysis Tools</strong>:
<ul>
<li>The stack also includes <strong>Heralding</strong> for monitoring authentication attempts and <strong>Tarpit</strong> to capture and delay malicious connections.</li>
</ul>
</li>
</ol>
<p>These components work together to provide a seamless and integrated view of your honeypot environment, empowering you to detect, analyze, and respond to threats with minimal configuration effort.</p>

<h2 class="relative group">Setting up the T-pot honeypot environment
    <div id="setting-up-the-t-pot-honeypot-environment" class="anchor"></div>
    
</h2>

<h3 class="relative group">Installing T-pot from the repository
    <div id="installing-t-pot-from-the-repository" class="anchor"></div>
    
</h3>
<p>Prepare your server with a fresh installation of Ubuntu Server 22.04 or newer and ensure all packages are updated:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt update <span class="o">&amp;&amp;</span> sudo apt upgrade -y</span></span></code></pre></div></div>
<p>Install essential tools like Git, Curl, and Wget:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install git curl wget -y</span></span></code></pre></div></div>
<p>Create a new user (in my example I name it tpotuser):</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">adduser tpotuser
</span></span><span class="line"><span class="cl">usermod -aG sudo tpotuser
</span></span><span class="line"><span class="cl">su - tpotuser</span></span></code></pre></div></div>
<p>Clone the T-pot repository from GitHub:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git clone https://github.com/telekom-security/tpotce.git</span></span></code></pre></div></div>
<p>Navigate to the installer directory:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> tpotce</span></span></code></pre></div></div>
<p>Run the installation script to begin setup</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./install.sh</span></span></code></pre></div></div>
<p>Follow the prompts, this will:</p>
<ul>
<li>Change the SSH port to <code>tcp/64295</code></li>
<li>Disable the DNS Stub Listener to avoid port conflicts with honeypots</li>
<li>Set SELinux to Monitor Mode</li>
<li>Set the firewall target for the public zone to ACCEPT</li>
<li>Add Docker’s repository and install Docker</li>
<li>Install recommended packages</li>
<li>Remove packages known to cause issues</li>
<li>Add the current user to the docker group (allow docker interaction without <code>sudo</code>)</li>
<li>Add <code>dps</code> and <code>dpsw</code> aliases (<code>grc docker ps -a</code>, <code>watch -c &quot;grc --colour=on docker ps -a</code>)</li>
<li>Add <code>la</code>, <code>ll</code> and <code>ls</code> aliases (for <code>exa</code>, a improved <code>ls</code> command)</li>
<li>Add <code>mi</code> (for <code>micro</code>, a great alternative to <code>vi</code> and / or <code>nano</code>)</li>
<li>Display open ports on the host (compare with T-Pot <a href="https://github.com/telekom-security/tpotce#required-ports"  target="_blank" rel="noreferrer">required</a> ports)</li>
<li>Add and enable <code>tpot.service</code> to <code>/etc/systemd/system</code> so T-Pot can automatically start and stop</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="T-Pot installer pulling the honeypot container images"
    width="1500"
    height="1185"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-1_hu_1ccc73914b7582fd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-1.webp"></figure><p>Reboot the system after installation completes:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo reboot</span></span></code></pre></div></div>
<p>Make sure to SSH into the new port (64295), otherwise you won’t be able to get back into the server.</p>

<h2 class="relative group">Exploring T-Pot’s unified web interfaces
    <div id="exploring-t-pots-unified-web-interfaces" class="anchor"></div>
    
</h2>
<p>T-Pot provides centralized access to its monitoring, management, and analysis tools through a single port and web-based structure. All interfaces are accessible under the <code>https://&lt;server-ip&gt;:64297/</code> base URL, simplifying navigation while maintaining a clean and unified setup. While my setup has everything based on my default IP, you can change them to your own configuration if needed ;).</p>

<h3 class="relative group">Default URLs for T-Pot web interfaces
    <div id="default-urls-for-t-pot-web-interfaces" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Portal name</strong></th>
              <th><strong>Purpose</strong></th>
              <th><strong>Default URL</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>T-Pot Dashboard</strong></td>
            <td>Central access point for T-Pot services</td>
            <td><code>https://&lt;server-ip&gt;:64297/</code></td>
        </tr>
        <tr>
            <td><strong>Attack Map</strong></td>
            <td>Real-time global attack visualization</td>
            <td><code>https://&lt;server-ip&gt;:64297/map/</code></td>
        </tr>
        <tr>
            <td><strong>CyberChef</strong></td>
            <td>A tool for decoding, encoding, and analyzing data</td>
            <td><code>https://&lt;server-ip&gt;:64297/cyberchef/</code></td>
        </tr>
        <tr>
            <td><strong>Elasticvue</strong></td>
            <td>Visualization and management for Elasticsearch</td>
            <td><code>https://&lt;server-ip&gt;:64297/elasticvue/</code></td>
        </tr>
        <tr>
            <td><strong>Kibana</strong></td>
            <td>Log visualization and analysis tool</td>
            <td><code>https://&lt;server-ip&gt;:64297/kibana/</code></td>
        </tr>
        <tr>
            <td><strong>Spiderfoot</strong></td>
            <td>Open-source reconnaissance tool</td>
            <td><code>https://&lt;server-ip&gt;:64297/spiderfoot/</code></td>
        </tr>
        <tr>
            <td><strong>Portainer (if enabled)</strong></td>
            <td>Docker container management interface.</td>
            <td>Not explicitly mapped in T-Pot (but if enabled :9443)</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Details of web interfaces you will probably use the most
    <div id="details-of-web-interfaces-you-will-probably-use-the-most" class="anchor"></div>
    
</h3>

<h4 class="relative group">T-Pot Dashboard
    <div id="t-pot-dashboard" class="anchor"></div>
    
</h4>
<ul>
<li><strong>URL</strong>: <code>https://&lt;server-ip&gt;:64297/</code></li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="T-pot honeypot Sentinel DCR AMA"
    width="2000"
    height="1085"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-2_hu_a25f3623a7bcb34f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-2.webp"></figure>
<h4 class="relative group">Attack Map
    <div id="attack-map" class="anchor"></div>
    
</h4>
<ul>
<li><strong>URL</strong>: <code>https://&lt;server-ip&gt;:64297/map/</code></li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="T-Pot attack map with live attacks by country and honeypot"
    width="2000"
    height="1083"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-3_hu_b833f00b387cd00e.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-3.webp"></figure>
<h4 class="relative group">Kibana
    <div id="kibana" class="anchor"></div>
    
</h4>
<ul>
<li><strong>URL</strong>: <code>https://&lt;server-ip&gt;:64297/kibana/</code></li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="T-Pot Kibana dashboard with honeypot attacks per honeypot type"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-4_hu_6f9872011646c4f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-4.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="T-Pot Kibana dashboard with attempted usernames and passwords and top attacker sources"
    width="2000"
    height="1081"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-5_hu_21a9744e2b6464e1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-5.webp"></figure>
<h4 class="relative group">CyberChef
    <div id="cyberchef" class="anchor"></div>
    
</h4>
<ul>
<li><strong>URL</strong>: <code>https://&lt;server-ip&gt;:64297/cyberchef/</code></li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="CyberChef in the T-Pot web interface"
    width="2000"
    height="1081"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-6_hu_7939b63f5c2ce7f5.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-6.webp"></figure>
<h2 class="relative group">Installing Azure Monitor Agent (AMA) and configuring DCR
    <div id="installing-azure-monitor-agent-ama-and-configuring-dcr" class="anchor"></div>
    
</h2>
<p>When integrating T-Pot with Microsoft Sentinel, a critical step is configuring data ingestion. Azure offers several options for collecting and forwarding logs, but the process can vary depending on your setup and the tools you use. Here, we’ll discuss the onboarding requirements for Data Collection Rules (DCR), the benefits of Azure Arc, and alternative log-forwarding methods.</p>

<h3 class="relative group">Onboarding to Azure Arc for DCR
    <div id="onboarding-to-azure-arc-for-dcr" class="anchor"></div>
    
</h3>
<p>To use Data Collection Rules (DCR) effectively, your server must be onboarded to the Azure Monitor Agent (AMA). AMA requires Azure Arc onboarding for non-Azure servers, such as those running on on-premises or third-party cloud providers.</p>

<h4 class="relative group">Why onboard to Azure Arc?
    <div id="why-onboard-to-azure-arc" class="anchor"></div>
    
</h4>
<p>Azure Arc extends Azure management and monitoring capabilities to non-Azure resources, including:</p>
<ol>
<li><strong>DCR Functionality</strong>: Arc-enabled servers can leverage the full benefits of DCR, including granular log filtering and routing to multiple destinations</li>
<li><strong>Centralized Management</strong>: Manage all your servers (Azure and non-Azure) in a single pane of glass using Azure</li>
<li><strong>Advanced Monitoring</strong>: Use tools like Log Analytics and Sentinel seamlessly for hybrid environments</li>
</ol>

<h4 class="relative group">Benefits of Azure Arc with AMA
    <div id="benefits-of-azure-arc-with-ama" class="anchor"></div>
    
</h4>
<ul>
<li>Simplifies management for hybrid and multi-cloud environments</li>
<li>Enables DCR for precise log filtering and forwarding</li>
<li>Provides seamless integration with Microsoft Sentinel for advanced threat detection</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Azure Monitor data collection architecture for standard and custom logs"
    width="1771"
    height="790"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/data-transformation-architecture_hu_8a4d8ad553f6eeb6.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/data-transformation-architecture.webp"></figure>
<h3 class="relative group">Alternative Log Collection and Forwarding Scenarios
    <div id="alternative-log-collection-and-forwarding-scenarios" class="anchor"></div>
    
</h3>
<p>If onboarding to Azure Arc is not an option or if you’re exploring other setups, there are several alternative methods for forwarding logs to Microsoft Sentinel:</p>

<h4 class="relative group">Logstash
    <div id="logstash" class="anchor"></div>
    
</h4>
<ul>
<li><strong>Scenario</strong>: Useful if you’re already using the Elastic Stack to manage logs</li>
<li><strong>Benefits</strong>:
<ul>
<li>Allows advanced log transformation and enrichment</li>
<li>Easily integrates with Elasticsearch setups</li>
</ul>
</li>
</ul>

<h4 class="relative group">Log Analytics HTTP Data Collector API
    <div id="log-analytics-http-data-collector-api" class="anchor"></div>
    
</h4>
<ul>
<li><strong>Scenario</strong>: Ideal for custom or lightweight setups where you want to send logs directly without relying on AMA or Logstash.</li>
<li><strong>Benefits</strong>:
<ul>
<li>Provides a lightweight, flexible solution for direct log ingestion</li>
<li>Can be used for specific log types or custom workflows</li>
</ul>
</li>
</ul>

<h4 class="relative group">Syslog forwarding
    <div id="syslog-forwarding" class="anchor"></div>
    
</h4>
<ul>
<li><strong>Scenario</strong>: Leverages native Syslog for environments already configured with centralized Syslog servers.</li>
<li><strong>Benefits</strong>:
<ul>
<li>Integrates easily with existing Syslog infrastructure</li>
<li>Simplifies log forwarding to AMA through facilities and severities</li>
</ul>
</li>
</ul>

<h3 class="relative group">Choosing the best approach
    <div id="choosing-the-best-approach" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Scenario</strong></th>
              <th><strong>Best Method</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>On-premises or non-Azure cloud server</td>
            <td>Onboard to Azure Arc and AMA</td>
        </tr>
        <tr>
            <td>Existing Elastic Stack environment</td>
            <td>Use Logstash</td>
        </tr>
        <tr>
            <td>Lightweight custom integration</td>
            <td>Use the Log Analytics HTTP API</td>
        </tr>
        <tr>
            <td>Existing Syslog setup</td>
            <td>Configure AMA for Syslog forwarding</td>
        </tr>
    </tbody>
  </table>
</div>
<p>By onboarding your server to Azure Arc and AMA, you gain the most seamless experience with Microsoft Sentinel, including full support for DCR. In my example I onboarded my T-Pot server to ARC and enabled the monitoring extension:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="T-Pot server onboarded to Azure Arc with the monitoring extension installed"
    width="2000"
    height="1080"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-7_hu_61e46cba63dba16b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/afbeelding-7.webp"></figure><p>However, alternative methods like Logstash and APIs offer flexibility for more customized setups, enterprise etc. Each method comes with its own benefits, and the choice depends on your specific infrastructure and operational needs.</p>

<h2 class="relative group">Creating data collection rules (DCR)
    <div id="creating-data-collection-rules-dcr" class="anchor"></div>
    
</h2>
<p>When integrating T-Pot with Microsoft Sentinel, creating a Data Collection Rule (DCR) is a critical step to ingest logs from T-Pot honeypots. This process requires precise configuration to ensure only relevant data is collected, saving costs while maintaining functionality.</p>
<p>This section will guide you through configuring DCR based on the working T-Pot setup. We’ll use the correct file paths for T-Pot logs, enable only the necessary JSON files to be ingested, as you can read on the KB from Microsoft:</p>
<p><a href="https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-collection-log-json"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-collection-log-json</a></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Azure Monitor Agent collecting JSON log files through a transformation into Log Analytics"
    width="1588"
    height="429"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/json-log-collection_hu_4773a56dc833f6df.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/json-log-collection.webp"></figure>
<h3 class="relative group">Correct File Paths for T-Pot Logs
    <div id="correct-file-paths-for-t-pot-logs" class="anchor"></div>
    
</h3>
<p>Each honeypot in T-Pot generates logs in specific JSON files, typically stored under the <code>/home/tpotuser/tpotce/data/&lt;honeypot&gt;/log</code> directory. For the honeypots I usually ingest (and find most useful), I covered them in this setup, here are the relevant log files:</p>
<ul>
<li><strong>Cowrie</strong>: <code>/home/tpotuser/tpotce</code>/<code>data/cowrie/log/cowrie.json</code></li>
<li><strong>Dionaea</strong>: <code>/home/tpotuser/tpotce/data/dionaea/log/dionaea.json</code></li>
<li><strong>Elasticpot</strong>: <code>/home/tpotuser/tpotce/data/elasticpot/log/elasticpot.json</code></li>
</ul>

<h2 class="relative group">Creating the Data Collection Endpoint (DCE)
    <div id="creating-the-data-collection-endpoint-dce" class="anchor"></div>
    
</h2>
<p>The DCE serves as the gateway for Azure Monitor to ingest logs from T-Pot honeypots (add it via Azure Cloud Shell – as MS doesnt allow to do this via the portal at this moment) :</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Parameters</span>
</span></span><span class="line"><span class="cl"><span class="nv">$SubscriptionId</span> <span class="p">=</span> <span class="s2">&#34;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$ResourceGroupName</span> <span class="p">=</span> <span class="s2">&#34;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCEName</span> <span class="p">=</span> <span class="s2">&#34;Tpot-DCE&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$Location</span> <span class="p">=</span> <span class="s2">&#34;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$ApiVersion</span> <span class="p">=</span> <span class="s2">&#34;2023-03-11&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Construct the API URL using UriBuilder</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span> <span class="p">=</span> <span class="nb">New-Object</span> <span class="n">System</span><span class="p">.</span><span class="py">UriBuilder</span><span class="p">(</span><span class="s2">&#34;https://management.azure.com&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Path</span> <span class="p">=</span> <span class="s2">&#34;/subscriptions/</span><span class="nv">$SubscriptionId</span><span class="s2">/resourceGroups/</span><span class="nv">$ResourceGroupName</span><span class="s2">/providers/Microsoft.Insights/dataCollectionEndpoints/</span><span class="nv">$DCEName</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Query</span> <span class="p">=</span> <span class="s2">&#34;api-version=</span><span class="nv">$ApiVersion</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$Uri</span> <span class="p">=</span> <span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Uri</span><span class="p">.</span><span class="py">AbsoluteUri</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># DCE Body</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCEBody</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">location</span> <span class="p">=</span> <span class="nv">$Location</span>
</span></span><span class="line"><span class="cl">    <span class="n">properties</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="n">publicNetworkAccess</span> <span class="p">=</span> <span class="s2">&#34;Enabled&#34;</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Convert to JSON</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCEBodyJson</span> <span class="p">=</span> <span class="nv">$DCEBody</span> <span class="p">|</span> <span class="nb">ConvertTo-Json</span> <span class="n">-Depth</span> <span class="mf">10</span> <span class="n">-Compress</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Execute REST API Request</span>
</span></span><span class="line"><span class="cl"><span class="nb">Invoke-RestMethod</span> <span class="n">-Uri</span> <span class="nv">$Uri</span> <span class="n">-Method</span> <span class="n">Put</span> <span class="n">-Body</span> <span class="nv">$DCEBodyJson</span> <span class="n">-ContentType</span> <span class="s2">&#34;application/json&#34;</span> <span class="n">-Headers</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">Authorization</span> <span class="p">=</span> <span class="s2">&#34;Bearer </span><span class="p">$(</span><span class="n">az</span> <span class="n">account</span> <span class="nb">get-access</span><span class="n">-token</span> <span class="p">-</span><span class="n">-query</span> <span class="n">accessToken</span> <span class="n">-o</span> <span class="n">tsv</span><span class="p">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>

<h2 class="relative group">Creating Custom Tables
    <div id="creating-custom-tables" class="anchor"></div>
    
</h2>

<h3 class="relative group">Cowrie Custom Table
    <div id="cowrie-custom-table" class="anchor"></div>
    
</h3>
<p>This will create a custom table, for in my case Cowrie, based on the schema of the Cowrie JSON columns/output and information needed. My attempt to create a table is based on the analytics tier (because I can only choose basic or analytic tiers in my region), but I suggest to <a href="https://learn.microsoft.com/en-us/azure/sentinel/basic-logs-use-cases"  target="_blank" rel="noreferrer">choose the new <strong>Auxiliary logs</strong> for reducing costs</a>.</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Parameters</span>
</span></span><span class="line"><span class="cl"><span class="nv">$WorkspaceName</span> <span class="p">=</span> <span class="s2">&#34;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$TableName</span> <span class="p">=</span> <span class="s2">&#34;cowrie_tpot_CL&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$ApiVersion</span> <span class="p">=</span> <span class="s2">&#34;2021-12-01-preview&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Table Schema</span>
</span></span><span class="line"><span class="cl"><span class="nv">$TableSchema</span> <span class="p">=</span> <span class="sh">@&#34;
</span></span></span><span class="line"><span class="cl"><span class="sh">{
</span></span></span><span class="line"><span class="cl"><span class="sh">  &#34;properties&#34;: {
</span></span></span><span class="line"><span class="cl"><span class="sh">    &#34;schema&#34;: {
</span></span></span><span class="line"><span class="cl"><span class="sh">      &#34;name&#34;: &#34;</span><span class="nv">$TableName</span><span class="sh">&#34;,
</span></span></span><span class="line"><span class="cl"><span class="sh">      &#34;columns&#34;: [
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;TimeGenerated&#34;, &#34;type&#34;: &#34;datetime&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;FilePath&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;eventid&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;src_ip&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;username&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;password&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;message&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;sensor&#34;, &#34;type&#34;: &#34;string&#34; },
</span></span></span><span class="line"><span class="cl"><span class="sh">        { &#34;name&#34;: &#34;session&#34;, &#34;type&#34;: &#34;string&#34; }
</span></span></span><span class="line"><span class="cl"><span class="sh">      ]
</span></span></span><span class="line"><span class="cl"><span class="sh">    }
</span></span></span><span class="line"><span class="cl"><span class="sh">  }
</span></span></span><span class="line"><span class="cl"><span class="sh">}
</span></span></span><span class="line"><span class="cl"><span class="sh">&#34;@</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># API URL</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span> <span class="p">=</span> <span class="nb">New-Object</span> <span class="n">System</span><span class="p">.</span><span class="py">UriBuilder</span><span class="p">(</span><span class="s2">&#34;https://management.azure.com&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Path</span> <span class="p">=</span> <span class="s2">&#34;/subscriptions/</span><span class="nv">$SubscriptionId</span><span class="s2">/resourceGroups/</span><span class="nv">$ResourceGroupName</span><span class="s2">/providers/Microsoft.OperationalInsights/workspaces/</span><span class="nv">$WorkspaceName</span><span class="s2">/tables/</span><span class="nv">$TableName</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Query</span> <span class="p">=</span> <span class="s2">&#34;api-version=</span><span class="nv">$ApiVersion</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$TableUri</span> <span class="p">=</span> <span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Uri</span><span class="p">.</span><span class="py">AbsoluteUri</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Execute REST API Request</span>
</span></span><span class="line"><span class="cl"><span class="nb">Invoke-RestMethod</span> <span class="n">-Uri</span> <span class="nv">$TableUri</span> <span class="n">-Method</span> <span class="n">Put</span> <span class="n">-Body</span> <span class="nv">$TableSchema</span> <span class="n">-ContentType</span> <span class="s2">&#34;application/json&#34;</span> <span class="n">-Headers</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">Authorization</span> <span class="p">=</span> <span class="s2">&#34;Bearer </span><span class="p">$(</span><span class="n">az</span> <span class="n">account</span> <span class="nb">get-access</span><span class="n">-token</span> <span class="p">-</span><span class="n">-query</span> <span class="n">accessToken</span> <span class="n">-o</span> <span class="n">tsv</span><span class="p">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<p>Repeat this process for <strong>Dionaea</strong> and <strong>Elasticpot</strong>, replacing <code>$TableName</code> and updating columns to match their respective log structures. The best thing to match the columns is to take snippets/examples of the current logfiles you have.</p>

<h2 class="relative group">Creating the Data Collection Rule (DCR)
    <div id="creating-the-data-collection-rule-dcr" class="anchor"></div>
    
</h2>

<h3 class="relative group">Cowrie DCR
    <div id="cowrie-dcr" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="c"># Parameters</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCRName</span> <span class="p">=</span> <span class="s2">&#34;cowrie_tpot_dcr&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCEId</span> <span class="p">=</span> <span class="s2">&#34;/subscriptions/</span><span class="nv">$SubscriptionId</span><span class="s2">/resourceGroups/</span><span class="nv">$ResourceGroupName</span><span class="s2">/providers/Microsoft.Insights/dataCollectionEndpoints/Tpot-DCE&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$WorkspaceId</span> <span class="p">=</span> <span class="s2">&#34;/subscriptions/</span><span class="nv">$SubscriptionId</span><span class="s2">/resourceGroups/</span><span class="nv">$ResourceGroupName</span><span class="s2">/providers/Microsoft.OperationalInsights/workspaces/</span><span class="nv">$WorkspaceName</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$FilePath</span> <span class="p">=</span> <span class="s2">&#34;/home/tpotuser/tpotce/data/cowrie/log/cowrie.json&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$ApiVersion</span> <span class="p">=</span> <span class="s2">&#34;2023-03-11&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># DCR Body</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCRBody</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">location</span> <span class="p">=</span> <span class="nv">$Location</span>
</span></span><span class="line"><span class="cl">    <span class="n">properties</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">        <span class="n">dataCollectionEndpointId</span> <span class="p">=</span> <span class="nv">$DCEId</span>
</span></span><span class="line"><span class="cl">        <span class="n">streamDeclarations</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">            <span class="s2">&#34;Custom-cowrie_tpot_CL&#34;</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">                <span class="n">columns</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;TimeGenerated&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;datetime&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;FilePath&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;eventid&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;src_ip&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;username&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;password&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;message&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;sensor&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">},</span>
</span></span><span class="line"><span class="cl">                    <span class="vm">@</span><span class="p">{</span> <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;session&#34;</span><span class="p">;</span> <span class="nb">type </span><span class="p">=</span> <span class="s2">&#34;string&#34;</span> <span class="p">}</span>
</span></span><span class="line"><span class="cl">                <span class="p">)</span>
</span></span><span class="line"><span class="cl">            <span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="n">dataSources</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">            <span class="n">logFiles</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">                    <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;CowrieLog&#34;</span>
</span></span><span class="line"><span class="cl">                    <span class="n">streams</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;Custom-cowrie_tpot_CL&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">                    <span class="n">filePatterns</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="nv">$FilePath</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">                    <span class="n">format</span> <span class="p">=</span> <span class="s2">&#34;json&#34;</span>
</span></span><span class="line"><span class="cl">                <span class="p">}</span>
</span></span><span class="line"><span class="cl">            <span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="n">destinations</span> <span class="p">=</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">            <span class="n">logAnalytics</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">                <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">                    <span class="n">name</span> <span class="p">=</span> <span class="s2">&#34;workspace&#34;</span>
</span></span><span class="line"><span class="cl">                    <span class="n">workspaceResourceId</span> <span class="p">=</span> <span class="nv">$WorkspaceId</span>
</span></span><span class="line"><span class="cl">                <span class="p">}</span>
</span></span><span class="line"><span class="cl">            <span class="p">)</span>
</span></span><span class="line"><span class="cl">        <span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="n">dataFlows</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span>
</span></span><span class="line"><span class="cl">            <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">                <span class="n">streams</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;Custom-cowrie_tpot_CL&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">                <span class="n">destinations</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;workspace&#34;</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">            <span class="p">}</span>
</span></span><span class="line"><span class="cl">        <span class="p">)</span>
</span></span><span class="line"><span class="cl">    <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Convert to JSON and Execute REST API Request</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCRBodyJson</span> <span class="p">=</span> <span class="nv">$DCRBody</span> <span class="p">|</span> <span class="nb">ConvertTo-Json</span> <span class="n">-Depth</span> <span class="mf">10</span> <span class="n">-Compress</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Path</span> <span class="p">=</span> <span class="s2">&#34;/subscriptions/</span><span class="nv">$SubscriptionId</span><span class="s2">/resourceGroups/</span><span class="nv">$ResourceGroupName</span><span class="s2">/providers/Microsoft.Insights/dataCollectionRules/</span><span class="nv">$DCRName</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Query</span> <span class="p">=</span> <span class="s2">&#34;api-version=</span><span class="nv">$ApiVersion</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="nv">$DCRUri</span> <span class="p">=</span> <span class="nv">$UriBuilder</span><span class="p">.</span><span class="py">Uri</span><span class="p">.</span><span class="py">AbsoluteUri</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="nb">Invoke-RestMethod</span> <span class="n">-Uri</span> <span class="nv">$DCRUri</span> <span class="n">-Method</span> <span class="n">Put</span> <span class="n">-Body</span> <span class="nv">$DCRBodyJson</span> <span class="n">-ContentType</span> <span class="s2">&#34;application/json&#34;</span> <span class="n">-Headers</span> <span class="vm">@</span><span class="p">{</span>
</span></span><span class="line"><span class="cl">    <span class="n">Authorization</span> <span class="p">=</span> <span class="s2">&#34;Bearer </span><span class="p">$(</span><span class="n">az</span> <span class="n">account</span> <span class="nb">get-access</span><span class="n">-token</span> <span class="p">-</span><span class="n">-query</span> <span class="n">accessToken</span> <span class="n">-o</span> <span class="n">tsv</span><span class="p">)</span><span class="s2">&#34;</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span></span></span></code></pre></div></div>
<p>Repeat for <strong>Dionaea</strong> and <strong>Elasticpot</strong>, adjusting <code>$FilePath</code> and <code>$DCRName</code>.</p>
<p>Also make sure to check whether the DCE is correctly added to the DCR (as resource):</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Adding the Azure Arc T-Pot machine as a resource of the cowrie data collection rule"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/image-15_hu_1feb3f29286e9fce.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/image-15.webp"></figure>
<h2 class="relative group">Validating Data
    <div id="validating-data" class="anchor"></div>
    
</h2>
<p>If needed you can also create test alerts directly in T-pot, for example into the Cowrie JSON, from a shell:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">echo</span> <span class="s1">&#39;{&#34;eventid&#34;: &#34;cowrie.test.log&#34;, &#34;message&#34;: &#34;Test message for Cowrie&#34;, &#34;timestamp&#34;: &#34;2024-12-30T17:00:00Z&#34;}&#39;</span> &gt;&gt; /home/tpotuser/tpotce/data/cowrie/log/cowrie.json</span></span></code></pre></div></div>
<p>Run the following KQL queries in <strong>Log Analytics</strong> to see if the data is ingested into the custom table you’ve created:</p>

<h3 class="relative group">Cowrie Data
    <div id="cowrie-data" class="anchor"></div>
    
</h3>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">cowrie_tpot_CL
<span class="o">|</span> <span class="k">take</span> 10</code></pre></div>
</div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Log Analytics query returning Cowrie honeypot events from the custom table"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/image-17_hu_d99654d9cfe188b6.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/image-17.webp"></figure>
<h2 class="relative group">Visualizing Data
    <div id="visualizing-data" class="anchor"></div>
    
</h2>

<h3 class="relative group">Workbook Queries
    <div id="workbook-queries" class="anchor"></div>
    
</h3>
<p><strong>Top Attackers</strong> <strong>IP</strong>:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">cowrie_tpot_CL
<span class="o">|</span> <span class="k">where</span> eventid <span class="o">==</span> <span class="s">&#34;cowrie.login.failed&#34;</span>
<span class="o">|</span> <span class="k">summarize</span> AttemptCount = <span class="k">count</span>() <span class="k">by</span> src_ip
<span class="o">|</span> <span class="k">sort by</span> AttemptCount <span class="k">desc</span></code></pre></div>
</div>
<p><strong>Failed Logins</strong> <strong>by username</strong>:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">cowrie_tpot_CL
<span class="o">|</span> <span class="k">where</span> eventid <span class="o">==</span> <span class="s">&#34;cowrie.login.failed&#34;</span>
<span class="o">|</span> <span class="k">summarize</span> AttemptCount = <span class="k">count</span>() <span class="k">by</span> username
<span class="o">|</span> <span class="k">sort by</span> AttemptCount <span class="k">desc</span></code></pre></div>
</div>
<p><strong>Failed Logins</strong> <strong>over time</strong>:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">cowrie_tpot_CL
<span class="o">|</span> <span class="k">where</span> eventid <span class="o">==</span> <span class="s">&#34;cowrie.login.failed&#34;</span>
<span class="o">|</span> <span class="k">summarize</span> Count = <span class="k">count</span>() <span class="k">by</span> username, password, src_ip, <span class="nf">bin</span>(TimeGenerated, 1h)</code></pre></div>
</div>

<h3 class="relative group">Adding a Workbook
    <div id="adding-a-workbook" class="anchor"></div>
    
</h3>
<ol>
<li>Go to <strong>Workbooks</strong> in Azure Monitor</li>
<li>Create a new workbook, add the queries, visualize with a map for example (needs geolocation API)</li>
<li>Save and pin the workbook to the dashboard</li>
</ol>

<h2 class="relative group">Optimizing DCR and Sentinel setup
    <div id="optimizing-dcr-and-sentinel-setup" class="anchor"></div>
    
</h2>
<ul>
<li>
<p>Filter out unnecessary logs in DCR to reduce ingestion costs</p>
</li>
<li>
<p>Set data retention policies in <strong>Log Analytics &gt; Usage and estimated costs</strong> to manage storage requirements</p>
</li>
<li>
<p>Use Auxiliary logs if possible</p>
</li>
<li>
<p>Optimize queries and dashboards by using summary operations to improve performance</p>
</li>
</ul>

<h2 class="relative group">Troubleshooting common issues
    <div id="troubleshooting-common-issues" class="anchor"></div>
    
</h2>
<p>For connectivity issues with the Azure Monitor Agent, check logs:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">tail -f /var/opt/microsoft/azuremonitoragent/log/azuremonitoragent.log</span></span></code></pre></div></div>
<p>Restart the agent if necessary:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl restart azuremonitoragent</span></span></code></pre></div></div>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Integrating T-pot with Microsoft Sentinel using data collection rules provides a highly effective setup for proactive threat intelligence. This guide equips you to deploy T-pot, configure DCR, and create actionable insights within Sentinel, strengthening your organization’s cybersecurity posture.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/featured_hu_ae55fdcc22409108.jpg" medium="image" type="image/jpeg" width="1200" height="675"/><enclosure url="https://www.modernsecurity.nl/t-pot-honeypot-integration-with-dcr-sentinel/featured_hu_ae55fdcc22409108.jpg" type="image/jpeg" length="114892"/></item><item><title>Microsoft Defender External Attack Surface Management (EASM)</title><link>https://www.modernsecurity.nl/microsoft-external-attack-surface-management/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-external-attack-surface-management/</guid><pubDate>Wed, 20 Nov 2024 19:37:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Defender XDR</category><category>Microsoft Sentinel</category><description>Configure Microsoft Defender External Attack Surface Management (EASM) to reduce your organization's external risks, learn how by following this blogpost.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>As organizations grow their digital footprint, managing the external attack surface has become critical for reducing risks and improving security posture. Public-facing assets such as domains, APIs, IP addresses, and cloud resources are often the entry points for attackers. Without comprehensive visibility and monitoring, these assets can become vulnerabilities.</p>
<p><strong>Microsoft Defender External Attack Surface Management (EASM)</strong> provides a robust solution to address these challenges. Using advanced discovery technology, Defender EASM continuously maps your organization’s external infrastructure to identify risks and hidden vulnerabilities. In this guide, we’ll explore the features, prerequisites, step-by-step configuration, and its role in <strong>exposure management</strong>.</p>
<p><a href="https://www.modernsecurity.nl/microsoft-security-exposure-management/" >I blogged about Exposure Management earlier this year</a> and you might have noticed External Attack Surface Management is also part of an organisation exposure (so not only internally).</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="External Attack Surface Management EASM"
    width="1600"
    height="900"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/infographic-final-re52h3q_hu_ddf0dc86887652d3.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/infographic-final-re52h3q.webp"><figcaption>External Attack Surface Management (EASM)</figcaption></figure>
<h2 class="relative group">Key features of Microsoft Defender External Attack Surface Management
    <div id="key-features-of-microsoft-defender-external-attack-surface-management" class="anchor"></div>
    
</h2>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Feature</strong></th>
              <th><strong>Benefit</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Comprehensive asset discovery</td>
            <td>Identifies public-facing assets, including shadow IT and misconfigurations</td>
        </tr>
        <tr>
            <td>Continuous monitoring</td>
            <td>Tracks changes in your attack surface in real time</td>
        </tr>
        <tr>
            <td>Risk prioritization</td>
            <td>Highlights high-risk vulnerabilities and misconfigurations for immediate action</td>
        </tr>
        <tr>
            <td>Dashboard insights</td>
            <td>Provides actionable insights into vulnerabilities, compliance, and risks</td>
        </tr>
        <tr>
            <td>Integration capabilities</td>
            <td>Seamlessly integrates with Microsoft Sentinel and other tools</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Prerequisites
    <div id="prerequisites" class="anchor"></div>
    
</h2>
<p>Before deploying Microsoft Defender EASM, ensure the following requirements are met:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Requirement</strong></th>
              <th><strong>Details</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Azure subscription</strong></td>
            <td>An active Azure subscription is required to deploy the EASM resource (billed per asset)</td>
        </tr>
        <tr>
            <td><strong>User permissions</strong></td>
            <td>Owner or contributor role in the Azure subscription</td>
        </tr>
        <tr>
            <td><strong>Supported regions</strong></td>
            <td>Ensure the selected Azure region supports EASM</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Deploying the Defender EASM resource
    <div id="deploying-the-defender-easm-resource" class="anchor"></div>
    
</h2>

<h3 class="relative group">Steps:
    <div id="steps" class="anchor"></div>
    
</h3>
<p>Log into Azure Portal: <a href="https://portal.azure.com/"  target="_blank" rel="noreferrer">Azure Portal</a>.</p>
<p>Create the EASM resource:</p>
<ul>
<li>Navigate to <strong>Create a resource</strong></li>
<li>Search for “Microsoft Defender External Attack Surface Management” and select it</li>
<li>Complete the required fields, including subscription, resource group, and region</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Searching for Microsoft Defender EASM in the Azure portal"
    width="1607"
    height="411"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-3_hu_e73acac711877cfc.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-3.webp"></figure><p>Review and deploy:</p>
<ul>
<li>Validate your settings</li>
<li>Click <strong>Create</strong> to deploy the resource</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Creating a Microsoft Defender EASM resource in the Azure portal"
    width="2000"
    height="1080"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-4_hu_3f063984cd41be83.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-4.webp"></figure>
<h2 class="relative group">Configuring discovery groups and seeds
    <div id="configuring-discovery-groups-and-seeds" class="anchor"></div>
    
</h2>
<p>Discovery groups and seeds are essential for initializing and managing your attack surface discovery.</p>

<h3 class="relative group">Types of seeds:
    <div id="types-of-seeds" class="anchor"></div>
    
</h3>
<ul>
<li>Domains</li>
<li>IP address blocks</li>
<li>Hosts</li>
<li>Email contacts</li>
<li>Autonomous system numbers (ASNs)</li>
<li>Whois organizations</li>
</ul>

<h3 class="relative group">Steps:
    <div id="steps-2" class="anchor"></div>
    
</h3>
<p>Navigate to Inventory (or through Discovery):</p>
<ul>
<li>Open the Defender EASM resource in the Azure Portal</li>
<li>Select the <strong>Inventory</strong> tab</li>
</ul>
<p>Search for already present information about your organization or create a custom policy:</p>
<ul>
<li>Provide a name for the group (e.g. Modern Security)</li>
</ul>
<p>Add seeds:</p>
<ul>
<li>Click <strong>Add seed</strong> and specify the type of seed (e.g., domain names, IP ranges)</li>
<li>Enter the seed values (e.g., <code>example.com</code> or <code>192.168.0.0/24</code>)</li>
<li>Save your changes</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender EASM discovery with the organization name, domain and IP block seeds"
    width="2000"
    height="1080"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-2_hu_84ea74f90de1ca31.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-2.webp"></figure><p>Configure exclusions (optional):</p>
<ul>
<li>Add exclusions to prevent specific assets from being included in the discovery process</li>
<li>Examples include subsidiaries or unrelated third-party infrastructure</li>
</ul>
<p>Later on, when you created assets and your organisation, you can also go along with <strong>Discovery Groups</strong> (more more granular control over your assets)</p>

<h2 class="relative group">Discovering and managing assets
    <div id="discovering-and-managing-assets" class="anchor"></div>
    
</h2>
<p>After configuring your organisation and seeds, Defender EASM identifies and categorizes assets (this can take up to 72 hours):</p>

<h3 class="relative group">Asset states:
    <div id="asset-states" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Approved inventory</strong>: Directly managed assets</li>
<li><strong>Dependencies</strong>: Third-party assets supporting your infrastructure</li>
<li><strong>Monitor only</strong>: Relevant but not directly controlled assets</li>
<li><strong>Candidate</strong>: Requires manual review to determine ownership</li>
<li><strong>Requires investigation</strong>: Needs further validation based on connection strength</li>
</ul>

<h3 class="relative group">Steps:
    <div id="steps-3" class="anchor"></div>
    
</h3>
<p>Navigate to the inventory section:</p>
<ul>
<li>Access the <strong>Inventory</strong> tab in the Defender EASM portal</li>
</ul>
<p>Review assets:</p>
<ul>
<li>Approve or reject discovered assets based on relevance and ownership</li>
<li>Assign labels to group and organize assets</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender EASM overview with discovered domains, hosts, pages and SSL certificates"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-5_hu_2589dc3371bcb77e.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-5.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender EASM inventory filtered on approved assets"
    width="2000"
    height="1079"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-6_hu_57f953ab65a1423.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-6.webp"></figure>
<h2 class="relative group">Dashboard integrated in EASM
    <div id="dashboard-integrated-in-easm" class="anchor"></div>
    
</h2>
<p><strong>Attack Surface Summary</strong></p>
<ul>
<li><strong>Purpose</strong>: Provides a high-level overview of the organization’s external attack surface.</li>
<li><strong>Features</strong>:
<ul>
<li>Key metrics for discovered assets (domains, IPs, services)</li>
<li>Snapshot of high-risk vulnerabilities or misconfigurations</li>
<li>Trends in attack surface expansion or reduction over time</li>
</ul>
</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender EASM attack surface summary with high, medium and low priority observations"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image_hu_9269879abcd62c2c.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image.webp"></figure><p><strong>Security Posture</strong></p>
<ul>
<li><strong>Purpose</strong>: Highlights the security status of external-facing assets</li>
<li><strong>Features</strong>:
<ul>
<li>Overview of compliance levels</li>
<li>Identification of critical security gaps</li>
<li>Suggested remediation steps to improve security posture</li>
</ul>
</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender EASM security posture dashboard with domain configuration and open ports"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-1_hu_4d5a66a27062eb85.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-1.webp"></figure><p><strong>GDPR Compliance</strong></p>
<ul>
<li><strong>Purpose</strong>: Monitors compliance with the General Data Protection Regulation (GDPR)</li>
<li><strong>Features</strong>:
<ul>
<li>Detects assets and configurations that might violate GDPR</li>
<li>Highlights exposed personal data or non-compliant systems</li>
<li>Recommendations for achieving GDPR compliance</li>
</ul>
</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender EASM GDPR compliance dashboard with websites by status"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-2-2_hu_7aafb01c22a40d28.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-2-2.webp"></figure><p><strong>OWASP Top 10</strong></p>
<ul>
<li><strong>Purpose</strong>: Tracks vulnerabilities based on the OWASP Top 10 list</li>
<li><strong>Features</strong>:
<ul>
<li>Identification of web application risks, such as injection or broken access control</li>
<li>Asset-specific vulnerability details</li>
<li>Risk prioritization to mitigate OWASP-related issues</li>
</ul>
</li>
</ul>
<p><strong>CWE Top 25 Software Weaknesses</strong></p>
<ul>
<li><strong>Purpose</strong>: Highlights software weaknesses based on the CWE Top 25 list</li>
<li><strong>Features</strong>:
<ul>
<li>Insights into software flaws that could be exploited</li>
<li>Categorization by weakness type (e.g., input validation errors)</li>
<li>Recommendations for addressing software vulnerabilities</li>
</ul>
</li>
</ul>
<p><strong>CISA Known Exploits</strong></p>
<ul>
<li><strong>Purpose</strong>: Focuses on vulnerabilities listed in the CISA Known Exploited Vulnerabilities Catalog</li>
<li><strong>Features</strong>:
<ul>
<li>Identifies assets impacted by active exploits.</li>
<li>Provides context on known exploitation activity.</li>
<li>Helps prioritize fixes for vulnerabilities actively targeted by attackers.</li>
</ul>
</li>
</ul>

<h2 class="relative group">Integrating with Microsoft Sentinel
    <div id="integrating-with-microsoft-sentinel" class="anchor"></div>
    
</h2>
<p>Integration with Microsoft Sentinel enhances centralized monitoring and threat detection.</p>

<h3 class="relative group">Steps:
    <div id="steps-4" class="anchor"></div>
    
</h3>
<p>Set up data connection:</p>
<ul>
<li>Go to <strong>Data connections</strong> in the EASM portal</li>
<li>Link to your Sentinel Log Analytics workspace (use your LAW workspace ID + API key you find under settings &gt; agents &gt; primary/secondary key in LAW)</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Adding a Log Analytics data connection in Defender EASM"
    width="2000"
    height="1050"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-3-2_hu_d06488de2f4d40dc.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-3-2.webp"></figure><p>Verify integration:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="EASM custom tables in the Log Analytics workspace"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-13_hu_90be23846806ad86.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-13.webp"></figure><p>KQL Queries for EASM Data in Sentinel:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Query Purpose</strong></th>
              <th><strong>Correct KQL Query</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
    </tbody>
  </table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>List all assets by type</strong></td><td><code>EasmAsset_CL | summarize count() by AssetType_s</code></td><td>Provides a summary of discovered assets categorized by their type (e.g., domains, IPs).</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>View asset banners</strong></td><td><code>EasmAssetBanner_CL | project AssetName_s, BannerText_s, IP_s</code></td><td>Retrieves banner information for identified assets, including IP and banner text.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Identify newly discovered domains</strong></td><td><code>EasmDomainAsset_CL | where TimeGenerated &gt; ago(24h) | project DomainName_s, DiscoveryPath_s</code></td><td>Lists newly discovered domains in the last 24 hours.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Monitor SSL certificate issues</strong></td><td><code>EasmSslCertAsset_CL | where SslCertStatus_s contains "expired" | project AssetName_s, SslCertDetails_s</code></td><td>Retrieves findings for expired or problematic SSL certificates.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Open port detections</strong></td><td><code>EasmHostAsset_CL | where Description_s contains "Open Port" | project HostName_s, PortDetails_s</code></td><td>Lists hosts with open ports and their details.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Filter by OWASP vulnerabilities</strong></td><td><code>EasmPageAsset_CL | where VulnerabilityCategory_s contains "OWASP" | project PageUrl_s, Severity_s</code></td><td>Displays web pages with vulnerabilities categorized under OWASP Top 10.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Discover risky assets</strong></td><td><code>EasmRisk_CL | where Severity_s == "High" | project AssetName_s, RiskDescription_s</code></td><td>Highlights assets flagged with high-risk issues.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Find risky IP addresses</strong></td><td><code>EasmIpAddressAsset_CL | where RiskLevel_s == "Critical" | project IpAddress_s, RiskDetails_s</code></td><td>Lists critical-risk IP addresses and associated risk details.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Identify assets with web components</strong></td><td><code>EasmAssetWebComponent_CL | project AssetName_s, ComponentName_s, Version_s</code></td><td>Shows web components (e.g., CMS, frameworks) detected on assets.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Detect potential contact leaks</strong></td><td><code>EasmContactAsset_CL | project ContactEmail_s, DiscoverySource_s</code></td><td>Retrieves contact email addresses exposed on public-facing assets.</td></tr></tbody></table>
</div>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><tbody><tr><td><strong>Track SSL certificate lifecycle</strong></td><td><code>EasmSslCertAsset_CL | summarize count() by SslCertStatus_s</code></td><td>Summarizes SSL certificate statuses (e.g., expired, expiring soon).</td></tr></tbody></table>
</div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Log Analytics query summarizing EasmAsset_CL by asset type"
    width="2000"
    height="1077"
    src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-14_hu_662765e96d9bc01b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/image-14.webp"></figure>
<h3 class="relative group">Benefits:
    <div id="benefits" class="anchor"></div>
    
</h3>
<ul>
<li>Unified monitoring across platforms</li>
<li>Automated responses through Sentinel playbooks</li>
</ul>

<h2 class="relative group">Testing the configuration
    <div id="testing-the-configuration" class="anchor"></div>
    
</h2>
<p>Testing ensures your EASM setup is functioning correctly</p>

<h3 class="relative group">Simulations:
    <div id="simulations" class="anchor"></div>
    
</h3>
<ol>
<li>Open port scanning:
<ul>
<li>Use tools like <strong>Nmap</strong> to identify open ports and validate alerts</li>
</ul>
</li>
<li>SSL certificate testing:
<ul>
<li>Use expired or invalid certificates to test alert triggers</li>
</ul>
</li>
</ol>

<h2 class="relative group">Extra resources
    <div id="extra-resources" class="anchor"></div>
    
</h2>
<p>Make sure to check out the EASM github page, because there are useful resources there which might handy to use and integrate:</p>
<p><a href="https://github.com/Azure/MDEASM-Solutions"  target="_blank" rel="noreferrer">https://github.com/Azure/MDEASM-Solutions</a></p>

<h2 class="relative group">The role of EASM in exposure management
    <div id="the-role-of-easm-in-exposure-management" class="anchor"></div>
    
</h2>
<p>Microsoft Defender External Attack Surface Management (EASM) is not just a tool for asset discovery. It is a critical enabler for effective exposure management. Exposure management is about identifying, prioritizing, and mitigating risks across your entire attack surface, including internal and external assets. While traditional tools focus on internal vulnerabilities, EASM ensures no external-facing risk goes unnoticed.</p>

<h3 class="relative group">How EASM complements exposure management
    <div id="how-easm-complements-exposure-management" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Identifying shadow IT</strong>: EASM excels in discovering unmanaged or unknown assets that often go unnoticed, such as forgotten subdomains, unsecured APIs, or legacy IPs</li>
<li><strong>Continuous monitoring</strong>: By providing real-time insights, EASM enables organizations to detect and respond to changes in their attack surface, such as the exposure of new ports or the deployment of insecure services</li>
<li><strong>Risk prioritization</strong>: Not all vulnerabilities are equal. EASM helps prioritize risks based on severity, such as misconfigurations that allow unrestricted public access or assets running unsupported software versions</li>
<li><strong>Integration with broader tools</strong>: EASM’s ability to feed data into Microsoft Sentinel ensures its findings are part of a unified threat detection and response strategy. This integration is essential for correlating external risks with internal vulnerabilities</li>
</ol>

<h3 class="relative group">Why EASM data matters in exposure management
    <div id="why-easm-data-matters-in-exposure-management" class="anchor"></div>
    
</h3>
<p>Organizations leveraging EASM data within their exposure management framework benefit from:</p>
<ul>
<li><strong>Proactive risk reduction</strong>: Addressing vulnerabilities before they are exploited by attackers</li>
<li><strong>Improved visibility</strong>: Ensuring a complete view of all assets, both managed and unmanaged</li>
<li><strong>Streamlined compliance</strong>: Demonstrating control over external assets for frameworks such as ISO 27001 or GDPR</li>
<li><strong>Enhanced threat intelligence</strong>: Correlating EASM findings with threat trends, enabling informed decisions on remediation</li>
</ul>
<p>By integrating EASM with internal tools and processes, organizations can achieve a 360-degree view of their exposure, aligning their security posture with a proactive, defense-in-depth approach.</p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Microsoft Defender External Attack Surface Management is an indispensable tool for modern organizations aiming to reduce their attack surface and strengthen their cybersecurity posture. Its ability to identify, monitor, and manage external-facing assets ensures no vulnerabilities are left unaddressed. By integrating EASM into a broader exposure management strategy, organizations benefit from:</p>
<ul>
<li><strong>Comprehensive visibility</strong>: A clear picture of all external-facing assets, enabling informed decision-making</li>
<li><strong>Actionable insights</strong>: Prioritized remediation efforts that address the most critical risks first</li>
<li><strong>Seamless integration</strong>: Unified data streams into Microsoft Sentinel, enhancing incident response and overall security operations</li>
</ul>
<p>Incorporating EASM into your cybersecurity framework not only mitigates external risks but also complements internal risk management practices, creating a cohesive, proactive defense strategy. By addressing both external and internal vulnerabilities, you can ensure a resilient security posture that evolves with the ever-changing threat landscape.</p>
<p>Leverage Microsoft Defender External Attack Surface Management to protect what attackers target most: your external assets. With its advanced capabilities and integration potential, EASM is not just a tool. It’s a cornerstone of effective exposure management.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/featured_hu_d4de2689a15017f4.jpg" medium="image" type="image/jpeg" width="1185" height="673"/><enclosure url="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/featured_hu_d4de2689a15017f4.jpg" type="image/jpeg" length="84715"/></item><item><title>Maester – Swiss army knife for M365 security testing</title><link>https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/</link><guid isPermaLink="true">https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/</guid><pubDate>Wed, 16 Oct 2024 21:30:25 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Compliance</category><description>Discover Maester: automate Microsoft 365 security with tests, alerts, and reports. Ensure compliance, enhance security, and stay proactive in your tenants.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>In today’s digital environment, security and compliance are vital for organizations to protect their assets and meet regulatory standards. While traditional frameworks like CIS Controls offer a solid foundation, they often lack the flexibility and specificity needed for dynamic, modern threats.</p>
<p>Maester is an open-source PowerShell-based test automation framework designed to help monitor and maintain the security configuration of Microsoft 365 environments. It provides automated testing, customizable tests, and integration with DevOps pipelines for continuous monitoring.</p>
<p>This guide will cover high over aspects from installation and configuration to integration with DevOps workflows, custom test creation, alerting options, and a breakdown of its policy tests. By the end, you’ll see why Maester is an invaluable tool for <a href="https://www.modernsecurity.nl/" >security professionals</a> seeking to elevate their organization’s security posture.</p>

<h2 class="relative group">What is Maester and why use it?
    <div id="what-is-maester-and-why-use-it" class="anchor"></div>
    
</h2>
<p>Maester is a versatile, automated security assessment and compliance tool for Microsoft 365 environments. Built on PowerShell with the Pester testing framework, enables organizations to enforce security policies and can continuously monitor compliance. With comprehensive reporting, DevOps integrations, and customizable tests, Maester ensures that your organization maintains a proactive stance on security.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Maester test results summary with passed and failed tests by category"
    width="2000"
    height="1211"
    src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/maester-report_hu_ac2e3f9e5626d4bf.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/maester-report.webp"><figcaption>Source: Maester.dev</figcaption></figure>
<h2 class="relative group">How it works
    <div id="how-it-works" class="anchor"></div>
    
</h2>
<p>Maester follows a structured process to gather, analyze, and report security data:</p>
<ol>
<li><strong>Data Collection</strong>: Gathers information from your Microsoft 365 environment, such as configurations, policies, and user settings.</li>
<li><strong>Policy verification</strong>: Runs extensive tests against best practices and predefined security standards.</li>
<li><strong>Detailed reporting</strong>: Generates comprehensive reports with insights into security posture, categorized by severity.</li>
<li><strong>Continuous monitoring</strong>: Offers automated scans on a scheduled basis via DevOps integration.</li>
<li><strong>Real-time alerts</strong>: Provides configurable alerts via email, Slack, or Teams to notify your team of critical findings instantly.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Source: Maester.dev"
    width="2000"
    height="1223"
    src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/maester-architecture_hu_96085789a2de3718.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/maester-architecture.webp"><figcaption>Source: Maester.dev</figcaption></figure>
<h2 class="relative group">Prerequisites and requirements
    <div id="prerequisites-and-requirements" class="anchor"></div>
    
</h2>
<p>Before deploying Maester, ensure that your environment meets the following requirements:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Requirement</th>
              <th>Details</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Operating System</strong></td>
            <td>Windows Operating System</td>
        </tr>
        <tr>
            <td><strong>PowerShell Version</strong></td>
            <td>Requires PowerShell 7.2 or later</td>
        </tr>
        <tr>
            <td><strong>Microsoft 365 Access</strong></td>
            <td>Necessary permissions to access and manage your Microsoft 365 tenant</td>
        </tr>
        <tr>
            <td><strong>Azure Subscription</strong></td>
            <td>Optional, for integration with Azure DevOps or Azure Automation</td>
        </tr>
    </tbody>
  </table>
</div>
<p>These prerequisites ensure that Maester can operate effectively within your environment.</p>

<h2 class="relative group">Installation process
    <div id="installation-process" class="anchor"></div>
    
</h2>
<p>To install Maester and its dependencies, follow these steps:</p>
<ol>
<li><strong>Install the Pester Module</strong>:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">  <span class="nb">Install-Module</span> <span class="n">Pester</span> <span class="n">-SkipPublisherCheck</span> <span class="n">-Force</span> <span class="n">-Scope</span> <span class="n">CurrentUser</span></span></span></code></pre></div></div>
<p><em>Note</em>: The <code>-SkipPublisherCheck</code> parameter is used to bypass the publisher check.</p>
<ol start="2">
<li><strong>Install the Maester Module</strong>:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">   <span class="nb">Install-Module</span> <span class="n">Maester</span> <span class="n">-Scope</span> <span class="n">CurrentUser</span></span></span></code></pre></div></div>
<ol start="3">
<li><strong>Set up the test directory and install Maester Tests</strong>:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">   md maester-tests
</span></span><span class="line"><span class="cl">   <span class="nb">cd</span> maester-tests
</span></span><span class="line"><span class="cl">   Install-MaesterTests</span></span></code></pre></div></div>
<p>This creates a directory named <code>maester-tests</code>, navigates into it, and installs the Maester test suite.</p>
<ol start="4">
<li><strong>Connect to your Microsoft 365 Tenant</strong>:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">   <span class="nb">Connect-Maester</span></span></span></code></pre></div></div>
<p>This command initiates a sign-in process to your Microsoft 365 tenant.</p>
<ol start="5">
<li><strong>Run the Maester tests</strong>:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">   <span class="nb">Invoke-Maester</span></span></span></code></pre></div></div>
<p>This executes the installed tests against your tenant.</p>
<p><strong>Optional Modules for additional tests</strong>:</p>
<p>Maester includes optional tests, such as those from the Cybersecurity and Infrastructure Security Agency (CISA), which require additional modules:</p>
<ul>
<li><strong>Azure Module</strong>:</li>
</ul>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">   <span class="nb">Install-Module</span> <span class="n">Az</span> <span class="n">-Scope</span> <span class="n">CurrentUser</span></span></span></code></pre></div></div>
<ul>
<li><strong>Exchange Online Management Module</strong>:</li>
</ul>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">   <span class="nb">Install-Module</span> <span class="n">ExchangeOnlineManagement</span> <span class="n">-Scope</span> <span class="n">CurrentUser</span></span></span></code></pre></div></div>
<p>After installing these modules, connect to the respective services:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"><span class="nb">Connect-Maester</span> <span class="n">-Service</span> <span class="n">All</span></span></span></code></pre></div></div>
<p>This command prompts you to sign in to Azure, Exchange Online, and other services as needed.</p>
<p>For detailed information, refer to the <a href="https://maester.dev/docs/installation/"  target="_blank" rel="noreferrer">Maester Installation Guide</a> and/or see below key commands.</p>

<h2 class="relative group">Key commands
    <div id="key-commands" class="anchor"></div>
    
</h2>
<p>Below is a summary of the most commonly used commands in Maester for installation, configuration, test execution, and troubleshooting:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Command</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><code>Connect-Maester</code></td>
            <td>Connects to your Microsoft 365 tenant, initiating the authentication process.</td>
        </tr>
        <tr>
            <td><code>Invoke-Maester</code></td>
            <td>Runs all Maester tests in the current directory against your connected tenant.</td>
        </tr>
        <tr>
            <td><code>Invoke-Maester -Tags &quot;&lt;Tag&gt;&quot;</code></td>
            <td>Runs tests filtered by specific tags (e.g., <code>&quot;Compliance&quot;</code>, <code>&quot;Security&quot;</code>).</td>
        </tr>
        <tr>
            <td><code>Invoke-Maester -Test &quot;&lt;TestName&gt;&quot;</code></td>
            <td>Runs a specific test by name.</td>
        </tr>
        <tr>
            <td><code>Export-MaesterReport</code></td>
            <td>Exports test results to an HTML or JSON report for sharing and review.</td>
        </tr>
        <tr>
            <td><code>Update-Maester</code></td>
            <td>Updates the Maester module to the latest version.</td>
        </tr>
        <tr>
            <td><code>Update-MaesterTests</code></td>
            <td>Updates the test suite to include the latest tests and configurations.</td>
        </tr>
        <tr>
            <td><code>Get-MaesterTests</code></td>
            <td>Lists all available tests installed in the current directory.</td>
        </tr>
        <tr>
            <td><code>Install-Module Az</code></td>
            <td>Installs the Azure module, required for certain Azure-related tests.</td>
        </tr>
        <tr>
            <td><code>Install-Module ExchangeOnlineManagement</code></td>
            <td>Installs the Exchange Online Management module for tests involving Exchange configurations.</td>
        </tr>
        <tr>
            <td><code>Connect-Maester -Service All</code></td>
            <td>Connects to all relevant services (e.g., Azure AD, Exchange Online) for comprehensive testing.</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Examples of using commands
    <div id="examples-of-using-commands" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Run all tests with default configuration</strong>:</li>
</ul>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">  <span class="nb">Invoke-Maester</span></span></span></code></pre></div></div>
<ul>
<li><strong>Generate a detailed HTML report</strong>:</li>
</ul>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl"> <span class="nv">$results</span> <span class="p">=</span> <span class="nb">Invoke-Maester</span>
</span></span><span class="line"><span class="cl"> <span class="nv">$results</span> <span class="p">|</span> <span class="nb">Export-MaesterReport</span> <span class="n">-Format</span> <span class="n">HTML</span> <span class="n">-Path</span> <span class="p">.\</span><span class="n">TestReport</span><span class="p">.</span><span class="n">html</span></span></span></code></pre></div></div>
<ul>
<li><strong>Update Maester Tests</strong>:</li>
</ul>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">  <span class="nb">Update-MaesterTests</span></span></span></code></pre></div></div>

<h3 class="relative group">Tips for using commands
    <div id="tips-for-using-commands" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Filtering tests</strong>: Use <code>-Tags</code> or <code>-Test</code> parameters with <code>Invoke-Maester</code> to focus on specific areas like compliance or security.</li>
<li><strong>Exporting results</strong>: Always use <code>Export-MaesterReport</code> to generate shareable reports in formats like HTML or JSON.</li>
<li><strong>Staying up to date</strong>: Regularly run <code>Update-Maester</code> and <code>Update-MaesterTests</code> to ensure you’re using the latest features and test suites.</li>
</ul>

<h2 class="relative group">Overview of the core tests and policies
    <div id="overview-of-the-core-tests-and-policies" class="anchor"></div>
    
</h2>
<p>Maester’s extensive suite of tests covers essential security areas. Here’s a breakdown of key tests and policies:</p>

<h3 class="relative group">Authentication methods
    <div id="authentication-methods" class="anchor"></div>
    
</h3>
<p>Authentication checks focus on ensuring secure user authentication mechanisms are in place to prevent unauthorized access.</p>
<ul>
<li><strong>FIDO2 security keys</strong>: Verifies if FIDO2 keys are enforced for login, ensuring passwordless authentication methods are in use. It checks if self-service key registration is restricted to prevent unauthorized devices from being added and ensures proper attestation is required during registration to validate device authenticity.</li>
<li><strong>Microsoft Authenticator</strong>: Examines settings to confirm advanced security features are enabled. This includes:</li>
<li>Number matching to mitigate push notification attacks.</li>
<li>Application context to help users recognize legitimate login prompts.</li>
<li>Displaying geographic information to provide additional context during authentication attempts.</li>
<li><strong>Temporary access pass</strong>: Ensures temporary access passes are configured for one-time, time-limited use. This is useful for onboarding users without a traditional password.</li>
</ul>

<h3 class="relative group">Authorization and permissions
    <div id="authorization-and-permissions" class="anchor"></div>
    
</h3>
<p>These checks validate the organization’s default permissions, ensuring guests and users are granted minimal access by default.</p>
<ul>
<li><strong>Default guest permissions</strong>: Assesses whether guest users are restricted from accessing sensitive resources, ensuring compliance with the principle of least privilege.</li>
<li><strong>Risk-based admin consent</strong>: Ensures policies are in place to require step-up consent for high-risk scenarios, adding an extra layer of protection when users approve application permissions.</li>
<li><strong>Self-service policies</strong>: Verifies configurations that allow or restrict users from performing self-service operations, such as registering security keys or managing roles.</li>
</ul>

<h3 class="relative group">Password rules
    <div id="password-rules" class="anchor"></div>
    
</h3>
<p>Checks here ensure that strong password policies are enforced to protect against credential compromise.</p>
<ul>
<li><strong>Password protection</strong>:</li>
<li>Validates the use of custom or default banned password lists to prevent weak or predictable passwords.</li>
<li>Checks smart lockout thresholds to reduce brute-force attempts.</li>
<li><strong>Expiration policies</strong>:</li>
<li>Verifies whether passwords have a defined expiration interval to limit exposure to compromised credentials.</li>
<li>Ensures policies require users to change passwords upon first use, enhancing security during onboarding.</li>
</ul>

<h3 class="relative group">Conditional access policies
    <div id="conditional-access-policies" class="anchor"></div>
    
</h3>
<p>Conditional access checks enforce secure access to resources by applying contextual rules.</p>
<ul>
<li><strong>Device compliance</strong>: Verifies whether policies enforce that only compliant devices (e.g., with encryption, antivirus, and updated OS) can access organizational resources.</li>
<li><strong>Legacy authentication</strong>: Ensures that legacy protocols (like POP and IMAP) are blocked, as these do not support modern authentication methods, making them more vulnerable.</li>
<li><strong>MFA enforcement</strong>:</li>
<li>Confirms that multi-factor authentication (MFA) is mandatory for all users, including guests.</li>
<li>Checks if MFA is required for risky sign-ins, such as those originating from untrusted locations or devices.</li>
<li><strong>Named location policies</strong>: Validates restrictions on access based on geographic locations, ensuring that only users from approved regions can log in.</li>
</ul>

<h3 class="relative group">Privileged access management
    <div id="privileged-access-management" class="anchor"></div>
    
</h3>
<p>These checks ensure that administrative roles and permissions follow best practices.</p>
<ul>
<li><strong>Role assignments</strong>:</li>
<li>Confirms that least-privilege principles are enforced, ensuring roles are assigned only as needed.</li>
<li>Validates that privileged roles are not permanently active, reducing the risk of privilege escalation.</li>
<li><strong>Alerts for privileged role activation</strong>: Verifies whether notifications are configured for privileged role activations to alert administrators of potential misuse.</li>
<li><strong>Privileged identity management (PIM)</strong>: Ensures that PIM is configured and active, providing just-in-time access and additional auditing capabilities for sensitive roles.</li>
</ul>

<h3 class="relative group">Email security (Exchange Online)
    <div id="email-security-exchange-online" class="anchor"></div>
    
</h3>
<p>Email-related checks focus on securing communications and preventing spoofing or unauthorized access.</p>
<ul>
<li><strong>SPF, DKIM, and DMARC</strong>:</li>
<li>Validates configurations for Sender Policy Framework (SPF), DomainKeys Identified Mail (DKIM), and Domain-based Message Authentication, Reporting, and Conformance (DMARC) to protect against email spoofing and phishing.</li>
<li><strong>External sender warnings</strong>: Ensures warning banners are displayed for emails originating from external domains, helping users identify potential phishing attempts.</li>
<li><strong>Email forwarding</strong>: Verifies that automatic forwarding to external domains is blocked to prevent sensitive data from being inadvertently shared.</li>
</ul>

<h3 class="relative group">Consent and app management
    <div id="consent-and-app-management" class="anchor"></div>
    
</h3>
<p>These checks assess how permissions and consent workflows are managed for applications in the tenant.</p>
<ul>
<li><strong>Admin consent policies</strong>: Ensures policies require admin approval for third-party applications requesting sensitive permissions, reducing the risk of unauthorized app access.</li>
<li><strong>App consent reviews</strong>: Validates whether periodic reviews of app consent workflows are performed to detect and revoke unnecessary or risky permissions.</li>
</ul>

<h3 class="relative group">Risk management
    <div id="risk-management" class="anchor"></div>
    
</h3>
<p>Risk-based checks evaluate the organization’s ability to detect and respond to suspicious activities.</p>
<ul>
<li><strong>Sign-in risk policies</strong>: Validates whether conditional access policies address risky user sign-ins, such as those from untrusted locations or devices.</li>
<li><strong>User risk policies</strong>: Checks if thresholds are set for triggering risk-based actions, such as password resets or account lockouts, to mitigate threats.</li>
</ul>

<h3 class="relative group">Microsoft Entra security
    <div id="microsoft-entra-security" class="anchor"></div>
    
</h3>
<p>These checks focus on enforcing security best practices within Microsoft Entra (formerly Azure AD).</p>
<ul>
<li><strong>Blocking legacy protocols</strong>: Ensures legacy authentication protocols are blocked, as these are common attack vectors.</li>
<li><strong>Identity protection policies</strong>: Verifies the implementation of Identity Protection policies to manage and mitigate risks for users and roles with elevated privileges.</li>
</ul>
<hr>

<h2 class="relative group">Interpreting Maester’s output
    <div id="interpreting-maesters-output" class="anchor"></div>
    
</h2>
<p>Maester generates comprehensive reports, categorizing issues by severity:</p>
<p><strong>Pass</strong>: Configuration meets the requirements</p>
<p><strong>Fail</strong>: Configuration violates the defined policy</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Maester test results in dark mode with the test summary and status chart"
    width="2000"
    height="1270"
    src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/afbeelding_hu_b7b166769ca4123f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/afbeelding.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Maester test details listing Entra ID authentication method tests with their status"
    width="2000"
    height="1270"
    src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/afbeelding-1_hu_89a85b4844f2eb5.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/afbeelding-1.webp"></figure><p>Reports are available in JSON and CSV formats, making it easy to export.</p>

<h2 class="relative group">Real-Time alerting with Email, Slack, and Microsoft Teams
    <div id="real-time-alerting-with-email-slack-and-microsoft-teams" class="anchor"></div>
    
</h2>
<p>Maester offers flexible alerting options, allowing security teams to stay informed of critical issues as soon as they’re detected. Configuring alerts ensures that any significant findings are communicated instantly, facilitating rapid response.</p>
<ul>
<li><strong>Email alerts</strong>: Set up email notifications for critical findings, delivered directly to your inbox.</li>
<li><strong>Slack integration</strong>: Configure Slack alerts to notify a specific channel, enabling collaborative responses.</li>
<li><strong>Microsoft Teams</strong>: For Teams users, configure alerts to deliver notifications to a designated security channel.</li>
</ul>
<p>These alerting options help you keep your team in the loop, enabling real-time, collaborative incident response.</p>

<h2 class="relative group">Integrating with DevOps pipelines
    <div id="integrating-with-devops-pipelines" class="anchor"></div>
    
</h2>
<p>Maester integrates with DevOps tools to make security an integral part of the CI/CD pipeline.</p>

<h3 class="relative group">Azure DevOps integration
    <div id="azure-devops-integration" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Create an Azure DevOps project</strong>: Set up a dedicated project for Maester tests.</li>
<li><strong>Import Maester Tests</strong>: Clone the <a href="https://github.com/maester365/maester-tests"  target="_blank" rel="noreferrer">Maester Tests repository</a> into Azure DevOps.</li>
<li><strong>Configure pipelines</strong>: Set up an Azure pipeline to automate Maester tests on a schedule or based on specific triggers (e.g., configuration changes).</li>
</ol>
<p>Refer to the <a href="https://maester.dev/docs/monitoring/azure-devops/"  target="_blank" rel="noreferrer">Azure DevOps integration documentation</a> for detailed setup instructions.</p>

<h3 class="relative group">GitHub Actions integration
    <div id="github-actions-integration" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Create a GitHub repository</strong>: Host Maester tests in a repository.</li>
<li><strong>Clone the Maester Tests</strong>: Copy the Maester Tests repository to GitHub.</li>
<li><strong>Set up workflows</strong>: Configure GitHub Actions to run Maester tests on schedule or in response to events (e.g., pushes, pull requests).</li>
</ol>
<p>For setup instructions, see the <a href="https://maester.dev/docs/monitoring/github-actions/"  target="_blank" rel="noreferrer">GitHub Actions integration documentation</a>.</p>

<h2 class="relative group">Writing custom tests in Maester
    <div id="writing-custom-tests-in-maester" class="anchor"></div>
    
</h2>
<p>Custom tests extend Maester’s functionality, allowing you to enforce unique security policies.</p>
<ol>
<li><strong>Create a custom test file</strong>: Add a new <code>.Tests.ps1</code> file in the <code>Custom</code> directory.</li>
<li><strong>Write the test using pester</strong>: Define tests using the Pester framework. For example, to check if a specific security group exists:</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">PowerShell</div><pre tabindex="0" class="chroma"><code class="language-powershell" data-lang="powershell"><span class="line"><span class="cl">   <span class="n">Describe</span> <span class="s2">&#34;Security Group Validation&#34;</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">       <span class="n">It</span> <span class="s2">&#34;Verifies the &#39;Admins&#39; group exists&#34;</span> <span class="p">{</span>
</span></span><span class="line"><span class="cl">           <span class="nb">Get-AzureADGroup</span> <span class="n">-Filter</span> <span class="s2">&#34;DisplayName eq &#39;Admins&#39;&#34;</span> <span class="p">|</span> <span class="n">Should</span> <span class="o">-Not</span> <span class="n">-BeNullOrEmpty</span>
</span></span><span class="line"><span class="cl">       <span class="p">}</span>
</span></span><span class="line"><span class="cl">   <span class="p">}</span></span></span></code></pre></div></div>
<p>These custom tests provide flexibility to adapt Maester to your organization’s specific security requirements.</p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Maester is a comprehensive tool for security compliance and vulnerability management in Microsoft 365 environments. Its extensive test library, customization, seamless DevOps integration, and flexible alerting options make it an essential part of any modern security strategy.</p>
<p>With real-time alerts delivered via email, Slack, or Microsoft Teams, Maester keeps security teams informed, enabling rapid response to critical issues. Whether for routine audits, real-time vulnerability management, or custom policy enforcement, Maester empowers your organization to stay proactive and resilient in today’s complex cybersecurity landscape.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/featured_hu_532a35dce89de9e8.jpg" medium="image" type="image/jpeg" width="1200" height="678"/><enclosure url="https://www.modernsecurity.nl/maester-swiss-army-knife-m365-security/featured_hu_532a35dce89de9e8.jpg" type="image/jpeg" length="52749"/></item><item><title>Maximizing security with Microsoft Defender for Identity</title><link>https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/</guid><pubDate>Thu, 08 Aug 2024 20:03:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Identity</category><category>Microsoft Defender for Identity</category><category>Security</category><description>Protect your organization’s identities with Microsoft Defender for Identity. Detect threats, improve security posture, and reduce attack surfaces effectively.</description><content:encoded><![CDATA[
<h2 class="relative group">What is Microsoft Defender for Identity?
    <div id="what-is-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>
<p><strong>Microsoft Defender for Identity</strong> is a robust, cloud-based security solution designed to safeguard your organization’s on-premises Active Directory (AD) and cloud identities. Leveraging signals from both environments, it identifies, detects, and investigates advanced threats, compromised identities, and malicious insider actions. Formerly known as Azure Advanced Threat Protection (Azure ATP), it integrates seamlessly with Microsoft Defender XDR to provide comprehensive identity threat detection and response (ITDR) capabilities.</p>
<p>In today’s cybersecurity landscape, identity-based attacks are increasingly common. Hackers frequently exploit identity vulnerabilities to gain unauthorized access, move laterally within networks, and escalate privileges. These techniques are not only prevalent in real-world attacks but also regularly encountered during red teaming engagements, where security professionals simulate attacks to test an organization’s defenses. Microsoft Defender for Identity is specifically designed to counter these sophisticated threats, providing organizations with the tools they need to protect their identities and maintain robust security postures.</p>

<h2 class="relative group">What’s New in Microsoft Defender for Identity?
    <div id="whats-new-in-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>

<h3 class="relative group">October 2024: Enhanced threat detection capabilities
    <div id="october-2024-enhanced-threat-detection-capabilities" class="anchor"></div>
    
</h3>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/whats-new#mdi-is-expanding-coverage-with-new-10-identity-posture-recommendations"  target="_blank" rel="noreferrer">In October 2024, Microsoft Defender for Identity introduced enhanced threat detection capabilities. These updates include improved machine learning algorithms for detecting lateral movement and credential theft, as well as new integrations with Microsoft Sentinel for more robust incident response.</a></p>

<h3 class="relative group">August 2024: New Entra Connect Sensor
    <div id="august-2024-new-entra-connect-sensor" class="anchor"></div>
    
</h3>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/whats-new#august-2024"  target="_blank" rel="noreferrer">In August 2024, a new Entra Connect sensor was introduced to enhance coverage in hybrid identity environments. This update also included new hybrid security detections and identity posture recommendations.</a></p>

<h3 class="relative group">July 2024: Identity Posture insights
    <div id="july-2024-identity-posture-insights" class="anchor"></div>
    
</h3>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/whats-new#july-2024"  target="_blank" rel="noreferrer">Released in July 2024, the Identity Posture Insights feature provides detailed assessments of an organization’s identity security posture, including recommendations for improving security configurations and reducing the attack surface.</a></p>

<h2 class="relative group">Detailed overview of Identity Posture recommendations
    <div id="detailed-overview-of-identity-posture-recommendations" class="anchor"></div>
    
</h2>

<h3 class="relative group">October 2024
    <div id="october-2024" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Accounts with non-default primary group id</strong><a href="https://techcommunity.microsoft.com/t5/microsoft-defender-for-identity/secure-score-accounts-with-non-default-primary-group-id/m-p/4262784"  target="_blank" rel="noreferrer">: Identifies accounts with a primary group ID that is not the default, which can be a sign of misconfiguration or potential security risk</a>.</li>
<li><strong>Change domain controller computer account old password</strong><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/windows-security/use-netdom-reset-domain-controller-password"  target="_blank" rel="noreferrer">: Recommends changing the old password for domain controller computer accounts to prevent unauthorized access</a>.</li>
<li><strong>GPO assigns unprivileged identities to local groups with elevated privileges</strong><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory"  target="_blank" rel="noreferrer">: Detects Group Policy Objects (GPOs) that assign unprivileged identities to local groups with elevated privileges, which can be exploited by attackers</a>.</li>
<li><strong>GPO can be modified by unprivileged accounts</strong><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/implementing-least-privilege-administrative-models"  target="_blank" rel="noreferrer">: Identifies GPOs that can be modified by unprivileged accounts, posing a significant security risk</a>.</li>
<li><strong>Reversible passwords found in GPOs</strong><a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/store-passwords-using-reversible-encryption"  target="_blank" rel="noreferrer">: Alerts on GPOs that store passwords in a reversible format, which can be easily compromised</a>.</li>
<li><strong>Built-in Active Directory guest account is enabled</strong><a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/accounts-guest-account-status"  target="_blank" rel="noreferrer">: Detects if the built-in AD Guest account is enabled, which can be a security vulnerability</a>.</li>
<li><strong>Unsafe permissions on the DnsAdmins group</strong><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-groups"  target="_blank" rel="noreferrer">: Identifies unsafe permissions on the DnsAdmins group, which can be exploited to gain elevated privileges</a>.</li>
<li><strong>Ensure all privileged accounts have the configuration flag “This Account is sensitive and cannot be delegated”</strong><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/how-to-configure-protected-accounts"  target="_blank" rel="noreferrer">: Recommends ensuring that all privileged accounts have this configuration flag set to prevent delegation attacks</a>.</li>
<li><strong>Change password of krbtgt account</strong><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/forest-recovery-guide/ad-forest-recovery-reset-the-krbtgt-password"  target="_blank" rel="noreferrer">: Advises changing the password of the krbtgt account to mitigate the risk of Kerberos ticket-granting ticket (TGT) attacks</a>.</li>
</ul>

<h3 class="relative group">August 2024
    <div id="august-2024" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Rotate password for Entra Connect Connector account</strong>: Recommends changing the password of MSOL accounts with the password last set over 90 days ago to prevent unauthorized access.</li>
<li><strong>Remove unnecessary replication permissions for Entra Connect account</strong>: Advises removing unnecessary permissions to reduce the potential attack surface.</li>
<li><strong>Change password for Entra Seamless SSO account configuration</strong>: Lists all Entra seamless SSO computer accounts with passwords last set over 90 days ago and recommends changing them to prevent lateral movement attacks.</li>
<li><strong>Suspicious interactive logon to the Entra Connect server</strong>: Detects unusual and potentially malicious direct logins to Entra Connect servers.</li>
</ul>

<h3 class="relative group">July 2024
    <div id="july-2024" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Lateral movement path analysis</strong>: Identifies potential paths attackers could use to move laterally within the network.</li>
<li><strong>Security configuration assessments</strong>: Evaluates current security settings and suggests improvements.</li>
<li><strong>User Behavior Analytics</strong>: Monitors user activities to detect anomalies that could indicate compromised identities.</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Microsoft Secure Score recommended actions for Defender for Identity"
    width="1789"
    height="1097"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/afbeelding_hu_fde2ac8ef61a8195.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/afbeelding.webp"><figcaption>Updated October 2024 screenshot with the latest recommendations</figcaption></figure>
<h2 class="relative group">Prerequisites for Microsoft Defender for Identity
    <div id="prerequisites-for-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>
<p>Before deploying Microsoft Defender for Identity, ensure the following prerequisites are met:</p>
<ul>
<li><strong>Licensing requirements</strong>: One of the following Microsoft 365 licenses is required:
<ul>
<li>Enterprise Mobility + Security E5 (EMS E5/A5)</li>
<li>Microsoft 365 E5 (Microsoft E5/A5/G5)</li>
<li>Microsoft 365 E5/A5/G5/F5 Security</li>
<li>Microsoft 365 F5 Security + Compliance</li>
<li>A standalone Defender for Identity license.</li>
</ul>
</li>
<li><strong>Required permissions</strong>: At least one Security administrator access on your Microsoft Entra ID tenant.</li>
<li><strong>Connectivity requirements</strong>: The Defender for Identity sensor must communicate with the Defender for Identity cloud service via proxy, ExpressRoute, or firewall configurations.</li>
<li><strong>System requirements</strong>: Ensure the servers where the sensors will be installed meet the necessary specifications.</li>
</ul>

<h2 class="relative group">How to Deploy the New Features in Microsoft Defender for Identity
    <div id="how-to-deploy-the-new-features-in-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>
<p>(<a href="" >check out my new blog post for an extensive overview on how to install the Defender for Identity Sensor or Entra Connector sensor – below is just a quick summary</a>)</p>

<h3 class="relative group">Deployment via Entra Connector Sensor
    <div id="deployment-via-entra-connector-sensor" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Install the Entra Connector sensor</strong>: Download the Entra Connector Sensor from the Microsoft Defender for Identity portal. Download and run the installer and follow the on-screen instructions to complete the installation.</li>
<li><strong>Configure the sensor</strong>: Open the Entra Connector Sensor configuration tool. Enter the required credentials and configuration settings. Save the configuration and start the sensor.</li>
<li><strong>Verify deployment</strong>: Log in to the Microsoft Defender for Identity portal. Navigate to the Sensors page and verify that the Entra Connector Sensor is active and reporting data.</li>
<li><strong>Configure logging and event logs</strong>: Ensure that the necessary Windows event logs are being collected. Configure Advanced Audit Policy settings to ensure these events are logged correctly.</li>
</ol>

<h3 class="relative group">Deployment via Defender for Identity
    <div id="deployment-via-defender-for-identity" class="anchor"></div>
    
</h3>
<ol>
<li><strong>Access the Defender for Identity portal</strong>: Log in to the Microsoft Defender for Identity portal.</li>
<li><strong>Configure Identity sensors</strong>: Navigate to the Sensors page. Click on “Add Sensor” and select the appropriate sensor type. Follow the on-screen instructions to configure the sensor settings.</li>
<li><strong>Monitor and manage sensors</strong>: Once configured, monitor the sensor status and data flow from the Sensors page. Ensure that all sensors are active and reporting data correctly.</li>
<li><strong>Configure logging and event logs</strong>: Ensure that the necessary Windows event logs are being collected. Configure Advanced Audit Policy settings to ensure these events are logged correctly.</li>
<li><strong>Review and troubleshoot logs</strong>: The Defender for Identity sensor logs are located in the installation directory, typically at <code>C:\Program Files\Azure Advanced Threat Protection Sensor\Logs</code>. Key logs include: Microsoft.Tri.Sensor.log (contains overall status and operations), Microsoft.Tri.Sensor-Errors.log (contains error logs for troubleshooting), Microsoft.Tri.Sensor.Updater.log (logs related to sensor updates).</li>
</ol>

<h2 class="relative group">Configuration steps for Microsoft Defender for Identity
    <div id="configuration-steps-for-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>
<ol>
<li><strong>View and configure sensor settings</strong>:
<ul>
<li>Navigate to Settings &gt; Identities &gt; Sensors in the Microsoft Defender XDR portal.</li>
<li>Configure sensor details such as domain controllers, network adapters, and update settings.</li>
</ul>
</li>
<li><strong>Set up directory service accounts</strong>:
<ul>
<li>Add Directory Service Accounts with read access to all objects in the monitored domains.</li>
</ul>
</li>
<li><strong>Enable advanced features</strong>:
<ul>
<li>Enable features like sensitive accounts monitoring, alert notifications, and syslog integration for enhanced security.</li>
</ul>
</li>
</ol>

<h2 class="relative group">Post-Deployment Steps
    <div id="post-deployment-steps" class="anchor"></div>
    
</h2>
<p>After deploying Microsoft Defender for Identity, follow these steps to ensure optimal performance and security:</p>
<p><strong>Regularly review security posture</strong>: Use the Identity Posture Insights feature to regularly review and improve <a href="https://www.modernsecurity.nl/microsoft-security-exposure-management/" >your organization’s identity security posture</a>.</p>
<p><strong>Verify sensor health</strong>: Regularly check the health status of all deployed sensors in the Microsoft Defender for Identity portal.</p>
<p><strong>Configure alerts and notifications</strong>: Set up alerts and notifications for suspicious activities and potential threats.</p>
<p><strong>Integrate with other security tools</strong>: Integrate Defender for Identity with other Microsoft security tools like Microsoft Sentinel and Microsoft Defender for Endpoint for comprehensive threat detection and response.</p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Microsoft Defender for Identity is a powerful tool for protecting your organization’s identities and reducing the attack surface. With its advanced threat detection capabilities, proactive security posture assessments, and automated response features, it helps organizations stay ahead of potential threats. By deploying the latest features through the Entra Connector Sensor or directly via Defender for Identity, you can ensure comprehensive protection for your identity infrastructure.</p>

<h2 class="relative group">Changelog
    <div id="changelog" class="anchor"></div>
    
</h2>
<ul>
<li>July 2024 – initial blog post</li>
<li>October 2024 – updates to new recommendations</li>
</ul>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/featured_hu_56945e9e05d21115.jpg" medium="image" type="image/jpeg" width="1200" height="797"/><enclosure url="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/featured_hu_56945e9e05d21115.jpg" type="image/jpeg" length="251969"/></item><item><title>Detecting and mitigating Active Directory compromises</title><link>https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/</link><guid isPermaLink="true">https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/</guid><pubDate>Wed, 10 Jul 2024 21:36:19 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Entra ID (Azure AD)</category><description>Urgently detect and mitigate Active Directory threats. With this blog we take a look at the most common AD attacks and post how the hardening works.</description><content:encoded><![CDATA[<p><strong>Active Directory (AD)</strong> is the backbone of <strong>identity and access management</strong> for most enterprises, making it a prime target for cyberattacks. As a crucial part of managing permissions, users, and systems within a network, <strong>securing Active Directory</strong> is essential for <strong>cybersecurity</strong>. When compromised, AD can give attackers control over the entire network, leading to <strong>data theft</strong>, <strong>espionage</strong>, or <strong>ransomware attacks</strong>.</p>
<p>In a <a href="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/" >previous blog post</a>, I discussed the deprecation of NTLM by Microsoft. However, NTLM is not the only aspect of Active Directory that can be exploited. There are several other vulnerabilities within Active Directory that require attention.</p>
<p>In this guide, we’ll explore <strong>common Active Directory attack techniques</strong>, outline <strong>mitigations</strong> that significantly reduce risk, and provide <strong>detection mechanisms</strong> (including <strong>Event IDs</strong>) for early threat identification. Additionally, we’ll discuss some popular <strong>tools</strong> that can help you monitor and protect your AD environment effectively.</p>

<h2 class="relative group">Why Active Directory is a key target for cyberattacks
    <div id="why-active-directory-is-a-key-target-for-cyberattacks" class="anchor"></div>
    
</h2>
<p>Active Directory handles <strong>centralized authentication</strong> and <strong>authorization</strong> services, controlling access to both on-premises and cloud-based resources like <strong>Microsoft Azure</strong>. Compromising AD allows attackers to:</p>
<ul>
<li><strong>Escalate privileges</strong> and impersonate high-privilege accounts.</li>
<li><strong>Move laterally</strong> across systems, gaining access to sensitive data.</li>
<li><strong>Maintain persistence</strong> in the network, bypassing multi-factor authentication (MFA).</li>
<li><strong>Compromise cloud environments</strong> through connected services.</li>
</ul>
<p>Without proper security measures, an AD compromise can result in serious consequences, including <strong>ransomware attacks</strong>, <strong>data breaches</strong>, and <strong>long-term espionage</strong>.</p>

<h2 class="relative group">Common Active Directory attack techniques, mitigations, and detection
    <div id="common-active-directory-attack-techniques-mitigations-and-detection" class="anchor"></div>
    
</h2>
<p>Securing <strong>Active Directory</strong> involves implementing strong defenses against <strong>attack techniques</strong> used by malicious actors. Below, we describe these techniques, provide <strong>detailed mitigations</strong>, and outline the <strong>tools</strong> you can use to bolster AD security.</p>

<h3 class="relative group">1. Kerberoasting: exploiting service accounts
    <div id="1-kerberoasting-exploiting-service-accounts" class="anchor"></div>
    
</h3>
<p><strong>Attack Overview</strong>:<br>
Kerberoasting exploits <strong>service principal names (SPNs)</strong> tied to service accounts. Attackers request a <strong>Kerberos service ticket</strong> and attempt to crack it offline to obtain the service account’s password, often giving them high-level privileges.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Diagram of a Kerberoasting attack against a domain controller"
    width="1082"
    height="428"
    src="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/image-1_hu_e6a23a88d4e455e0.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/image-1.webp"><figcaption>Source: ASD / ACSC</figcaption></figure><p><strong>Mitigations</strong>:</p>
<ul>
<li><strong>Minimize the use of SPNs</strong>: Only use SPNs for services where absolutely necessary. Reducing the number of service accounts with SPNs will limit the attack surface for Kerberoasting.</li>
<li><strong>Use gMSAs (Group Managed Service Accounts)</strong>: These accounts provide long, complex passwords that rotate automatically. Tools like <strong>Microsoft LAPS</strong> (Local Administrator Password Solution) can help manage this process.</li>
<li><strong>Enforce strong password policies</strong>: Service accounts should have <strong>at least 30-character</strong> passwords, with a mix of random letters, numbers, and symbols.</li>
<li><strong>Restrict service account privileges</strong>: Ensure service accounts are not members of highly privileged groups like Domain Admins unless absolutely necessary.</li>
</ul>
<p><strong>Tools for Mitigation</strong>:</p>
<ul>
<li><strong><a href="https://github.com/BloodHoundAD/BloodHound"  target="_blank" rel="noreferrer">BloodHound</a></strong>: Helps identify and analyze AD relationships, including SPNs and potentially vulnerable service accounts.</li>
<li><strong><a href="https://www.microsoft.com/en-us/download/details.aspx?id=46899"  target="_blank" rel="noreferrer">Microsoft LAPS</a></strong>: Manages password complexity and rotation for local admin accounts and gMSAs.</li>
</ul>
<p><strong>Detection Mechanisms</strong>:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Event ID</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>4769</strong></td>
            <td>TGS ticket requests; look for numerous requests in a short timeframe, especially with RC4 encryption.</td>
        </tr>
        <tr>
            <td><strong>4738 / 5136</strong></td>
            <td>Detects modifications to user accounts, particularly changes to SPNs.</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">2. AS-REP Roasting: targeting accounts without pre-authentication
    <div id="2-as-rep-roasting-targeting-accounts-without-pre-authentication" class="anchor"></div>
    
</h3>
<p><strong>Attack Overview</strong>:<br>
AS-REP Roasting targets accounts that do not require <strong>Kerberos pre-authentication</strong>, allowing attackers to obtain an encrypted ticket that can be cracked offline to reveal the account’s password.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Diagram of an AS-REP Roasting attack against a domain controller"
    width="1082"
    height="481"
    src="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/image-2_hu_85184ee675e11019.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/image-2.webp"><figcaption>Source: ASD / ACSC</figcaption></figure><p><strong>Mitigations</strong>:</p>
<ul>
<li><strong>Enforce Kerberos pre-authentication</strong>: Ensure all accounts require pre-authentication, which prevents attackers from requesting an encrypted ticket.</li>
<li><strong>Use strong passwords</strong>: Accounts that need to bypass pre-authentication should still have strong, <strong>randomly generated</strong> passwords (15+ characters).</li>
</ul>
<p><strong>Tools for Mitigation</strong>:</p>
<ul>
<li><strong><a href="https://www.pingcastle.com/"  target="_blank" rel="noreferrer">PingCastle</a></strong>: Provides a security report for AD environments, including checks for weak configurations such as accounts without pre-authentication.</li>
</ul>
<p><strong>Detection Mechanisms</strong>:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Event ID</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>4768</strong></td>
            <td>Detects TGT requests; monitor accounts that bypass pre-authentication.</td>
        </tr>
        <tr>
            <td><strong>4625</strong></td>
            <td>Monitors failed logons targeting pre-authentication-disabled accounts.</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">3. Password Spraying: exploiting weak password policies
    <div id="3-password-spraying-exploiting-weak-password-policies" class="anchor"></div>
    
</h3>
<p><strong>Attack Overview</strong>:<br>
Password spraying involves trying commonly used passwords (e.g., “Password123”) across many accounts, attempting to gain access without triggering account lockouts.</p>
<p><strong>Mitigations</strong>:</p>
<ul>
<li><strong>Implement strong password policies</strong>: Passwords should be long (15+ characters) and unpredictable, such as <strong>passphrases</strong> consisting of random words.</li>
<li><strong>Use Multi-Factor Authentication (MFA)</strong>: Implement MFA for all accounts, especially privileged ones. This adds an extra layer of security that password spraying alone cannot bypass.</li>
<li><strong>Set account lockout thresholds</strong>: Configure lockouts after a certain number of failed logon attempts (e.g., five). Ensure that administrators are alerted when an account is locked.</li>
<li><strong>Disable NTLM</strong>: Since NTLM (an older protocol) doesn’t support MFA, it should be disabled in favor of Kerberos.</li>
</ul>
<p><strong>Tools for Mitigation</strong>:</p>
<ul>
<li><strong><a href="https://www.microsoft.com/en-us/security/business/siem-and-xdr/microsoft-defender-for-identity"  target="_blank" rel="noreferrer">Microsoft Defender for Identity</a></strong>: Detects and investigates attacks targeting AD, including password spraying.</li>
<li><strong><a href="https://github.com/dafthack/DomainPasswordSpray"  target="_blank" rel="noreferrer">DomainPasswordSpray</a></strong>: A testing tool to simulate password spraying attacks and test your AD’s defenses.</li>
</ul>
<p><strong>Detection Mechanisms</strong>:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Event ID</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>4625</strong></td>
            <td>Failed logons; a high volume of failed attempts over a short period could indicate password spraying.</td>
        </tr>
        <tr>
            <td><strong>4740</strong></td>
            <td>Detects account lockouts; sudden spikes may suggest a password spraying attack.</td>
        </tr>
        <tr>
            <td><strong>2889</strong></td>
            <td>Tracks unsigned LDAP binds, which attackers might use for password spraying.</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">4. MachineAccountQuota exploitation: abuse of default settings
    <div id="4-machineaccountquota-exploitation-abuse-of-default-settings" class="anchor"></div>
    
</h3>
<p><strong>Attack Overview</strong>:<br>
By default, AD allows users to create up to 10 machine accounts. Attackers can exploit this to escalate privileges or move laterally within the network.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Diagram of an attacker abusing the default machine account quota to create a computer object"
    width="1084"
    height="642"
    src="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/image-3_hu_1bd29579e10793ae.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/image-3.webp"><figcaption>Source: ASD / ACSC</figcaption></figure><p><strong>Mitigations</strong>:</p>
<ul>
<li><strong>Set MachineAccountQuota to zero</strong>: Prevent non-administrators from creating machine accounts by configuring the MachineAccountQuota setting to zero.</li>
<li><strong>Audit permissions regularly</strong>: Regularly review permissions for the <strong>Domain Computers</strong> group and ensure no excessive privileges are granted.</li>
<li><strong>Enable LDAP signing</strong>: LDAP signing ensures secure communication between AD and LDAP clients, reducing the risk of attacks that abuse this default setting.</li>
</ul>
<p><strong>Tools for Mitigation</strong>:</p>
<ul>
<li><strong><a href="https://www.pingcastle.com/"  target="_blank" rel="noreferrer">PingCastle</a></strong>: Detects misconfigurations like MachineAccountQuota abuse.</li>
<li><strong><a href="https://www.semperis.com/purple-knight/"  target="_blank" rel="noreferrer">Purple Knight</a></strong>: An AD security tool that identifies weaknesses in your AD configuration.</li>
</ul>
<p><strong>Detection Mechanisms</strong>:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Event ID</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>4741</strong></td>
            <td>Tracks the creation of new computer objects. Non-administrative user activity creating accounts may indicate abuse.</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">5. Unconstrained Delegation: exploiting privileged accounts
    <div id="5-unconstrained-delegation-exploiting-privileged-accounts" class="anchor"></div>
    
</h3>
<p><strong>Attack Overview</strong>:<br>
Attackers exploit <strong>unconstrained delegation</strong> to impersonate user accounts, particularly privileged users, by extracting their <strong>Kerberos tickets</strong> from memory. This often gives them Domain Admin-level access.</p>
<p><strong>Mitigations</strong>:</p>
<ul>
<li><strong>Disable unconstrained delegation</strong>: Replace it with <strong>resource-based constrained delegation</strong>, which limits impersonation rights.</li>
<li><strong>Mark privileged accounts as non-delegatable</strong>: Ensure accounts like Domain Admins and sensitive user accounts cannot be delegated by setting them as “sensitive.”</li>
<li><strong>Disable the Print Spooler service on Domain Controllers</strong>: This prevents attackers from using <strong>PrintNightmare-type vulnerabilities</strong> to exploit unconstrained delegation.</li>
</ul>
<p><strong>Tools for Mitigation</strong>:</p>
<ul>
<li><strong><a href="https://github.com/BloodHoundAD/BloodHound"  target="_blank" rel="noreferrer">BloodHound</a></strong>: Detects systems configured for unconstrained delegation and helps analyze attack paths involving Kerberos tickets.</li>
<li><strong><a href="https://www.microsoft.com/en-us/security/business/siem-and-xdr/microsoft-defender-for-identity"  target="_blank" rel="noreferrer">Microsoft Defender for Identity</a></strong>: Identifies suspicious activity involving delegation and privilege escalation.</li>
</ul>
<p><strong>Detection Mechanisms</strong>:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Event ID</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>4624</strong></td>
            <td>Successful logons; unusual logons to systems with unconstrained delegation may indicate abuse.</td>
        </tr>
        <tr>
            <td><strong>4104</strong></td>
            <td>PowerShell execution; monitor for scripts related to unconstrained delegation exploitation.</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">6. Active Directory Certificate Services (AD CS) compromise: exploiting misconfigured certificates
    <div id="6-active-directory-certificate-services-ad-cs-compromise-exploiting-misconfigured-certificates" class="anchor"></div>
    
</h3>
<p><strong>Attack Overview</strong>:<br>
Misconfigured <strong>Active Directory Certificate Services (AD CS)</strong> allow attackers to issue certificates that can impersonate any user, including privileged ones.</p>
<p><strong>Mitigations</strong>:</p>
<ul>
<li><strong>Harden AD CS configurations</strong>: Remove vulnerable certificate templates, especially those that allow <strong>user-supplied subject alternative names (SANs)</strong>.</li>
<li><strong>Restrict who can modify templates</strong>: Limit certificate template modifications to only authorized personnel to prevent exploitation.</li>
<li><strong>Use Hardware Security Modules (HSMs)</strong>: HSMs protect the private keys of the CA, preventing attackers from extracting sensitive information.</li>
</ul>
<p><strong>Tools for Mitigation</strong>:</p>
<ul>
<li><strong><a href="https://github.com/GhostPack/Certify"  target="_blank" rel="noreferrer">Certify</a></strong>: A tool that helps security teams identify misconfigured AD CS templates.</li>
<li><strong><a href="https://github.com/GhostPack/PSPKIAudit"  target="_blank" rel="noreferrer">PSPKIAudit</a></strong>: An open-source tool to audit your AD Certificate Services for vulnerabilities.</li>
</ul>
<p><strong>Detection Mechanisms</strong>:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Event ID</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>4887</strong></td>
            <td>Tracks the issuance of certificates; suspicious certificates or SAN requests should be investigated.</td>
        </tr>
        <tr>
            <td><strong>4876</strong></td>
            <td>Backup of CA databases; unauthorized backups may indicate an attempt to exfiltrate sensitive certificate data.</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">The importance of proactive monitoring and early detection
    <div id="the-importance-of-proactive-monitoring-and-early-detection" class="anchor"></div>
    
</h2>
<p>Mitigating <strong>Active Directory attacks</strong> is crucial, but <strong>early detection</strong> can significantly reduce the damage caused by a compromise. Implementing robust monitoring tools and setting up <strong>alerts</strong> for unusual behavior ensures that potential breaches are caught quickly.</p>
<ul>
<li><strong>Track security events</strong>: Regularly review event logs for password changes, Kerberos ticket requests, and privilege escalations.</li>
<li><strong>Monitor Kerberos tickets</strong>: Identify any unusual patterns in service ticket requests, especially those targeting high-privilege accounts.</li>
<li><strong>Log PowerShell activity</strong>: Many attackers use PowerShell for post-exploitation activities, making it essential to monitor scripts for suspicious behavior.</li>
</ul>

<h2 class="relative group">Defender for Identity Security Posture Recommendations
    <div id="defender-for-identity-security-posture-recommendations" class="anchor"></div>
    
</h2>
<p>Microsoft recently released a tons of new posture recommendation, also for Microsoft Defender for Identity, which covers the majority of the attacks mentioned above.</p>
<p>Take a look at the blog post here:<br>
<a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/" >https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/</a></p>

<h2 class="relative group">Final thoughts on Active Directory security
    <div id="final-thoughts-on-active-directory-security" class="anchor"></div>
    
</h2>
<p>Securing <strong>Active Directory</strong> is essential for maintaining the overall security posture of your enterprise. By understanding common attack techniques, implementing <strong>mitigations</strong>, using the right <strong>tools</strong>, and employing effective <strong>detection mechanisms</strong>, organizations can significantly reduce their attack surface and improve <strong>cyber resilience</strong>. Stay proactive in monitoring your AD environment and regularly audit its security configurations to maintain control and prevent potential compromises.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/featured_hu_dd647bacfc49a598.jpg" medium="image" type="image/jpeg" width="1200" height="675"/><enclosure url="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/featured_hu_dd647bacfc49a598.jpg" type="image/jpeg" length="110680"/></item><item><title>Microsoft deprecates NTLM and why this is an important step</title><link>https://www.modernsecurity.nl/microsoft-deprecates-ntlm/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-deprecates-ntlm/</guid><pubDate>Thu, 06 Jun 2024 21:04:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Entra ID (Azure AD)</category><description>Microsoft deprecates NTLM, this post is about why and the importance of Kerberos. Also demonstrating how to easily crack NTLM hashes with Hashcat.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>Microsoft deprecates <strong>NTLM</strong> (New Technology LAN Manager) and recommends transitioning to <strong>Kerberos</strong> as the primary authentication protocol. Kerberos is known for its enhanced cryptography and server authentication capabilities compared to <strong>NTLM</strong>.</p>
<p><a href="https://aka.ms/ntlm"  target="_blank" rel="noreferrer">https://aka.ms/ntlm</a></p>
<p>With the deprecation of NTLM, the method of <strong>cracking NTLM hashes</strong> from Active Directory will become obsolete. Kerberos uses different mechanisms for authentication which do not rely on the same type of vulnerable hashing as NTLM. Therefore, the techniques used to crack NTLM hashes <em>will not be applicable to Kerberos authentication traffic</em>.</p>
<p>The transition to Kerberos is part of Microsoft’s effort to improve security. <strong>NTLM</strong> has been known for its vulnerabilities, including weak encryption algorithms like MD4 and DES, making it susceptible to brute-force attacks. <strong>Kerberos</strong>, on the other hand, provides a more secure authentication method that is less prone to such attacks.</p>
<p>As Microsoft deprecates <strong>NTLM</strong>, organizations and individuals who are involved in security testing or ethical hacking will need to update their skills and tools to work with <strong>Kerberos</strong> and other modern authentication protocols. Sadly, I think this will take some time for organisations to move away from <strong>NTLM</strong>, but lets see. I’m happy that Microsoft deprecates <strong>NTLM</strong>, that’s a fact!</p>

<h2 class="relative group">What is password hash (NTLM) cracking in Active Directory?
    <div id="what-is-password-hash-ntlm-cracking-in-active-directory" class="anchor"></div>
    
</h2>
<p>Active Directory, a service provided by Microsoft, is a directory service for Windows domain networks. It is involved in various tasks, including managing user data, security, and distributed resources, and enabling interoperation with other directories.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Diagram of Azure Active Directory connecting on-premises, cloud apps and devices"
    width="1485"
    height="785"
    src="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/main_hu_fe3fd0b2deb9b57c.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/main.webp"></figure><p>Password hash cracking in AD involves attackers trying to determine the plaintext value of a hashed password stored of objects in the AD database. Attackers often use techniques like brute force, dictionary attacks, or rainbow table attacks to crack these hashes.</p>
<p>In an AD environment, once attackers compromise a single machine, they can use the hashed passwords they’ve cracked to move laterally, potentially gaining access to many parts of the network (also towards Azure and Entra ID – most companies sync their AAD sync accounts and privileged users there too).</p>

<h2 class="relative group">Step 0 – How easy is it to crack NTLM hashes?
    <div id="step-0-how-easy-is-it-to-crack-ntlm-hashes" class="anchor"></div>
    
</h2>
<p>Well, pretty easy. I though it would be nice to demonstrate why Microsoft deprecates <strong>NTLM</strong> and how easily you can brute-force or retrieve passwords from known hashes and password dumps with tools like <strong>hashcat</strong>.</p>
<p>It’s important to note that cracking hashes without authorization is illegal and unethical, and such activities should only be performed by professionals within the scope of their work and with proper permissions.</p>
<p>Follow the steps below if this the case…</p>

<h2 class="relative group">Step 1 – Retrieving NTLM hashes from you Active Directory
    <div id="step-1-retrieving-ntlm-hashes-from-you-active-directory" class="anchor"></div>
    
</h2>
<p>Retrieving hashes from Active Directory using <strong>ntdsutil</strong> is a sensitive operation. Again #2: it’s crucial to understand that only authorized personnel should perform this task due to the potential exposure of sensitive information.</p>
<p>If you’re planning to carry out extracting the hashes, do it manually first. I recommend going through these steps at least once to familiarize yourself with the configuration. Please ensure that you perform these steps from your <strong>Active Directory server</strong>:</p>
<ol>
<li><strong>Create a Snapshot of Active Directory Database</strong>
<ul>
<li>Open a command prompt as an Administrator.</li>
<li>Type <code>ntdsutil</code> and press Enter.</li>
<li>At the <code>ntdsutil</code> prompt, type <code>snapshot</code> and press Enter.</li>
<li>At the <code>snapshot</code> prompt, type <code>activate instance ntds</code> and press Enter.</li>
<li>Then type <code>create</code> and press Enter. This will create a snapshot of the Active Directory database.</li>
<li>Type <code>quit</code> twice to exit <code>ntdsutil</code>.</li>
</ul>
</li>
<li><strong>Mount the Snapshot</strong>
<ul>
<li>Again, open <code>ntdsutil</code> in a command prompt as an Administrator.</li>
<li>Type <code>snapshot</code> and press Enter.</li>
<li>At the <code>snapshot</code> prompt, type <code>list all</code> and press Enter. This will list all snapshots.</li>
<li>Find the snapshot you just created, and type <code>mount {GUID}</code>, replacing <code>{GUID}</code> with the GUID of the snapshot.</li>
<li>Note the directory where the snapshot is mounted.</li>
<li>Type <code>quit</code> twice to exit <code>ntdsutil</code>.</li>
</ul>
</li>
</ol>
<p>For the next time, you can also use <strong>ntdsutil</strong> from the commandline, with a small snippet and you can skip the manual steps:</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">ntdsutil &#34;ac i ntds&#34; &#34;ifm&#34; &#34;create full c:\temp-folder-for-your-ntds-backup&#34; quit quit</span></span></code></pre></div></div>

<h2 class="relative group">Step 2 – Extracting NTLM hashes
    <div id="step-2-extracting-ntlm-hashes" class="anchor"></div>
    
</h2>
<p>The subsequent step involves extracting the hashes (formatted as domain\uid:rid:lmhash:nthash) from the files you’ve generated with <strong>ntdsutil</strong>. There are several tools and scripts available for this purpose. The most frequently used is the <strong>secretsdump.py</strong> script from the <strong>Impacket Python library</strong>, which comes pre-installed on Kali Linux.</p>
<p>For additional details, you can visit the following page: <strong>Impacket</strong> <a href="https://github.com/fortra/impacket/blob/master/examples/secretsdump.py"  target="_blank" rel="noreferrer">GitHub page</a></p>
<p>If you’ve previously used <strong>secretsdump.py</strong>, you might have noticed that it can be quite time-consuming. That’s why I prefer using <strong><a href="https://github.com/c-sto/gosecretsdump"  target="_blank" rel="noreferrer">gosecretsdump</a></strong> these days. It’s a highly efficient and reliable fork of <strong>Impacket</strong>, written in Golang, and is approximately ten times faster.</p>
<p>Before proceeding, ensure that you have a Linux (Ubuntu) or Kali Linux machine. Then, follow these steps:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">wget https://github.com/C-Sto/gosecretsdump.git
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> gosecretsdump
</span></span><span class="line"><span class="cl">go run main.go -ntds /home/username/Extracted/ntds.dit -system /home/username/Extracted/SYSTEM -out /home/username/export.txt</span></span></code></pre></div></div>
<p>Make sure you choose the correct paths for your extracted <strong>ntdis.dit</strong>, <strong>SYSTEM</strong> and export file (for the hashes). <strong>Gosecretsdump</strong> contains several commands you can use, refer to this:</p>
<p><a href="https://github.com/c-sto/gosecretsdump"  target="_blank" rel="noreferrer">https://github.com/c-sto/gosecretsdump</a></p>
<p>When you open the export file, you probably see an export of each user account or object in your Active Directory in this format:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">XML</div><pre tabindex="0" class="chroma"><code class="language-xml" data-lang="xml"><span class="line"><span class="cl"><span class="nt">&lt;Username&gt;</span>:<span class="nt">&lt;User</span> <span class="err">ID</span><span class="nt">&gt;</span>:<span class="nt">&lt;LM</span> <span class="err">hash</span><span class="nt">&gt;</span>:<span class="nt">&lt;NT</span> <span class="err">hash</span><span class="nt">&gt;</span>:<span class="nt">&lt;Comment&gt;</span>:<span class="nt">&lt;Home</span> <span class="err">Dir</span><span class="nt">&gt;</span>:</span></span></code></pre></div></div>
<p>The LM hash should be the same (<code>aad3b435b51404eeaad3b435b51404ee</code>), but the NT hash is the information you need to crack/reveal the AD password(s):</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">woodgrovedemo.nl\user1:1314:aad3b435b51404eeaad3b435b51404ee:8397b997d63ceaac54bfb668c1df408e:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user2:1316:aad3b435b51404eeaad3b435b51404ee:0b446183b62698a4c8244c4fd05f8e5b:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user3:1317:aad3b435b51404eeaad3b435b51404ee:a0a185fb6c4af7572c8c3a9b22f65bd1:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user4:1318:aad3b435b51404eeaad3b435b51404ee:51d296acab46bda7be7b9cc4e0a76ad9:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user5:1319:aad3b435b51404eeaad3b435b51404ee:d8cf73482d2881cfa2527af973dcfc99:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user6:1320:aad3b435b51404eeaad3b435b51404ee:767d34df5630f36a37b2c10aa1db26ab:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user7:1321:aad3b435b51404eeaad3b435b51404ee:e5d11b40eee8683f4b5b06b0019a369f:::
</span></span><span class="line"><span class="cl">woodgrovedemo.nl\user7:1322:aad3b435b51404eeaad3b435b51404ee:271551af8082f23ce2231fe3183aa603:::</span></span></code></pre></div></div>

<h2 class="relative group">Step 3 – Using Hashcat
    <div id="step-3-using-hashcat" class="anchor"></div>
    
</h2>
<p><strong>Hashcat</strong> is a versatile, open-source password cracking tool used extensively in cybersecurity and information security. It’s designed to recover passwords from various cryptographic algorithms and hash types through brute-force, dictionary, and hybrid attacks etc. Essentially, it systematically tries all possible password combinations until it discovers the correct one.</p>
<p>In my example, I will be using a wordlist (dictionary), to test them against the NTLM hashes in my dump. I could also try to recover passwords by rainbow tables or by brute-forcing them, but that strongly depends on the algorithm, the VM used, GPU etc. You’ll have to decide the goal and the solution you want to use.</p>
<p>The ultimate goal is to retrieve all the passwords, but that might take a while. On the bright side the cracking speed will be shorter every year:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Source: Google (these numbers might be up-to-date but this is just as an example)"
    width="902"
    height="656"
    src="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/crackingspeed_hu_9237e76ae622db4d.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/crackingspeed.webp"></figure><p><sup>Source: Google (these numbers might not be up-to-date but this is just as an example 🙂 )</sup></p>
<p>If you want to go for the easy way; where do you get the wordlists from? There are plenty of websites offering VERY good lists, with weak passes. Check out <a href="https://weakpass.com/"  target="_blank" rel="noreferrer">https://weakpass.com/</a> – they have 300GB+ of all-in-one lists and those are great. In my example I crafted a list of passwords for myself, with only Dutch passwords and saved it in a .txt format.</p>
<p>Now we are going to use <strong>Hashcat</strong>, you can also use <strong>John the Ripper</strong> or any other tool. But I’m using Hashcat the most, I think it’s very effective and has plenty of options (also for other hashing algorithms). Refer to their Wiki if you want to learn more about the options: <a href="https://hashcat.net/wiki/doku.php?id=example_hashes"  target="_blank" rel="noreferrer">https://hashcat.net/wiki/doku.php?id=example_hashes</a>.</p>
<p>On my Kali Linux machine (forgot to mention I’m using an F-type machine on Azure) I can start cracking the hashes by the following command (make sure to use the export.txt file with hashes and after that the list of passwords):</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">hashcat -a 0 -m 1000 export.txt dutch_passwordlist.txt</span></span></code></pre></div></div>
<p>After some time, you’ll get the results from <strong>Hashcat</strong> (yet again it depends on the quality of the wordlist, the VM, GPU, how many hashes to scan etc.). But here you go, easy as that:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Hashcat output with cracked NTLM hashes from a Dutch password list"
    width="912"
    height="964"
    src="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/afbeelding_hu_b16cc2362a415a4e.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/afbeelding.webp"></figure>
<h2 class="relative group">Are there any other flaws in NTLM which make it weak?
    <div id="are-there-any-other-flaws-in-ntlm-which-make-it-weak" class="anchor"></div>
    
</h2>
<p>Regardless of the hash cracking part, the reason Microsoft deprecates <strong>NTLM</strong> is also because NTLM has some other flaws:</p>
<ol>
<li><strong>Lack of mutual authentication</strong>: NTLM lacks mutual authentication. While the client verifies its identity to the server, the reverse is not true. This one-way authentication process can be exploited by attackers.</li>
<li><strong>Outdated hashing and encryption algorithms</strong>: NTLM uses outdated hashing and encryption algorithms, which are more susceptible to cryptographic attacks compared to modern standards. These vulnerabilities can compromise the security of user credentials.</li>
<li><strong>Challenge-response mechanism</strong>: NTLM relies on a challenge-response mechanism using hashed versions of user passwords. This approach has inherent weaknesses, including the possibility of pass-the-hash attacks.</li>
<li><strong>Downgrade attacks</strong>: Attackers can manipulate NTLM to downgrade security features, potentially leading to full domain compromise.</li>
</ol>

<h2 class="relative group">So Kerberos cannot be cracked?
    <div id="so-kerberos-cannot-be-cracked" class="anchor"></div>
    
</h2>
<p>Regarding the possibility of <strong>Kerberos</strong> being cracked, while Kerberos is considered one of the most secure authentication protocols, no system is <em><strong>entirely invulnerable</strong></em>. There are known attacks such as <strong>Kerberoasting</strong>, <strong>Pass-the-Ticket</strong>, and <strong>Golden Ticket</strong> attacks that can exploit certain weaknesses in Kerberos.</p>
<p>However, these attacks require a significant level of access or knowledge about the network and are not as straightforward as cracking <strong>NTLM</strong> hashes. By following the security measures mentioned below, the risk of such attacks can be greatly reduced:</p>
<ol>
<li><strong>Strong password policies</strong>: Implement strong password policies to make it difficult for attackers to crack passwords associated with Kerberos tickets (YES so either way make sure always to use strong passwords/complexity/lenght).</li>
<li><strong>Regularly update and patch</strong>: Keep your systems updated with the latest security patches to protect against known vulnerabilities.</li>
<li><strong>Service Principal Name (SPN) Management</strong>: Properly manage SPNs to prevent Kerberoasting, which involves service accounts.</li>
<li><strong>Monitor and Audit</strong>: Regularly monitor and audit Kerberos authentication for any unusual activities that could indicate an attack.</li>
<li><strong>Disable unused accounts</strong>: Disable or remove unused accounts and services that might be targeted in Kerberos attacks.</li>
<li><strong>Educate users</strong>: Train users on security best practices to prevent social engineering attacks that could compromise Kerberos authentication.</li>
<li><strong>Use advanced encryption</strong>: Employ strong encryption methods like AES for encrypting Kerberos tickets to enhance security.</li>
<li><strong>Limit privileges</strong>: Apply the principle of least privilege to minimize the potential impact of a compromised account (I recommend tiering, tiering and tiering).</li>
<li><strong>Tooling:</strong> Use tooling like <a href="https://github.com/SpecterOps/BloodHound"  target="_blank" rel="noreferrer">Bloodhound</a>, <a href="https://github.com/GhostPack/Rubeus"  target="_blank" rel="noreferrer">Rubeus</a>, <a href="https://github.com/gentilkiwi/mimikatz"  target="_blank" rel="noreferrer">MimiKatz</a> etc. to identify risks in your own environment (or even break them) and look if you’re vulnerable.</li>
<li><strong>Entra ID:</strong> Don’t forget to test/assess your Entra ID too (<a href="https://github.com/dirkjanm"  target="_blank" rel="noreferrer">Dirkjanm created some great tools like ROADtools and Bloodhound-Azure-AD</a>)</li>
</ol>
<p><strong>Also check out my newest blog on hardening Active Directory here: <a href="https://www.modernsecurity.nl/detecting-mitigating-active-directory-compromises/" >https://www.modernsecurity.nl/detecting-and-mitigating-active-directory-compromises-a-comprehensive-guide/</a></strong></p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>While Microsoft deprecates NTLM is a positive step toward enhanced security, it’s essential to recognize that Active Directory remains a critical component for many organizations. Legacy systems and dependencies necessitate its continued use. Our focus should shift toward securing Active Directory effectively. By implementing best practices, regular audits, and robust access controls, we can mitigate risks and ensure a safer environment for user authentication and authorization.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/featured_hu_5eb2f8c3a160a840.jpg" medium="image" type="image/jpeg" width="1200" height="800"/><enclosure url="https://www.modernsecurity.nl/microsoft-deprecates-ntlm/featured_hu_5eb2f8c3a160a840.jpg" type="image/jpeg" length="101958"/></item><item><title>Microsoft Unified Security Operations Platform</title><link>https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/</guid><pubDate>Thu, 04 Apr 2024 20:42:44 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Sentinel</category><category>Microsoft Defender XDR</category><category>Security</category><description>Check out the new Microsoft Unified Security Operations Platform. It combines the power of Microsoft Sentinel and Defender XDR, together in one.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction of Unified Security Operations Platform
    <div id="introduction-of-unified-security-operations-platform" class="anchor"></div>
    
</h2>
<p>In today’s complex threat landscape, security teams face an uphill battle. They grapple with vast amounts of data from various sources, leading to slower threat response, increased learning curves, and fragmented insights. Managing the costs associated with data handling remains a significant challenge.</p>
<p>Enter <strong>Microsoft’s Unified Security Operations Platform</strong>, a game-changer that consolidates essential tools into a single, effective solution powered by AI and automation. Let’s dive into what this platform offers (since today in public preview), how it works, and the benefits it brings to security operations.</p>
<p>Have been in the private preview and to be honest I really loved the feature &lt;3.</p>

<h2 class="relative group">What is the Unified Security Operations Platform?
    <div id="what-is-the-unified-security-operations-platform" class="anchor"></div>
    
</h2>
<p>The Unified Security Operations Platform combines and integrates the best of two powerful Microsoft solutions: <a href="https://www.modernsecurity.nl/microsoft-defender-xdr/" ><strong>Microsoft Defender XDR</strong></a>(formerly Microsoft 365 Defender) and <strong><a href="https://www.modernsecurity.nl/microsoft-sentinel/" >Microsoft Sentinel</a></strong>.</p>
<p>If you need to refresh your memory, here’s what Microsoft <strong>Defender XDR</strong> and <strong>Microsoft Sentinel</strong> do:</p>
<ol>
<li><strong>Microsoft Defender XDR</strong>:
<ul>
<li>Provides unified visibility, investigation, and response across endpoints, hybrid identities, emails, collaboration tools, cloud apps, and workloads.</li>
<li>Natively integrated with bidirectional connectors for comprehensive threat coverage.</li>
</ul>
</li>
<li><strong>Microsoft Sentinel</strong>:
<ul>
<li>A cloud-native SIEM solution offering unparalleled visibility into the overall threat landscape.</li>
<li>Extends coverage to every edge and layer of the digital environment.</li>
</ul>
</li>
</ol>

<h2 class="relative group">The challenge (and solution)
    <div id="the-challenge-and-solution" class="anchor"></div>
    
</h2>
<p>In the dynamic landscape of cybersecurity, Security Operations Centers (SOCs) grapple with an overwhelming influx of alerts and security data scattered across various locations (we faced this a lot). Analysts and engineers find themselves navigating complex workflows, sifting through low-level alerts, and struggling to consolidate, normalize, analyze, enrich, and act on insights across different environments of customers.</p>
<p>Here’s why the new Unified Security Operations Platform is a real game-changer:</p>
<ol>
<li><strong>Unified views</strong>:
<ul>
<li>Analysts access incidents, exposure, threat intelligence, assets, and security reporting from a single pane of glass.</li>
</ul>
</li>
</ol>
<ul>
<li>No more switching between portals, streamlined workflows enhance efficiency.</li>
</ul>
<ol start="2">
<li><strong>Comprehensive capabilities</strong>:</li>
</ol>
<ul>
<li>Cover the entire cyberattack lifecycle: from prevention to detection, investigation, and response.
<ul>
<li>Unify SIEM and XDR for robust security operations.</li>
</ul>
</li>
</ul>
<ol start="3">
<li><strong>Attack Disruption with AI</strong>:
<ul>
<li>The platform leverages AI to automatically disrupt advanced attacks like ransomware.</li>
<li>Predictive analytics and automated responses stop attacks in near real-time.</li>
</ul>
</li>
<li><strong>Unified incident queue</strong>:
<ul>
<li>Reduce investigation time with a single incident queue.</li>
<li>Improved alert correlation accelerates triage and response.</li>
</ul>
</li>
<li><strong>Intelligent assistant: Copilot for Security</strong> (optional):
<ul>
<li>Analysts benefit from incident summaries, MITRE framework mapping, code translation, and multistage attack remediation.</li>
<li>Copilot for Security streamlines workflows and provides relevant recommendations.</li>
</ul>
</li>
</ol>
<p><video controls preload="metadata" playsinline width="3840" height="2160" src="unified-portal.mp4"></video></p>

<h2 class="relative group">Licensing requirements
    <div id="licensing-requirements" class="anchor"></div>
    
</h2>
<p>To benefit from the Unified Security Operations Platform, ensure you have:</p>
<ul>
<li>A single Microsoft Sentinel workspace.</li>
<li>At least one Defender XDR workload deployed.</li>
</ul>

<h2 class="relative group">Permissions needed
    <div id="permissions-needed" class="anchor"></div>
    
</h2>
<div class="ms-table" role="region" aria-label="Table" tabindex="0">
<table><thead><tr><th>Task</th><th>Azure built-in role required</th><th>Scope</th></tr></thead><tbody><tr><td>Connect or disconnect a workspace with Microsoft Sentinel enabled</td><td><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#owner">Owner</a> or<br/><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#user-access-administrator">User Access Administrator</a> and <a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#microsoft-sentinel-contributor">Microsoft Sentinel Contributor</a></td><td>– Subscription for Owner or User Access Administrator roles<br/><br/>– Subscription, resource group, or workspace resource for Microsoft Sentinel Contributor</td></tr><tr><td>Query Sentinel data tables or view incidents</td><td><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#microsoft-sentinel-reader">Microsoft Sentinel Reader</a> or a role with the following actions:<br/>– Microsoft.OperationalInsights/workspaces/read<br/>– Microsoft.OperationalInsights/workspaces/query/read<br/>– Microsoft.SecurityInsights/Incidents/read<br/>– Microsoft.SecurityInsights/incidents/comments/read<br/>– Microsoft.SecurityInsights/incidents/relations/read<br/>– Microsoft.SecurityInsights/incidents/tasks/read</td><td>Subscription, resource group, or workspace resource</td></tr><tr><td>Take investigative actions on incidents</td><td><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#microsoft-sentinel-contributor">Microsoft Sentinel Contributor</a> or a role with the following actions:<br/>– Microsoft.OperationalInsights/workspaces/read<br/>– Microsoft.OperationalInsights/workspaces/query/read<br/>– Microsoft.SecurityInsights/incidents/read<br/>– Microsoft.SecurityInsights/incidents/write<br/>– Microsoft.SecurityInsights/incidents/comments/read<br/>– Microsoft.SecurityInsights/incidents/comments/write<br/>– Microsoft.SecurityInsights/incidents/relations/read<br/>– Microsoft.SecurityInsights/incidents/relations/write<br/>– Microsoft.SecurityInsights/incidents/tasks/read<br/>– Microsoft.SecurityInsights/incidents/tasks/write</td><td>Subscription, resource group, or workspace resource</td></tr><tr><td>Create a support request</td><td><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#owner">Owner</a> or<br/><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#contributor">Contributor</a> or<br/><a href="https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#support-request-contributor">Support request contributor</a> or a custom role with Microsoft.Support/*</td><td>Subscription</td></tr></tbody></table>
</div>

<h2 class="relative group">Connecting your workspace
    <div id="connecting-your-workspace" class="anchor"></div>
    
</h2>
<ol>
<li>
<p>Go to the Microsoft Defender portal (<a href="http://security.microsoft.com"  target="_blank" rel="noreferrer">security.microsoft.com</a>) and sign in.</p>
</li>
<li>
<p>Select Overview in Microsoft Defender XDR.</p>
</li>
<li>
<p>Choose the workspace you want to connect and follow the prompt:</p>
<p>(takes a few minutes – depends if you already have MS Sentinel up- and running – otherwise set that up first 😉 )</p>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Get your SIEM and XDR in one place banner with the Connect a workspace button"
    width="1675"
    height="483"
    src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image_hu_4e9913d129aa505c.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Choosing the Microsoft Sentinel workspace to connect to Defender"
    width="1641"
    height="1134"
    src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-1_hu_bb22114fb373827f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-1.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Reviewing what changes when the Sentinel workspace is connected"
    width="1641"
    height="1136"
    src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-2_hu_ece618c13682e540.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-2.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Sentinel workspace successfully connected to Microsoft Defender"
    width="1641"
    height="1135"
    src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-3_hu_69e7bff77452f472.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-3.webp"></figure><p>These changes have been pushed, when you completed the connection within Unified Security Operations Platform :</p>
<ul>
<li>Log tables, queries, and functions in the Microsoft Sentinel workspace are also available in advanced hunting within Defender XDR.</li>
<li>The Microsoft Sentinel Contributor role is assigned to the Microsoft Threat Protection and WindowsDefenderATP apps within the subscription.</li>
<li>Active <a href="https://learn.microsoft.com/en-us/azure/sentinel/create-incidents-from-alerts#using-microsoft-security-incident-creation-analytics-rules"  target="_blank" rel="noreferrer">Microsoft security incident creation rules</a> are deactivated to avoid duplicate incidents. This change only applies to incident creation rules for Microsoft alerts and not to other analytics rules.</li>
<li>All alerts related to Defender XDR products are streamed directly from the main Defender XDR data connector to ensure consistency (<strong>enable the connector for Microsoft Defender XDR in Sentinel</strong>)</li>
</ul>

<h2 class="relative group">Benefits of using the Unified Platform
    <div id="benefits-of-using-the-unified-platform" class="anchor"></div>
    
</h2>
<p>After you connect your workspace to the Defender portal, <strong>Microsoft Sentinel</strong> is on the left-hand side navigation pane. Pages like <strong>Overview</strong>, <strong>Incidents</strong>, and <strong>Advanced Hunting</strong> have unified data from Microsoft Sentinel and Defender XDR.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Advanced hunting in Defender showing the Microsoft Sentinel tables"
    width="1789"
    height="1050"
    src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-4_hu_287784b645b4ef63.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/image-4.webp"></figure><p>Use the following articles to help you start working with Microsoft Sentinel in the Defender portal. When using these articles, keep in mind that your starting point in this context is the <a href="https://security.microsoft.com/"  target="_blank" rel="noreferrer">Defender XDR portal</a> instead of the Azure portal.:</p>
<p><strong>Search</strong></p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/search-jobs?tabs=defender-portal"  target="_blank" rel="noreferrer">Search across long time spans in large datasets</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/restore"  target="_blank" rel="noreferrer">Restore archived logs from search</a></li>
</ul>
<p><strong>Threat management</strong></p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/monitor-your-data?tabs=defender-portal"  target="_blank" rel="noreferrer">Visualize and monitor your data by using workbooks</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/hunts"  target="_blank" rel="noreferrer">Conduct end-to-end threat hunting with Hunts</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/bookmarks"  target="_blank" rel="noreferrer">Use hunting bookmarks for data investigations</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/livestream"  target="_blank" rel="noreferrer">Use hunting Livestream in Microsoft Sentinel to detect threat</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/notebooks-hunt"  target="_blank" rel="noreferrer">Hunt for security threats with Jupyter notebooks</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/indicators-bulk-file-import?tabs=defender-portal"  target="_blank" rel="noreferrer">Add indicators in bulk to Microsoft Sentinel threat intelligence from a CSV or JSON file</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/work-with-threat-indicators?tabs=defender-portal"  target="_blank" rel="noreferrer">Work with threat indicators in Microsoft Sentinel</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/mitre-coverage"  target="_blank" rel="noreferrer">Understand security coverage by the MITRE ATT&amp;CK framework</a></li>
</ul>
<p><strong>Content management</strong></p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/sentinel-solutions-deploy?tabs=defender-portal"  target="_blank" rel="noreferrer">Discover and manage Microsoft Sentinel out-of-the-box content</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/sentinel-solutions-catalog"  target="_blank" rel="noreferrer">Microsoft Sentinel content hub catalog</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/ci-cd"  target="_blank" rel="noreferrer">Deploy custom content from your repository</a></li>
</ul>
<p><strong>Configuration</strong></p>
<ul>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/data-connectors-reference"  target="_blank" rel="noreferrer">Find your Microsoft Sentinel data connector</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/detect-threats-custom?tabs=defender-portal"  target="_blank" rel="noreferrer">Create custom analytics rules to detect threats</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/create-nrt-rules?tabs=defender-portal"  target="_blank" rel="noreferrer">Work with near-real-time (NRT) detection analytics rules in Microsoft Sentinel</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/watchlists-create?tabs=defender-portal"  target="_blank" rel="noreferrer">Create watchlists</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/watchlists-manage"  target="_blank" rel="noreferrer">Manage watchlists in Microsoft Sentinel</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/create-manage-use-automation-rules"  target="_blank" rel="noreferrer">Create automation rules</a></li>
<li><a href="https://learn.microsoft.com/en-us/azure/sentinel/use-playbook-templates"  target="_blank" rel="noreferrer">Create and customize Microsoft Sentinel playbooks from content templates</a></li>
</ul>

<h2 class="relative group">Sources
    <div id="sources" class="anchor"></div>
    
</h2>
<p>Need extra information? Check out the Documentation pages from Microsoft regarding Unified Security Operations Platform:</p>
<p><a href="https://learn.microsoft.com/en-us/azure/sentinel/microsoft-sentinel-defender-portal#new-and-improved-capabilities"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/azure/sentinel/microsoft-sentinel-defender-portal#new-and-improved-capabilities</a></p>
<p><a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender/microsoft-sentinel-onboard?view=o365-worldwide"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/microsoft-365/security/defender/microsoft-sentinel-onboard?view=o365-worldwide</a></p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>The Unified Security Operations Platform empowers defenders to prevent, detect, investigate, and respond effectively. As said above, I really love this feature. Although it’s in public preview now, I might add extra insights to my blog post later on, with handy tips, experience and information.</p>
<p>For the time being, play around with Unified Security Operations Platform to get your hands on the comprehensive view and the automated threat neutralization technology. Now your security specialists can address threats with unmatched speed and efficiency.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/featured_hu_658ada8939640af5.jpg" medium="image" type="image/jpeg" width="1200" height="675"/><enclosure url="https://www.modernsecurity.nl/microsoft-unified-security-operations-platform/featured_hu_658ada8939640af5.jpg" type="image/jpeg" length="99938"/></item><item><title>Microsoft Security Exposure Management</title><link>https://www.modernsecurity.nl/microsoft-security-exposure-management/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-security-exposure-management/</guid><pubDate>Fri, 15 Mar 2024 13:52:23 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Defender XDR</category><category>Security</category><description>Discover how Microsoft Security Exposure Management enhances threat prevention with real-time insights aligned to your organization's risks.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction and history
    <div id="introduction-and-history" class="anchor"></div>
    
</h2>
<p>Microsoft unveiled its <strong>Microsoft Security Exposure Management</strong> on March 13, 2024. The solution was developed in response to increasing concerns about various types of exposures, such as software vulnerabilities, misconfigured controls, excessive access privileges, and emerging threats that could lead to the exposure of sensitive data.</p>
<p>The conventional method of vulnerability management was proving inadequate due to its narrow scope. In the past, organizations concentrated on protecting what they were aware of – they searched for Common Vulnerabilities and Exposures (CVEs) across their endpoints, servers, and infrastructure. Although this was a step in the right direction, it didn’t provide a comprehensive view of the digital estate, lacked context, and treated all resources as if they were of equal importance.</p>
<p>Given that an average organization uses around 80 different security tools, it was highly probable that numerous tools related to security posture were in use, each overseeing a limited area of the environment. The data and insights from these tools related to security posture were often isolated or, at best, loosely connected, making it challenging to make sense of threats and their potential impact on critical assets.</p>
<p>As a result, Microsoft spearheaded the next phase of attack surface management, enabling organizations to proactively enhance their posture and minimize their exposure more quickly than attackers could exploit them. This revolutionary solution brings together disparate data silos, providing security teams with complete visibility across all assets. By facilitating a comprehensive evaluation of security posture and exposure, this solution enables teams to not only understand their current security landscape but also to improve it significantly.</p>
<p><strong>Must say I love Microsoft Security Exposure Management &lt;3</strong></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Exposure management overview with assets at a glance and vulnerability status"
    width="1780"
    height="881"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-5_hu_42e1cd9c8a7895cd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-5.webp"></figure>
<h2 class="relative group">Use cases and features of Microsoft Security Exposure Management
    <div id="use-cases-and-features-of-microsoft-security-exposure-management" class="anchor"></div>
    
</h2>
<ol>
<li><strong>Comprehensive Security Posture View</strong>: It consolidates various data sources, offering security teams a complete visibility of their organization’s security posture. This allows them to comprehend and enhance their security posture and manage exposure across devices, identities, applications, data, and multicloud infrastructure.</li>
<li><strong>Ongoing Threat Exposure Management (CTEM)</strong>: It enables organizations to establish a robust exposure management program with a continuous threat exposure management process.</li>
<li><strong>Risk Mitigation</strong>: It aids in reducing risk by providing a transparent view of every asset and real-time evaluation of potential exposures from both internal and external sources.</li>
<li><strong>Identification and Protection of Crucial Assets</strong>: It allows organizations to detect and categorize critical assets, ensuring they are safeguarded against a broad range of threats.</li>
<li><strong>Discovery of Adversary Intrusion Paths</strong>: It enables organizations to uncover and visualize potential adversary intrusion paths, including lateral movement, to proactively identify and halt attacker activity.</li>
<li><strong>Exposure Risk Communication</strong>: It assists in conveying exposure risk to business leaders and stakeholders with clear KPIs and actionable insights.</li>
<li><strong>Integration with External Data Sources and Tools</strong>: It improves exposure analysis and remediation by integrating with third-party data sources and tools.</li>
<li><strong>Management of Attack Surface</strong>: It offers a comprehensive view of the entire attack surface, enabling the exploration of assets and their relationships.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Continuous threat exposure management cycle: scoping, discovery, prioritization, validation and mobilization"
    width="1024"
    height="577"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/untitled-1024x577-1_hu_57c6e9b076beda8a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/untitled-1024x577-1.webp"></figure>
<h2 class="relative group">Integrations
    <div id="integrations" class="anchor"></div>
    
</h2>
<p><strong>Microsoft Security Exposure Management</strong> integrates data across various technologies to provide a comprehensive view of an organization’s security posture.</p>
<p>Here are some of the technologies <strong>Microsoft</strong> <strong>Security Exposure Management</strong> integrates with:</p>
<ol>
<li><strong>Vulnerability Management (VRM</strong>): Microsoft Defender Vulnerability Management (MDVM), Qualys Vulnerability Management (Preview), Rapid7 Vulnerability Management (Preview).</li>
<li><a href="https://www.modernsecurity.nl/microsoft-external-attack-surface-management/" ><strong>External Attack Surface Management (EASM)</strong>: Microsoft Defender External Attack Surface Management</a></li>
<li><strong>Cloud Security (CSPM)</strong>: Microsoft Defender Cloud Security Posture Management (CSPM)</li>
<li><strong>Endpoint Security (Device Security Posture)</strong>: Microsoft Defender for Endpoint (MDE)</li>
<li><strong>Identity Security (ISPM)</strong>: Microsoft Defender for Identity (MDI), Microsoft Entra ID (Free, P1, P2).</li>
<li><strong>SaaS Security Posture (SSPM)</strong>: Microsoft Defender for Cloud Apps (MDA) including <a href="https://learn.microsoft.com/en-us/defender-cloud-apps/enable-instant-visibility-protection-and-governance-actions-for-your-apps#user-app-governance-and-security-configuration-visibility"  target="_blank" rel="noreferrer">connectors to SaaS applications</a></li>
<li><strong>Email Security</strong>: Microsoft Defender for Office (MDO)</li>
<li><strong>OT/IOT Security:</strong> Microsoft Defender for IOT</li>
</ol>
<p>These integrations help in enriching the security context, managing attack surfaces, protecting critical assets, and exploring and mitigating exposure risk.</p>

<h2 class="relative group">Permissions for Security Exposure Management tasks
    <div id="permissions-for-security-exposure-management-tasks" class="anchor"></div>
    
</h2>
<p>For full access, users need one of the following <strong>Microsoft Entra ID</strong> roles to manage <strong>Security Exposure Management</strong>:</p>
<ul>
<li><strong>Global Admin</strong> (read and write permissions)</li>
<li><strong>Global Reader</strong> (read permissions)</li>
<li><strong>Security Admin</strong> (read and write permissions)</li>
<li><strong>Security Operator</strong> (read and limited write permissions)</li>
<li><strong>Security Reader</strong> (read permissions)</li>
</ul>
<p>Permission levels are summarized in the table:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Action</th>
              <th>Global Admin</th>
              <th>Global Reader</th>
              <th>Security Admin</th>
              <th>Security Operator</th>
              <th>Security Reader</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>Grant permissions to others</strong></td>
            <td>✔</td>
            <td>–</td>
            <td>–</td>
            <td>–</td>
            <td>–</td>
        </tr>
        <tr>
            <td><strong>Onboard your organization to the Microsoft Defender External Attack Surface Management (EASM) initiative</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Mark initiative as a favorite</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Set initiative target score</strong></td>
            <td>✔</td>
            <td>–</td>
            <td>–</td>
            <td>–</td>
            <td>–</td>
        </tr>
        <tr>
            <td><strong>View general initiatives</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Share metric/Recommendations</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Edit metric weight</strong></td>
            <td>✔</td>
            <td>–</td>
            <td>–</td>
            <td>–</td>
            <td>–</td>
        </tr>
        <tr>
            <td><strong>Export metric (PDF)</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>View metrics</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Export assets (metric/recommendation)</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Manage recommendations</strong></td>
            <td>✔</td>
            <td>–</td>
            <td>✔</td>
            <td>–</td>
            <td>–</td>
        </tr>
        <tr>
            <td><strong>View recommendations</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Export events</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
        <tr>
            <td><strong>Change criticality level</strong></td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
            <td>✔</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Start with the overview
    <div id="start-with-the-overview" class="anchor"></div>
    
</h2>
<p>The <strong>Microsoft Security Exposure Management</strong> &gt; Overview dashboard allows you to assess the comprehensive status of your organization’s security exposure.</p>
<p>Consider the dashboard as an initial reference for a quick overview of your organization’s security stance and exposure, and delve into specifics as required.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Exposure management overview with key initiatives, top metrics and the attack surface map"
    width="1677"
    height="1071"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/afbeelding_hu_984192f136dc38c5.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/afbeelding.webp"></figure>
<h2 class="relative group">Mapping and identifying critical assets
    <div id="mapping-and-identifying-critical-assets" class="anchor"></div>
    
</h2>
<p>The next step you should focus on is pinpointing critical assets. With <strong>Microsoft Security Exposure Management</strong>, you have the ability to designate and oversee resources as critical assets.</p>
<ul>
<li>Identifying critical assets helps ensure that the most important assets in your organization are protected against risk of data breaches and operational disruptions.</li>
<li>Critical asset identification contributes to availability and business continuity.</li>
<li>You can prioritize security investigations, posture recommendations, and remediation steps to focus on critical assets first.</li>
</ul>
<p>Microsoft Defender XDR has a option to review all the assets that have been discovered automatically, go to: <a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Defender portal</a>, select <strong>Settings &gt; Microsoft XDR &gt; Rules &gt; Critical asset management</strong>.</p>
<p>On the <strong>Critical asset management</strong> page, review predefined and <a href="https://learn.microsoft.com/en-us/security-exposure-management/classify-critical-assets"  target="_blank" rel="noreferrer">custom critical asset classifications</a>, including the number of assets in the classification, whether assets are on or off, and criticality levels.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Critical asset management with predefined classifications and criticality levels"
    width="1643"
    height="1033"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-14_hu_dcdba616483e5f40.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-14.webp"></figure>
<h2 class="relative group">Using the Attack Paths
    <div id="using-the-attack-paths" class="anchor"></div>
    
</h2>
<p><strong>Microsoft</strong> <strong>Security Exposure Management</strong>’s attack paths assist you in actively pinpointing and illustrating potential avenues that attackers could leverage by exploiting vulnerabilities, gaps, and misconfigurations. The simulation of attack paths empowers you to proactively explore and mitigate potential risks.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Attack surface map with devices, identities and cloud assets"
    width="1620"
    height="1078"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-8_hu_c4c69b030d9d5794.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-8.webp"></figure><p>To access <a href="https://security.microsoft.com/attack-paths"  target="_blank" rel="noreferrer">attack paths</a>, select <strong>Attack surface &gt; Attack path</strong>.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Attack paths list with Azure VMs whose RCE vulnerabilities allow lateral movement"
    width="1686"
    height="380"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-9_hu_6a3f974645da0566.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-9.webp"></figure><p>Open one of the <strong>entry points</strong>, to get an overview (graph) <strong>map of a possible attack path</strong>:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Attack path graph for a VM with RCE vulnerabilities allowing lateral movement to an Azure VM"
    width="901"
    height="593"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-10_hu_37d7dbc134f652c3.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-10.webp"></figure><p>After clicking <strong>view in map</strong> you see all the related users/machines/groups/other infrastructure, also with their connections/authentications (<strong>paths</strong>) involved:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Attack surface map showing the users, groups and devices on an attack path"
    width="1607"
    height="1073"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-11_hu_2ed2b518cac6974b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-11.webp"></figure>
<h2 class="relative group">Manage Exposure Insights
    <div id="manage-exposure-insights" class="anchor"></div>
    
</h2>
<p><strong>Exposure insights</strong> offer a detailed perspective on the status of your asset inventory’s security posture.</p>
<p>Chief Information Security Officers (CISOs), decision-makers, risk owners, and security teams can leverage these security insights and context to manage exposure risk throughout the organization and prioritize security endeavors and investments.</p>
<p>Exposure insights encompass <strong>security events</strong>, <strong>recommendations</strong>, <strong>metrics</strong>, and <strong>initiatives</strong>. These elements interconnect to provide a detailed context around the <strong>state of security posture</strong>.</p>
<p>The insights empower you to:</p>
<ol>
<li>Decompose the organizational security posture into prioritized initiatives.</li>
<li>Gauge and monitor the exposure of crucial security elements within these initiatives.</li>
<li>Prioritize security focus areas based on initiatives and metrics.</li>
<li>Implement actionable remediation steps to enhance security posture and minimize risk.</li>
<li>Monitor enhancements in security initiatives to track the reduction of security risk.</li>
</ol>

<h2 class="relative group">Review security initiatives
    <div id="review-security-initiatives" class="anchor"></div>
    
</h2>
<p><strong>Security initiatives</strong> streamline the management of security posture and assist in evaluating readiness and maturity in distinct areas of security risk.</p>
<p>Predefined initiatives are provided by <strong>Microsoft</strong> <strong>Security Exposure Management</strong>. Each of these predefined initiatives encompasses one or more security metrics pertinent to that initiative.</p>
<p>Initiatives can be associated with specific workload domains, assessing a particular area such as <strong>endpoint</strong>, <strong>identity</strong>, and <strong>cloud security</strong>. They might aid in threat analysis by addressing a specific threat across various categories, such as ransomware protection or critical asset protection. Initiatives can also concentrate on specific compliance standards.</p>
<p>You have the option to prioritize which initiatives to display on the <strong>Overview dashboard</strong>. The score of the initiative mirrors the exposure status of the initiative. You can delve into initiatives to view their related metrics and identify where gaps or risks lie. The score and recommendations of the initiative are derived from the metrics within the initiative.</p>
<p>From the Exposure management section on the navigation bar, select <strong>Exposure insights -&gt; Initiatives</strong> to open the <a href="https://security.microsoft.com/exposure-initiatives"  target="_blank" rel="noreferrer">initiatives</a> page.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Microsoft Security Exposure Management"
    width="1682"
    height="1078"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-12_hu_f31bc74e41009984.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-12.webp"></figure>
<h2 class="relative group">Review security metrics
    <div id="review-security-metrics" class="anchor"></div>
    
</h2>
<p>Metrics group together recommendations for similar assets, and measure security exposure around those assets, from very high exposure to no exposure identified.</p>
<p>For example:</p>
<ul>
<li>Percent of macOS endpoints missing an endpoint security solution agent</li>
<li>Percent of cloud resources with critical vulnerabilities</li>
</ul>
<p>Each metric shows:</p>
<ul>
<li>The percentage of assets affected, the relative importance of the metric, and the effect that the metric has on an initiative.</li>
<li>It also shows the weight, or importance, of the metric and its effect on the initiative score as a number. One is the lowest and 10 the highest.</li>
<li>Metric weight can be customized to have greater or lesser effect, based on your organizational business priorities.</li>
<li>Editing metric weight value affects the metric and all related initiatives.</li>
</ul>
<p>In the <a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Defender portal</a>, select <strong>Exposure management &gt; Exposure insights &gt; Metrics</strong> to open the <a href="https://security.microsoft.com/exposure-metrics"  target="_blank" rel="noreferrer">Metrics</a> page.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Exposure metrics with their current values and state"
    width="1675"
    height="1096"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-13_hu_79847cd32aae1574.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-13.webp"></figure>
<h2 class="relative group">Security Recommendations
    <div id="security-recommendations" class="anchor"></div>
    
</h2>
<p>Assets and workloads are assessed against security measurements and standards, and security recommendations are issued based on those assessments.</p>
<p>Recommendations provide practical steps to help you improve and remediate security posture and detected issues.</p>
<p>In Security Exposure Management, the recommendations catalog serves as a centralized repository for security recommendations.</p>
<p>In the <a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Defender portal</a>, select <strong>Exposure management &gt; Exposure insights &gt; Recommendations</strong> to open the <a href="https://security.microsoft.com/exposure-recommendations"  target="_blank" rel="noreferrer">Recommendations</a> page.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Exposure recommendations with compliance state and impact"
    width="1673"
    height="1089"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-15_hu_4b65a8b8ad1e85d6.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-15.webp"></figure><p>From here you can open each <strong>recommendation</strong>, to see the <strong>remediation steps</strong>, the <strong>exposed entities</strong> and all the related <strong>metrics/initiatives</strong> as guidance to strengthen your posture.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Recommendation to block Adobe Reader from creating child processes, marked not compliant"
    width="921"
    height="555"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-16_hu_70ef8d128501094a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-16.webp"></figure>
<h2 class="relative group">Security events
    <div id="security-events" class="anchor"></div>
    
</h2>
<p>Security events consolidate information about posture management changes that are detected. In response to changes, you can adjust accordingly to maintain a robust security posture.</p>
<p>Events measure the score drop or worsening in the metric status.</p>
<ul>
<li><em>Metric score drop events</em> notify customers when there’s a new exposure measured by the security metrics. They’re evaluated based on the effect on the score and its weight. If there’s a decrease of at least 2% since yesterday, meaning exposure grew by 2%, the change is considered a score drop event.</li>
<li><em>Initiative score drop events</em> notify customers when security initiatives decrease. We assess <em>Initiative score drop events</em> based on how it affects the score. If there’s a decrease of at least 2% since yesterday, the change is classified as a score drop event. Security events present and track, both initiative and metric score drop incidents to determine how they affect the organization’s security posture.</li>
</ul>
<ol>
<li>In the <a href="https://security.microsoft.com"  target="_blank" rel="noreferrer">Microsoft Defender portal</a>, select <strong>Exposure management -&gt; Exposure insights -&gt; Events</strong> to open the <a href="https://security.microsoft.com/exposure-events"  target="_blank" rel="noreferrer">Events</a> page.</li>
<li>Select the time range you need in the calendar drop-down.</li>
<li>To filter by initiative score drop events or metric score drop events, select <em>filter</em> or the score drop event quantity.</li>
<li>Select a specific event to open it in <strong>Initiatives</strong> or <strong>Metrics</strong>.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Recent security events with initiative and metric score drops"
    width="1673"
    height="1057"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-18_hu_9e24fd9719d89251.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-18.webp"></figure>
<h2 class="relative group">Last but not least…. Secure Score
    <div id="last-but-not-least-secure-score" class="anchor"></div>
    
</h2>
<p>As you might have noticed the Secure Score section for Microsoft 365 has been relocated from the Home section to <strong>Exposure Management</strong>. Security Exposure Management uses Secure score as one of its sources for <strong>initiative scores</strong>.</p>
<ul>
<li>Secure score has “recommended actions” for a <a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender/microsoft-secure-score#products-included-in-secure-score"  target="_blank" rel="noreferrer">number of products</a>.</li>
<li>Selecting a recommendation to review allows you to remediate the problem in the specific product, including recommendations that derived from secure score.</li>
<li>For recommendations where secure score is relevant, if secure score isn’t active, that recommendation doesn’t display.</li>
</ul>
<p>Great it has been placed there, as it is a more logical place within <strong>Security Exposure Management</strong> 🙂</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Microsoft Secure Score overview with score history and top recommended actions"
    width="1670"
    height="865"
    src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-17_hu_144c1d63068ff95.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-security-exposure-management/image-17.webp"></figure>]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-security-exposure-management/featured_hu_56a8c32afe893bec.jpg" medium="image" type="image/jpeg" width="1200" height="813"/><enclosure url="https://www.modernsecurity.nl/microsoft-security-exposure-management/featured_hu_56a8c32afe893bec.jpg" type="image/jpeg" length="84150"/></item><item><title>Protecting against QR Code Phishing (Quishing)</title><link>https://www.modernsecurity.nl/protecting-against-qr-code-phishing/</link><guid isPermaLink="true">https://www.modernsecurity.nl/protecting-against-qr-code-phishing/</guid><pubDate>Thu, 22 Feb 2024 17:32:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Defender for Office 365</category><category>Microsoft Defender XDR</category><description>In this article, we’ll delve into the fundamentals of QR Code Phishing (Quishing) and provide actionable steps to safeguard against this threat.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>As part of our SOC team, we’ve witnessed a significant surge in QR Code Phishing incidents over the past year. In this article, we’ll delve into the fundamentals of QR code phishing and provide actionable steps to safeguard against this growing threat. Notably, both offensive and defensive capabilities have evolved, including powerful tools like Evilginx (<a href="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/" >read my blogpost here</a>) and Microsoft’s defensive solutions.<br>
So back to the basics…</p>

<h2 class="relative group">How does QR Code Phishing work?
    <div id="how-does-qr-code-phishing-work" class="anchor"></div>
    
</h2>
<p>QR Codes present a unique challenge for security providers as they appear as an image during mail flow and are unreadable until rendered. Once the QR Code is rendered (what the human eye sees) it can then be scanned/processed for further analysis.</p>
<p><strong>QR codes are used in phishing attacks for mainly two reasons:</strong></p>
<ol>
<li>They move the attack away from well-protected corporate environments and onto the victim’s personally owned mobile device, which may be less secure;</li>
<li>They leverage the most common credential theft vector which is the uniform resource locator (URL). A QR code can be easily manipulated to redirect unsuspecting victims to malicious websites or to download malware in exactly the same way as URLs, only by putting the URL in a more difficult-to-detect location.</li>
</ol>
<p><strong>Steps in the process</strong>:</p>
<ul>
<li>Delivery: Attackers distribute QR codes via emails, social media, or physical means.</li>
<li>Scanning: Unsuspecting users scan the QR codes, assuming they are legitimate.</li>
<li>Redirection: The QR codes redirect users to malicious sites or prompt them to download malware.</li>
<li>Data Theft: The goal is to steal sensitive information.</li>
</ul>
<p>A few examples below (source: Microsoft)</p>
<p><sub><strong>QR Codes are embedded as inline images within email body</strong><br>
In the example below, the QR code is embedded inline within the body of the email, which when scanned redirects the user to a phishing website attempting to gather their credentials.</sub></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Phishing email posing as a Microsoft 2FA security policy with a QR code in the body"
    width="728"
    height="561"
    src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/image-1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/image-1.webp"></figure><p><sub><strong>QR Code within an image in the email body</strong><br>
In the example below, the QR code is placed inside an image embedded inline within the body of the email.  </sub></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Phishing email posing as DocuSign with a QR code inside an image"
    width="683"
    height="704"
    src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/image-2.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/image-2.webp"></figure><p><sub><strong>QR Code as an image in an attachment</strong><br>
In the example below, the QR code is embedded inside an attachment that is a PDF, which when scanned redirects the user to a phishing website attempting to gather their credentials.</sub></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="PDF attachment about a wage increase with a phishing QR code"
    width="805"
    height="670"
    src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/image-3_hu_2c44df82e77f1d13.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/image-3.webp"></figure>
<h2 class="relative group">Various patterns of QR Code Phishing messages
    <div id="various-patterns-of-qr-code-phishing-messages" class="anchor"></div>
    
</h2>
<p>Within QR Code Phishing, multiple layers of tactics, techniques and procedures (TTPs) reveal various patterns seen by Microsoft. This includes but is not limited to:</p>
<ol>
<li>URL redirection</li>
<li>Minimal to no text (reducing signals for ML detection)</li>
<li>Abuse of known brands</li>
<li>Abuse of sending infrastructure known for sending legitimate emails</li>
<li>A variety of social lures including 2 factor auth, document signing, and more</li>
<li>Embedding QR codes in attachments</li>
</ol>

<h2 class="relative group">How can Microsoft protect me from QR Code Phishing?
    <div id="how-can-microsoft-protect-me-from-qr-code-phishing" class="anchor"></div>
    
</h2>
<p>Microsoft offers a wide array of options to (technically) protect yourself against QR Code Phishing. Ensure that you have at Defender for Office 365 P1/P2 licenses and Defender for Endpoint to make the most of the available features:</p>
<ol>
<li><strong>Microsoft Defender for Office 365</strong> uses advanced technologies to detect and block QR code phishing attacks.</li>
<li><strong>Microsoft Defender for Endpoint</strong> on Android and iOS includes anti-phishing capabilities that apply to QR code phishing attacks, blocking phishing sites from being accessed.</li>
<li><strong>Microsoft Defender for Endpoint</strong> also provides protection against malware that may be downloaded or installed through the URL link.</li>
</ol>
<p>Microsoft Defender for Office 365 has recently also introduced several (new) capabilities to protect organizations against QR code phishing:</p>
<ol>
<li><strong>Advanced Image Extraction Technologies:</strong> Defender for Office 365 uses advanced image extraction technologies to detect QR codes in emails1. These technologies allow the system to extract URL metadata from a QR code and use this information for existing threat protection and filtering capabilities.</li>
<li><strong>Machine Learning Models:</strong> URLs extracted from QR codes are analyzed using machine learning models. These models check the reputation of the URLs and assess their potential threat level.</li>
<li><strong>Heuristics-Based Rules:</strong> Microsoft has developed heuristics-based rules that can quickly identify and block QR code phishing attempts. These rules were released within minutes, leading to approximately 1.5 million QR code phishing attempts blocked in email bodies per day.</li>
<li><strong>Combining Signals:</strong> Defender for Office 365 combines various signals, including QR code data, sender intelligence, message headers, content filtering, and recipient details, to identify malicious messages.</li>
</ol>
<p><a href="https://techcommunity.microsoft.com/t5/microsoft-defender-for-office/protect-your-organizations-against-qr-code-phishing-with/ba-p/4007041"  target="_blank" rel="noreferrer">https://techcommunity.microsoft.com/t5/microsoft-defender-for-office/protect-your-organizations-against-qr-code-phishing-with/ba-p/4007041</a></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Statistics on QR code phishing blocked by Microsoft Defender for Office 365"
    width="730"
    height="533"
    src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/urjagandhi-4-1702410703365.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/urjagandhi-4-1702410703365.webp"></figure>
<h2 class="relative group">But wait? Is this all I can do?
    <div id="but-wait-is-this-all-i-can-do" class="anchor"></div>
    
</h2>
<p>When it comes to QR Code Phishing, there’s more to consider (this is important, perhaps even more…). Let’s break this down into two parts:</p>
<p><strong>User Awareness</strong>:</p>
<ul>
<li>All forms of phishing start with awareness.</li>
<li>Train your users to recognize QR Code Phishing attempts (<a href="https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/attack-simulation-training-simulations?view=o365-worldwide"  target="_blank" rel="noreferrer">also see Microsoft Attack Simulation</a>).</li>
<li>Help them understand when they encounter QR Code Phishing.</li>
</ul>
<p><strong>XDR</strong>:</p>
<ul>
<li>QR Code Phishing aims to gain unauthorized access to an environment.</li>
<li>Often, this involves Account Takeover (AiTM).<sup><a href="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/#d4b1155a-4bb9-48e7-b69b-8d155468207d" >1</a></sup><sup><a href="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/#200b6c74-6cb5-48b7-983e-c84373c2aeb7" >2</a></sup></li>
<li>Leveraging an Extended Detection and Response (XDR) solution allows you to detect, respond and disrupt effectively.</li>
<li>Microsoft’s offerings, such as Identity Protection, Conditional Access, and Phishing Resistant MFA, play a crucial role in defending against these threats.</li>
</ul>
<ol>
<li>For active hunting into QR Code Phishing Microsoft did a pretty good job on all the query’s and indicators you can use to get more understanding of what is going on in your own environment here: <a href="https://techcommunity.microsoft.com/t5/microsoft-security-experts-blog/hunting-for-qr-code-aitm-phishing-and-user-compromise/ba-p/4053324"  target="_blank" rel="noreferrer">Hunting for QR Code AiTM</a> <a href="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/#d4b1155a-4bb9-48e7-b69b-8d155468207d-link" >↩︎</a></li>
<li>Als see <a href="https://techcommunity.microsoft.com/t5/microsoft-defender-for-office/hunting-and-responding-to-qr-code-based-phishing-attacks-with/ba-p/4074730"  target="_blank" rel="noreferrer">this new message</a> from the 1st of april, which enriched possibilities to use identifiers to investigate, monitor alert or trigger automated investigations, hunt and remediate QR code based attacks more effectively and efficiently. <a href="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/#200b6c74-6cb5-48b7-983e-c84373c2aeb7-link" >↩︎</a></li>
</ol>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/featured_hu_2cda8cb48e1b0a44.jpg" medium="image" type="image/jpeg" width="1200" height="800"/><enclosure url="https://www.modernsecurity.nl/protecting-against-qr-code-phishing/featured_hu_2cda8cb48e1b0a44.jpg" type="image/jpeg" length="378555"/></item><item><title>AiTM / MFA phishing attacks with Evilginx3 and Gophish</title><link>https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/</link><guid isPermaLink="true">https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/</guid><pubDate>Mon, 12 Feb 2024 09:33:26 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Microsoft Defender for Office 365</category><description>Evilginx3 is a MiTM attack framework for phishing login credentials along with session cookies (MFA). In this blogpost used together with Gophish.</description><content:encoded><![CDATA[<p>I’ve been a user of <a href="https://evilginx.com/"  target="_blank" rel="noreferrer">Evilginx</a> for quite a few years. It’s an awesome tool, very impressive in its functionality, and still a valid solution for capturing users and their tokens. All the credit goes to Kuba Gretzky for his impressive work on Evilginx2 and now Evilginx3.</p>
<p>That being said, I always find Evilginx great as a one-off solution, but what if you want to keep track of the emails that have been sent out? And want to import email templates with 1 click? Or when you want to use it as a social engineering toolkit? Compared to the <a href="https://www.modernsecurity.nl/security/" >Microsoft</a> Attack Simulation, it only provides the ‘technique’ from a hacker perspective, but you might want to use it as a recurring campaign.</p>
<p>So there’s something more; that’s why I wanted to wrap this up with this blog because there’s a great solution for all these needs. It’s called Gophish, an open-source phishing framework designed for security professionals to conduct simulated phishing attacks, assess organizational vulnerabilities, and enhance cybersecurity awareness.</p>
<p>But first back to the basics…</p>

<h2 class="relative group">What is Evilginx? And how does it work?
    <div id="what-is-evilginx-and-how-does-it-work" class="anchor"></div>
    
</h2>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilginx logo"
    width="700"
    height="136"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/evilginx-banner.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/evilginx-banner.webp"></figure><p>Evilginx3 is a sophisticated tool designed for phishing attacks and credential theft. It is an advanced and powerful man-in-the-middle (MITM) attack framework that specifically targets multifactor authentication (MFA) mechanisms. Developed by security researcher Kuba Gretzky, Evilginx3 is the successor to the original Evilginx tool, with enhanced features and capabilities.</p>
<p><strong>Key Features:</strong></p>
<ol>
<li><strong>Man-in-the-Middle (MITM) Attack:</strong> Evilginx operates as a MITM attack, intercepting communication between a user and a targeted service. This enables attackers to capture sensitive information, such as login credentials and session cookies, without the victim’s knowledge.</li>
<li><strong>Focus on Multifactor Authentication (MFA):</strong> One of the distinguishing features of Evilginx3 is its ability to bypass multifactor authentication (very often used with Microsoft environments). It effectively circumvents additional layers of security that typically require a secondary form of verification, allowing attackers to gain unauthorized access.</li>
<li><strong>Credential theft:</strong> Evilginx3 is particularly effective at stealing login credentials. By tricking users into interacting with a malicious site that appears legitimate, the tool captures sensitive data, including usernames and passwords, compromising the security of the targeted accounts.</li>
<li><strong>Phishing attacks:</strong> The tool is commonly used in phishing attacks where users are lured into providing their credentials on a fake website. Evilginx3 excels at creating convincing replicas of legitimate sites, making it challenging for users to distinguish between the authentic service and the malicious one.</li>
<li><strong>Advanced features:</strong> Evilginx3 comes with advanced features, including the ability to adapt to changes in the targeted website’s structure. This makes it resilient against security measures that organizations may put in place to detect and prevent phishing attacks.</li>
<li><strong>Security awareness and prevention:</strong> Understanding the capabilities of Evilginx3 is crucial for security awareness. Organizations should educate their users about the risks of phishing attacks and promote practices to identify and avoid falling victim to such tactics.</li>
<li><strong>Continuous updates:</strong> As a tool actively developed by the security community, Evilginx3 undergoes continuous updates and improvements. It is essential for security professionals and organizations to stay informed about the latest developments to enhance their defense strategies.</li>
</ol>
<p>With Evilginx3 there are plenty of new options and improvements compared to Evilginx2, which you can read here: <a href="https://breakdev.org/evilginx-3-0-evilginx-mastery/"  target="_blank" rel="noreferrer">https://breakdev.org/evilginx-3-0-evilginx-mastery/</a> (I also recommend taking the training the website offers you ^^).</p>
<p>Downside they took the phishlets away from Github, so you might need to build phishlets yourself, but there’s a lot of documentation about this available on the internet (and doable :))</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilginx3 phishlets meme with the Evilginx community edition console"
    width="1012"
    height="624"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/1-ahp7uyln80qh6hr4e6czia_hu_5e17845edb016963.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/1-ahp7uyln80qh6hr4e6czia.webp"></figure>
<h2 class="relative group">And what about Gophish?
    <div id="and-what-about-gophish" class="anchor"></div>
    
</h2>
<p>Gophish is an open-source phishing framework that empowers security professionals and penetration testers to conduct simulated phishing attacks. Developed with ease of use and flexibility in mind, Gophish provides a platform for organizations to assess and improve their resilience against phishing threats.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Gophish dashboard illustration with email sent, opened, clicked and submitted data counters"
    width="1500"
    height="650"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/blog-gophish-header-d63f30d0f29ffe87ee8c7292e9d3fb35-bae6f-1_hu_3bf212f5770fdbf1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/blog-gophish-header-d63f30d0f29ffe87ee8c7292e9d3fb35-bae6f-1.webp"></figure><p><strong>Key Features:</strong></p>
<ol>
<li><strong>User-Friendly Interface:</strong> Gophish is renowned for its intuitive and user-friendly web-based interface. Its simplicity allows even those with limited technical expertise to create and manage phishing campaigns effectively.</li>
<li><strong>Campaign Customization:</strong> Security professionals can customize phishing campaigns based on their specific needs. Gophish supports the creation of realistic and targeted simulations, enabling organizations to test their defenses in a controlled environment.</li>
<li><strong>Template Library:</strong> The framework includes a comprehensive template library, offering a variety of pre-built email templates and landing pages. This feature streamlines the process of creating convincing phishing scenarios that closely mimic real-world attacks.</li>
<li><strong>Automated Campaigns:</strong> Gophish facilitates the automation of phishing campaigns, saving time and resources for security teams. Automation allows for the systematic testing of different attack vectors, ensuring a thorough assessment of an organization’s security posture.</li>
<li><strong>Credential Harvesting:</strong> Gophish enables the simulation of credential harvesting attacks, helping organizations identify vulnerabilities in their authentication processes. This is crucial for understanding the potential impact of successful phishing attempts.</li>
<li><strong>Reporting and Analytics:</strong> Detailed reporting and analytics features in Gophish provide valuable insights into the effectiveness of phishing campaigns. Security teams can analyze metrics such as open rates, click-through rates, and successful compromises to refine their security strategies.</li>
</ol>
<p><strong>Use Cases:</strong></p>
<ol>
<li><strong>Security Awareness Training:</strong> Gophish is widely used for security awareness training programs. Simulated phishing campaigns help educate employees about the risks of phishing and reinforce good security practices.</li>
<li><strong>Penetration Testing:</strong> Security professionals leverage Gophish during penetration testing engagements to evaluate an organization’s susceptibility to phishing attacks. This assists in identifying and addressing vulnerabilities before malicious actors can exploit them.</li>
<li><strong>Policy Compliance:</strong> Gophish aids organizations in assessing their compliance with security policies and regulations. Regular phishing simulations assist in identifying areas that may require additional security measures.</li>
</ol>

<h2 class="relative group">Awesome, so how does it work together?
    <div id="awesome-so-how-does-it-work-together" class="anchor"></div>
    
</h2>
<p>There are plenty of resources for Gophish and Evilginx3 on Youtube and Google, but if you want to combine these 2 solutions, there’s one great guy called <a href="https://github.com/fin3ss3g0d"  target="_blank" rel="noreferrer">fin3ss3g0d</a> on Github, that did it already for you (called <strong>Evilgophish</strong>). He took his repo private since october, but I’m sure if you buy him a monthly sponsoring, he’ll offer your everything needed.</p>
<p>Infrastructure layout here (credit: fin3ss3g0d):</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilgophish infrastructure diagram with Apache2 proxy, evilginx2 proxy, redirect server and Gophish database"
    width="2000"
    height="1461"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/diagram_hu_8df9bee99ecf7780.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/diagram.webp"></figure><p>First of all, you need a domain (read this blog about domains <a href="https://outpost24.com/blog/phishing-better-proxy-than-story/#get-a-domain"  target="_blank" rel="noreferrer">here</a>) and a VPS-server (might recommend something like DigitalOcean). I always take a the lastest Ubuntu version, as it’s compatible with the latest software. Setup the correct DNS server(s) in your VPS (otherwise this gives you a headache later on).</p>
<p>Git clone this repo on your VPS <a href="https://github.com/fin3ss3g0d/evilgophish"  target="_blank" rel="noreferrer">https://github.com/fin3ss3g0d/evilgophish</a> (still working tho – but he’s maintaining his repo/updates only for sponsors):</p>
<p>As soon as you have it cloned, go into the directory and start it by running: <a href="https://github.com/fin3ss3g0d/evilgophish/blob/main/setup.sh"  target="_blank" rel="noreferrer">setup.sh</a> (use your own domain, subdomains and redirect url like you can see down here)</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./setup.sh mircrosoftonline.nl <span class="s2">&#34;account accounts login logins&#34;</span> <span class="nb">false</span> https://portal.office.com <span class="nb">true</span> user_id false</span></span></code></pre></div></div>
<p>After running this command, you probably get a message that you needed to create a DNS entry for the Certbot, as that is being used to create certificates from LetsEncrypt. After creating the DNS entries, you must change the Apache conf file with the appropriate file paths with the Cert files (fullchain and key).</p>
<p>Run Apache (if still erroring check <strong>journalctl -xe</strong>):</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo systemctl start apache2</span></span></code></pre></div></div>
<p>When this is completed, the only thing you need to do is running the apps. I can recommend doing this by nohup or tmux, as you want to keep everything running after disconnecting your SSH-session(s):</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">Bash</div><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">./gophish <span class="o">(</span>from the gophish folder<span class="o">)</span>
</span></span><span class="line"><span class="cl">./evilfeed <span class="o">(</span>from the evilfeed folder<span class="o">)</span>
</span></span><span class="line"><span class="cl">./evilginx3 -g ~/evilgophish/gophish/gophish.db -p ~/evilgophish/evilginx3/legacy_phishlets <span class="o">(</span>from the evilginx folder<span class="o">)</span></span></span></code></pre></div></div>
<p><strong>Configuring Evilginx3</strong></p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">config domain &lt;yourdomain&gt;
</span></span><span class="line"><span class="cl">config ip &lt;yourIP&gt;
</span></span><span class="line"><span class="cl">blacklist unauth</span></span></code></pre></div></div>
<p>Before creating and enabling the phishlets and lures, make sure to have the correct DNS pointers in place, otherwise you’ll end up with 400 errors on the Certbot (and 429 errors when you try too many times and you’ll need to wait an hour because of the rate limiter ;-):</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">phishlets hostname o365 &lt;yourdomain&gt; (be aware of the correct name of your phishlet)
</span></span><span class="line"><span class="cl">phishlets enable o3653</span></span></code></pre></div></div>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">lures create o3653
</span></span><span class="line"><span class="cl">lures edit 0 redirect_url https://portal.office.com
</span></span><span class="line"><span class="cl">lures get-url 0</span></span></code></pre></div></div>
<p>Now, you’re fully setup and you received a lure, which you can use in Gophish (in my example it’s <a href="https://login.mircrosoftonline.nl/YDBFinIs"  target="_blank" rel="noreferrer">https://login.mircrosoftonline.nl/YDBFinIs</a>)</p>
<p>Login for the first time in Gophish (by x.x.x.x:3333) and generate your own password (the temporary password was given you when you first started the Gophish app). If you can’t connect to the Gophish environment make sure to check the Gophish conf file and enter the correct IP of your VPS and restart the service):</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilgophish login page"
    width="2000"
    height="1078"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding_hu_f0b68a032d83049a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding.webp"></figure><p>Setup the groups (contacts), sending profiles (can recommend Mailgun with DKIM, SPF etc.) and paste your first email template your want to use (I used a random Azure email I’ve received today in my example):</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Editing a Microsoft Azure email template in Evilgophish"
    width="2000"
    height="1074"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-1_hu_911078a99283917.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-1.webp"></figure><p>Start your first campaign and enter the Evilginx lure URL you’ve received by configuring Evilginx3, select the contacts/groups, sending profile and you’re good to go:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="New email campaign in Evilgophish with the Evilginx lure URL, Mailgun sending profile and target group"
    width="2000"
    height="1073"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-2_hu_4d9eca7b5a92c1f3.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-2.webp"></figure><p>After clicking the “Profit” the email is being send out to your contact(s) and you can immediately start monitoring your campaign:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilgophish dashboard showing one email sent, opened and clicked"
    width="2000"
    height="1079"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-13_hu_1c03419e2c41c1da.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-13.webp"></figure><p>From a receiving perspective, I’ve now got the email in my inbox. As you can see a legitimate email which contains a button with the lure URL behind, which I configured in Gophish:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Phishing email posing as Microsoft Azure Spot Virtual Machines in Outlook"
    width="1557"
    height="1148"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-3_hu_3b5af4dde5802df4.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-3.webp"></figure><p>The moment I click the URL, it pops out a browser session to the Evilginx3 lure/phishlet I created and shows a login screen, where I can enter my details:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Phished Microsoft sign-in page asking for the email address"
    width="2000"
    height="1133"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-4_hu_f5b47aa976565f58.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-4.webp"></figure><p>Enter password:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Phished Microsoft sign-in page asking for the password"
    width="2000"
    height="1133"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-5_hu_9ab842d65613c240.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-5.webp"></figure><p>Accept MFA:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Microsoft Authenticator number matching prompt during the phished sign-in"
    width="2000"
    height="1133"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-6_hu_98deea3217ed7194.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-6.webp"></figure><p>And I’m logged in to my tenant:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Microsoft 365 start page after signing in through the Evilginx proxy"
    width="2000"
    height="1133"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-7_hu_736cba94beedd9c1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-7.webp"></figure><p>From Gophish I can see a full timeline, with the timestamps I clicked, submitted data etc.:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilgophish timeline showing the email opened, link clicked and data submitted"
    width="2000"
    height="1070"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-8_hu_d880afb1e9fdaea9.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-8.webp"></figure><p>Evilginx3 shows me the lures being used and the credentials and WOW wtfbbqlulz the tokens:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilginx3 console with phishlets, the lure URL and intercepted cookie tokens"
    width="1362"
    height="982"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-9_hu_30c4af14153731bd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-9.webp"></figure><p>Nice, cookie tokens intercepted… So when I check the sessions (in my case session ID 6) it shows the token:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Evilginx3 session details with captured username, password and session cookies"
    width="1352"
    height="488"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-10_hu_803db36717efa7f7.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-10.webp"></figure><p>Now re-use that token, to login to my tenant without prompting a MFA, nor credentials. Do this by opening a new browser (use developer tools) and enter the following code an hit enter (paste the cookie output between the (‘<strong><code>[insert...here]</code></strong>‘):</p>
<div class="highlight-wrapper"><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">var obj = JSON.parse(&#39;[insert session cookie content here]&#39;);
</span></span><span class="line"><span class="cl">for (let i = 0; i &lt; 3; i++) { document.cookie= obj[i].name+&#34;=&#34;+obj[i].value+&#34;; expires=Wed, 05 Aug 2040 23:00:00 UTC; path=/&#34;; }</span></span></code></pre></div></div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Browser developer console injecting the captured session cookies on the Microsoft sign-in page"
    width="2000"
    height="1270"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-11_hu_6d8d6aa82932d00e.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-11.webp"></figure><p>Refresh the page:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Microsoft 365 apps page opened with the stolen session cookies"
    width="2000"
    height="1270"
    src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-12_hu_98abf3f1a6b21df6.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/afbeelding-12.webp"></figure><p>And you’re all set. Easy isn’t it? In another post I’ll dive in the techniques you can use to weaponize yourself against these AiTM-attacks (on Microsoft 365).</p>
<p>If you need to have some more information regarding Evilginx3 and/or Gophish check these resources:</p>
<p><a href="https://www.jackphilipbutton.com/post/how-to-protect-evilginx-using-cloudflare-and-html-obfuscation"  target="_blank" rel="noreferrer">https://www.jackphilipbutton.com/post/how-to-protect-evilginx-using-cloudflare-and-html-obfuscation</a><br>
<a href="https://github.com/waelmas/frameless-bitb"  target="_blank" rel="noreferrer">https://github.com/waelmas/frameless-bitb</a><br>
<a href="https://simplerhacking.medium.com/tutorial-phishlet-creation-for-evilginx3-modern-mfa-mitm-ransomware-phishing-engagements-276790d8c0e9"  target="_blank" rel="noreferrer">https://simplerhacking.medium.com/tutorial-phishlet-creation-for-evilginx3-modern-mfa-mitm-ransomware-phishing-engagements-276790d8c0e9</a><br>
<a href="https://github.com/simplerhacking/Evilginx3-Phishlets"  target="_blank" rel="noreferrer">https://github.com/simplerhacking/Evilginx3-Phishlets</a><br>
<a href="https://outpost24.com/blog/phishing-better-proxy-than-story/"  target="_blank" rel="noreferrer">https://outpost24.com/blog/phishing-better-proxy-than-story/</a><br>
<a href="https://getgophish.com/documentation/"  target="_blank" rel="noreferrer">https://getgophish.com/documentation/</a></p>
<p><strong><mark>Disclaimer: I’m not responsible for any damage or harm caused by using these products or information. Use it wisely. Also don’t bother checking the links used in my examples, domain has been reporting as phishing/abuse and was taken down within a few hours.</mark></strong></p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/featured_hu_9a776c7c8150a126.jpg" medium="image" type="image/jpeg" width="1129" height="692"/><enclosure url="https://www.modernsecurity.nl/aitm-mfa-phishing-attacks-evilginx3-gophish/featured_hu_9a776c7c8150a126.jpg" type="image/jpeg" length="96183"/></item><item><title>Monitoring admin roles in LogAnalytics</title><link>https://www.modernsecurity.nl/monitoring-admin-roles-in-loganalytics/</link><guid isPermaLink="true">https://www.modernsecurity.nl/monitoring-admin-roles-in-loganalytics/</guid><pubDate>Thu, 28 Dec 2023 21:27:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Identity</category><category>Security</category><description>A KQL query for Log Analytics that shows who added users to Entra ID admin roles outside PIM, and who assigned admin role eligibility.</description><content:encoded><![CDATA[<p>When it gets to know your environment, I always want to know who added admin roles to a user account. At least, I like to know who added which user to an admin role.</p>
<p>But…</p>
<p>In LogAnalytics you’ll find AuditLogs, but what to do you need to check? Do I find PIM activations interesting? Probably not. Do I want to all see PIM elevations? Maybe.</p>
<p>What I do find interesting in specific is the behaviour of adding user accounts outside PIM and who added a possible eligibility/assignment of an admin role to one of the users.</p>
<p>But looking up that information might end you up frustrated with a lot of information you will never use in any case.</p>
<p>Most of the time I use a KQL query that looks up the 2 mentioned scenarios in 1 query. With this query you can create alerts in LogAnalytics to monitor the behaviour:</p>
<ol>
<li>Who added an admin role outside PIM? (users with a name “admin”)</li>
<li>Who added an eligibility of an admin role in PIM?</li>
</ol>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">AuditLogs
<span class="o">|</span> <span class="k">where</span> (OperationName <span class="k">contains</span> <span class="s">&#34;Add member to role&#34;</span> <span class="k">and</span> TargetResources <span class="k">contains</span> <span class="s">&#34;admin&#34;</span> <span class="k">and</span> Identity <span class="o">&lt;</span><span class="o">&gt;</span> <span class="s">&#34;MS-PIM&#34;</span> <span class="k">and</span> LoggedByService <span class="o">&lt;</span><span class="o">&gt;</span> <span class="s">&#34;PIM&#34;</span>) <span class="k">or</span> (OperationName <span class="k">contains</span> <span class="s">&#34;Add eligible member to role in PIM requested&#34;</span> <span class="k">and</span> TargetResources <span class="k">contains</span> <span class="s">&#34;admin&#34;</span>)</code></pre></div>
</div>
<p>In case you have specific users with the name “admin” you can also workaround this by using the following query, that will only target by roles explicitly:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">KQL</div><pre tabindex="0" class="chroma"><code class="language-kql" data-lang="kql">AuditLogs
<span class="o">|</span> <span class="k">where</span> role <span class="k">contains</span> <span class="s">&#34;Administrator&#34;</span> <span class="k">and</span> (<span class="k">where</span> (OperationName <span class="k">contains</span> <span class="s">&#34;Add member to role&#34;</span> <span class="k">and</span> Identity <span class="o">&lt;</span><span class="o">&gt;</span> <span class="s">&#34;MS-PIM&#34;</span> <span class="k">and</span> LoggedByService <span class="o">&lt;</span><span class="o">&gt;</span> <span class="s">&#34;PIM&#34;</span>) <span class="k">or</span> (OperationName <span class="k">contains</span> <span class="s">&#34;Add eligible member to role in PIM requested&#34;</span>))</code></pre></div>
</div>
<p>If you use Sentinel, you’ll see some of the available analytics rules that will do the same for you, but as in my case, not every customer uses Sentinel.</p>
<p>And we DO want to know what is going on in the customer environment 😉</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/monitoring-admin-roles-in-loganalytics/featured_hu_34c43fab797ec84b.jpg" medium="image" type="image/jpeg" width="1200" height="806"/><enclosure url="https://www.modernsecurity.nl/monitoring-admin-roles-in-loganalytics/featured_hu_34c43fab797ec84b.jpg" type="image/jpeg" length="170255"/></item><item><title>Manage Microsoft Sentinel with Workspace Manager</title><link>https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/</link><guid isPermaLink="true">https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/</guid><pubDate>Sun, 24 Dec 2023 12:58:33 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Sentinel</category><category>Security</category><description>Read more about a feature to manage your Microsoft Sentinel tenants with Workspace Manager. A cool feature to centrally manage your customers.</description><content:encoded><![CDATA[<p>Recently I came across a new feature, that is kinda welcome as a basic <a href="https://www.modernsecurity.nl/microsoft-sentinel/" >Sentinel</a> user. Normally we automate things through BICEP or DevOps, but now this can be done on a MSSP-based way of working in the portal (together with Lighthouse).</p>
<p>The feature is called <strong>Workspace Manager</strong> and can be found in the settings / settings in your Sentinel Workspace. You’ll have to keep in mind that you need at least one Sentinel that will run as parent workspace:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Sentinel settings with Make this workspace a parent enabled for workspace manager"
    width="2000"
    height="1029"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding_hu_8cd527e6d2e97afe.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding.webp"></figure><p>Following can be automated and deployed through the group/workspace members:</p>
<ul>
<li>Analytics rules</li>
<li>Automation rules (excluding Playbooks)</li>
<li>Parsers, Saved Searches and Functions</li>
<li>Hunting and Livestream queries</li>
<li>Workbooks</li>
</ul>
<p>By enabling the parent workspace, you can easily deploy all above to all member workspaces. First add the members:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Empty workspace manager with the Add workspaces button"
    width="2000"
    height="1080"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-1_hu_711b83fdc25f6cd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-1.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Selecting member Sentinel workspaces in workspace manager"
    width="2000"
    height="1080"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-2_hu_87c66fa6faf937fd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-2.webp"></figure><p>Create a group:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Creating a group in workspace manager"
    width="2000"
    height="1080"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-3_hu_7dbb5982efe6341f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-3.webp"></figure><p>Add the member to your group:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Selecting the member workspaces for the workspace manager group"
    width="2000"
    height="1084"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-4_hu_cba3c599d6fdc485.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-4.webp"></figure><p>Choose the data you want to update or create (sync):</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Selecting content such as analytics rules, workbooks and saved searches to publish"
    width="2000"
    height="1082"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-5_hu_460d222d75c91ef3.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-5.webp"></figure><p>The sync will run and you can check status here (I selected no content in my test tenant / screenshot tho – but you select everything there):</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Workspace manager group published successfully to seven workspaces"
    width="2000"
    height="1084"
    src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-7_hu_8e7c67d015c4e1e0.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/afbeelding-7.webp"></figure><p>More information regarding this feature here: <a href="https://learn.microsoft.com/en-us/azure/sentinel/workspace-manager"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/azure/sentinel/workspace-manager</a></p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/featured_hu_1d4e3f1b0f2316eb.jpg" medium="image" type="image/jpeg" width="1200" height="675"/><enclosure url="https://www.modernsecurity.nl/manage-microsoft-sentinel-with-workspace-manager/featured_hu_1d4e3f1b0f2316eb.jpg" type="image/jpeg" length="175080"/></item><item><title>New website</title><link>https://www.modernsecurity.nl/new-website/</link><guid isPermaLink="true">https://www.modernsecurity.nl/new-website/</guid><pubDate>Fri, 01 Dec 2023 18:30:59 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Security</category><category>Compliance</category><category>Identity</category><description>For a while, I managed several tech blogs, but due to time constraints, I had to let them go. Now, I'm eager to set one up again, focusing primarily on</description><content:encoded>&lt;p>For a while, I managed several tech blogs, but due to time constraints, I had to let them go. Now, I’m eager to set one up again, focusing primarily on security. It won’t be your typical website; rather, it’ll incorporate more modern security elements. I’m particularly enthusiastic about the current Microsoft ecosystem, so expect posts covering Microsoft Defender XDR, Sentinel and related topics. Additionally, I’ll delve into important CVEs and other areas of personal interest.&lt;/p>
&lt;p>P.S. I post under my own title.&lt;/p>
</content:encoded><media:content url="https://www.modernsecurity.nl/new-website/featured_hu_f8297301accb69de.jpg" medium="image" type="image/jpeg" width="1200" height="800"/><enclosure url="https://www.modernsecurity.nl/new-website/featured_hu_f8297301accb69de.jpg" type="image/jpeg" length="105528"/></item></channel></rss>