<?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>Microsoft Defender for Identity - Modern Security</title><link>https://www.modernsecurity.nl/microsoft-defender-for-identity/</link><description>Deep technical articles on Microsoft Defender for Identity, covering AD attack detection, identity threats, sensor deployment, and tuning.</description><language>en-us</language><copyright>© 2026 Modern Security</copyright><generator>Hugo</generator><lastBuildDate>Mon, 20 Apr 2026 20:29:02 +0100</lastBuildDate><atom:link href="https://www.modernsecurity.nl/microsoft-defender-for-identity/index.xml" rel="self" type="application/rss+xml"/><image><url>https://www.modernsecurity.nl/img/logo-light_hu_98d13a0e48fc51de.png</url><title>Microsoft Defender for Identity - Modern Security</title><link>https://www.modernsecurity.nl/microsoft-defender-for-identity/</link></image><item><title>Microsoft Defender for Identity sensor guide (v3.x)</title><link>https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/</link><guid isPermaLink="true">https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/</guid><pubDate>Thu, 02 Apr 2026 21:31:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Defender for Identity</category><category>Microsoft Defender XDR</category><description>Complete step-by-step guide to deploying and migrating to the Microsoft Defender for Identity (MDI) sensor v3.x and auditing included.</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>In a <a href="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/" >previous post on modernsecurity.nl</a>, I walked through the classic installation of Microsoft Defender for Identity (MDI) using the v2.x sensor: prerequisites, gMSA configuration, Windows event auditing, NTLM auditing, and the manual download-and-install process. If you’ve deployed MDI before, you’ll remember the overhead: downloading an installer package, running it on each domain controller, creating and maintaining a gMSA account, configuring audit GPOs, and dealing with Npcap.</p>
<p>That process is now behind us.</p>
<p>With the <strong>general availability of the Microsoft Defender for Identity sensor v3.x</strong> in early 2026, and the release of the portal-based migration wizard in March 2026, Microsoft has completely changed how MDI sensors are deployed and managed. The new sensor runs as an extension of <strong>Microsoft Defender for Endpoint (MDE)</strong>: if MDE is already on your domain controllers (as it should be), MDI protection is now a matter of a few clicks from the portal.</p>
<p>This guide covers everything you need:</p>
<ul>
<li>What changed and why it matters</li>
<li>Prerequisites for both fresh deployments and migrations</li>
<li>Deploying the sensor from the Defender portal</li>
<li>Migrating existing v2.x sensors to v3.x with zero downtime</li>
<li>Post-deployment and post-migration configuration: RPC auditing, automatic Windows auditing, and gMSA removal</li>
</ul>
<p>All steps are verified against Microsoft Learn documentation and tested in live environments.</p>

<h2 class="relative group">What changed with the MDI sensor v3.x
    <div id="what-changed-with-the-mdi-sensor-v3-x" class="anchor"></div>
    
</h2>
<p>The biggest change is architectural. The v3.x sensor is <strong>not a standalone agent</strong>. It runs as a component within the MDE/SENSE service already present on your domain controllers. This is the long-awaited unification of endpoint and identity telemetry into a single agent.</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Area</th>
              <th>v2.x (classic)</th>
              <th>v3.x (new)</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Deployment</td>
            <td>Manual installer on each DC</td>
            <td>Portal-based activation, no installer</td>
        </tr>
        <tr>
            <td>Dependency</td>
            <td>Standalone agent</td>
            <td>Built on top of MDE (SENSE service)</td>
        </tr>
        <tr>
            <td>Authentication account</td>
            <td>gMSA required</td>
            <td>Local SYSTEM, no gMSA needed</td>
        </tr>
        <tr>
            <td>Windows auditing</td>
            <td>Manual GPO configuration</td>
            <td>Automatic configuration (preview) available</td>
        </tr>
        <tr>
            <td>RPC auditing</td>
            <td>Not available</td>
            <td>Available via asset rule tag</td>
        </tr>
        <tr>
            <td>Sensor updates</td>
            <td>Manual or delayed update ring</td>
            <td>Automatically via Windows Updates, no manual packages</td>
        </tr>
        <tr>
            <td>Delayed update ring</td>
            <td>Supported</td>
            <td>Not available (v2.x only)</td>
        </tr>
        <tr>
            <td>OS requirement</td>
            <td>Windows Server 2008 R2 and later</td>
            <td>Windows Server 2019 and later</td>
        </tr>
        <tr>
            <td>Npcap / WinPcap</td>
            <td>Required</td>
            <td>Not required</td>
        </tr>
    </tbody>
  </table>
</div>
<p>Beyond deployment simplicity, v3.x also brings detection improvements: it uses the <strong>Windows Filtering Platform (WFP)</strong> for deeper network inspection, adds <strong>enhanced RPC auditing</strong> for advanced identity attack detections, and caps resource usage at 30% CPU and 1.5 GB memory.</p>

<h2 class="relative group">Prerequisites
    <div id="prerequisites" class="anchor"></div>
    
</h2>
<p>Before diving into the requirements, a quick note on scope. The v3.x sensor applies to <strong>domain controllers running Windows Server 2019 or later</strong>. Two scenarios still require the v2.x classic sensor:</p>
<ul>
<li>Domain controllers running <strong>Windows Server 2016 or earlier</strong></li>
<li>Standalone servers running AD FS, AD CS, or Microsoft Entra Connect <strong>without a DC role</strong>: v3.x will never apply here since the sensor only runs on domain controllers</li>
</ul>
<p>DCs that <strong>also</strong> run AD FS, AD CS, or Entra Connect alongside the DC role are supported by v3.x as of March 2026, but the migration wizard does not support them yet. Those require a fresh deployment. See <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/#supported-server-roles" >Supported server roles</a> and the following decision tree:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Decision tree for activating sensor v3 or deploying sensor v2 per Active Directory server"
    width="960"
    height="720"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-36_hu_8cbc5dea166491c1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-36.webp"><figcaption>Source: Microsoft</figcaption></figure>
<h3 class="relative group">Licensing and permissions
    <div id="licensing-and-permissions" class="anchor"></div>
    
</h3>
<p>One of the following licenses is required:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>License</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Enterprise Mobility + Security E5 (EMS E5/A5)</td>
        </tr>
        <tr>
            <td>Microsoft 365 E5 (E5/A5/G5)</td>
        </tr>
        <tr>
            <td>Microsoft 365 E5/A5/G5/F5 Security</td>
        </tr>
        <tr>
            <td>Microsoft 365 F5 Security + Compliance</td>
        </tr>
    </tbody>
  </table>
</div>
<p>To deploy, you need one of the following:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Role</th>
              <th>Detail</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Security Administrator</td>
            <td>Microsoft Entra ID built-in role</td>
        </tr>
        <tr>
            <td>Unified RBAC (alternative)</td>
            <td><code>System settings (Read and manage)</code> + <code>Security settings (All permissions)</code></td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Server requirements
    <div id="server-requirements" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Requirement</th>
              <th>Detail</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Operating system</td>
            <td>Windows Server 2019 or later</td>
        </tr>
        <tr>
            <td>Cumulative update</td>
            <td><strong>March 2026</strong> or later (KB5078766 for Windows Server 2022; KB varies by OS version)</td>
        </tr>
        <tr>
            <td>MDE deployment</td>
            <td>Microsoft Defender for Endpoint deployed and running (SENSE service active)</td>
        </tr>
        <tr>
            <td>Microsoft Defender Antivirus</td>
            <td>Active or passive mode both supported</td>
        </tr>
        <tr>
            <td>Power plan</td>
            <td>Set to <strong>High Performance</strong> on each DC</td>
        </tr>
        <tr>
            <td>Time sync</td>
            <td>Within 5 minutes across all DCs</td>
        </tr>
        <tr>
            <td>Memory (Hyper-V)</td>
            <td>Disable “Enable Dynamic Memory” on the VM</td>
        </tr>
        <tr>
            <td>Memory (VMware)</td>
            <td>Set reserved memory equal to configured memory, or enable “Reserve all guest memory (All locked)”</td>
        </tr>
    </tbody>
  </table>
</div>
<blockquote><p>The March 2026 cumulative update is a hard dependency. Without it, activation or migration will fail. Apply it to all domain controllers before proceeding. The KB number varies by OS version: KB5078766 is for Windows Server 2022.</p>
</blockquote><p>If you are doing a <strong>fresh deployment</strong>, the target DC must not already have a v2.x sensor installed. If you are <strong>migrating</strong>, the v2.x sensor must be installed and running. Those prerequisites are listed separately in the <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/#migration-from-v2-x-to-v3-x" >Migration from v2.x to v3.x</a> section.</p>

<h3 class="relative group">Supported server roles
    <div id="supported-server-roles" class="anchor"></div>
    
</h3>
<p>As of April 2026:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Role</th>
              <th>Support status</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Domain controller only</td>
            <td>Fully supported, activation and migration wizard</td>
        </tr>
        <tr>
            <td>Domain controller + Entra Connect</td>
            <td>Rolling out: fresh deployment only, requires Windows Server 2019+, March 2026 CU</td>
        </tr>
        <tr>
            <td>Domain controller + AD FS</td>
            <td>Rolling out: fresh deployment only, requires Windows Server 2019+, March 2026 CU</td>
        </tr>
        <tr>
            <td>Domain controller + AD CS</td>
            <td>Rolling out: fresh deployment only, requires Windows Server 2019+, March 2026 CU</td>
        </tr>
        <tr>
            <td>Standalone AD FS / AD CS / Entra Connect (no DC role)</td>
            <td>Use v2.x sensor: v3.x does not apply</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Validating prerequisites
    <div id="validating-prerequisites" class="anchor"></div>
    
</h3>
<p>Microsoft provides two useful PowerShell scripts from the <code>DefenderForIdentity</code> module. Both are optional but recommended before a large rollout. Both can be found in the portal from: <strong>Identities &gt; Tools</strong>:</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender for Identity tools page with the readiness script and the PowerShell module"
    width="1918"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-42_hu_464232a566e290cf.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-42.webp"></figure><p><strong>Test-MDIReadiness</strong> checks sensor prerequisites: connectivity, permissions, MDE deployment, and overall sensor readiness:</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">Install-Module</span> <span class="n">-Name</span> <span class="n">DefenderForIdentity</span>
</span></span><span class="line"><span class="cl"><span class="nb">Test-MDIReadiness</span></span></span></code></pre></div></div>
<p><strong>New-MDIConfigurationReport</strong> generates an HTML report of your current Windows event auditing configuration, showing exactly which audit policies and SACL settings are missing or misconfigured:</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">New-MDIConfigurationReport</span> <span class="n">-Path</span> <span class="s2">&#34;C:\Reports&#34;</span> <span class="n">-Mode</span> <span class="n">Domain</span> <span class="n">-OpenHtmlReport</span></span></span></code></pre></div></div>
<p><strong>Test-MDIReadiness</strong> is also available directly in the Defender portal at <strong>Identities &gt; Tools (Preview)</strong>, no download required. <strong>New-MDIConfigurationReport</strong> requires the PowerShell module installed locally.</p>

<h2 class="relative group">Deploying the sensor
    <div id="deploying-the-sensor" class="anchor"></div>
    
</h2>

<h3 class="relative group">Activating the sensor
    <div id="activating-the-sensor" class="anchor"></div>
    
</h3>
<p>Microsoft recommends activating the sensor on <strong>all domain controllers, including read-only domain controllers (RODCs)</strong>. For complete coverage, make sure every DC, including RODCs, has MDE deployed and the March 2026 cumulative update installed before proceeding.</p>
<p>Navigate to the <a href="https://security.microsoft.com/"  target="_blank" rel="noreferrer">Microsoft Defender portal</a> and go to <strong>System &gt; Settings &gt; Identities &gt; Activation</strong>.</p>
<p>The portal auto-discovers your domain controllers from the <strong>Device Inventory</strong> (populated by MDE onboarding). Each server is listed with its current activation state:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Activation state</th>
              <th>What it means</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Activate new sensor</td>
            <td>DC is MDE-onboarded and eligible for v3.x activation</td>
        </tr>
        <tr>
            <td>Install classic sensor</td>
            <td>DC doesn’t meet v3.x requirements. Use the classic installer from the Sensors page</td>
        </tr>
        <tr>
            <td>OS upgrade is required</td>
            <td>DC runs an unsupported OS version</td>
        </tr>
    </tbody>
  </table>
</div>
<blockquote><p>In some portal versions the label may show as “Activate sensor v3.x” instead of “Activate new sensor”: both mean the same thing.</p>
</blockquote><p>When you first land on this page with no sensors deployed, you may see a <strong>“Simplify Your Installation Process”</strong> dialog. Click <strong>Activate servers</strong> to proceed with the new activation-based flow, no installer download needed.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Simplify your installation process dialog with the option to activate servers"
    width="1919"
    height="1000"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-17_hu_18bbd5da94a7aa8a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-17.webp"></figure><p>You’ll also see two activation modes:</p>
<ul>
<li><strong>Automatically activate eligible servers</strong>: MDI activates sensors as soon as eligible DCs are discovered. Good for consistent environments.</li>
<li><strong>Manually select servers to activate</strong>: You control which DCs get activated. Recommended for phased rollouts and MSSP/MSP multi-tenant management.</li>
</ul>
<p>To activate:</p>
<ol>
<li>Select one or more domain controllers from the list.</li>
<li>Click <strong>Activate</strong> in the toolbar.</li>
<li>In the <strong>“Activate New Sensor”</strong> confirmation dialog, verify the selected servers and click <strong>Activate</strong>.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Selecting domain controllers to activate the Defender for Identity sensor v3"
    width="1919"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-19_hu_174040612debfc0f.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-19.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Activate new sensor confirmation dialog"
    width="1919"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-20_hu_8841a164374314d7.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-20.webp"></figure><p>No installer download, no remote execution, no reboot required. When activation completes, a green success banner appears, click <strong>Click here to see the onboarded servers</strong> to go directly to the Sensors page.</p>

<h3 class="relative group">Verifying sensor status
    <div id="verifying-sensor-status" class="anchor"></div>
    
</h3>
<p>Navigate to <strong>Settings &gt; Identities &gt; On-premises &gt; Sensors</strong></p>
<p>After activation, sensors will initially appear with the following status. This is expected:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Column</th>
              <th>Initial value</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Service status</td>
            <td>Onboarding</td>
        </tr>
        <tr>
            <td>Sensor status</td>
            <td>Outdated</td>
        </tr>
        <tr>
            <td>Version</td>
            <td>3.0.0</td>
        </tr>
    </tbody>
  </table>
</div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="New v3 sensors showing as onboarding and outdated right after activation"
    width="1919"
    height="985"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-21_hu_429307434e7b6cd4.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-21.webp"></figure><p>Wait 15–30 minutes and refresh. A healthy sensor will show:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Column</th>
              <th>Expected value</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Service status</td>
            <td>Running</td>
        </tr>
        <tr>
            <td>Sensor status</td>
            <td>Up to date</td>
        </tr>
        <tr>
            <td>Version</td>
            <td>3.0.7.419 or later</td>
        </tr>
    </tbody>
  </table>
</div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Healthy v3 sensors showing as running and up to date"
    width="1918"
    height="987"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-22_hu_926dce4c05376d64.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-22.webp"></figure><blockquote><p>The first activation on a tenant can take up to 1 hour to show as Running. Subsequent activations typically reflect within 5 minutes. No restart is required.</p>
</blockquote>
<h3 class="relative group">Configuring RPC auditing
    <div id="configuring-rpc-auditing" class="anchor"></div>
    
</h3>
<p>RPC (Remote Procedure Call) is a core Windows protocol heavily used in Active Directory for authentication, replication, and directory access. Attackers abuse it for lateral movement and privilege escalation. The v3.x sensor supports <strong>enhanced RPC auditing</strong> for advanced identity attack detections, but this must be explicitly enabled by applying the <strong>Unified Sensor RPC Audit</strong> tag via an asset rule.</p>
<p>Navigate to <strong>Settings &gt; Microsoft Defender XDR &gt; Asset rule management</strong> and click <strong>Create a new rule</strong></p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Create a new rule in asset rule management"
    width="1917"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-24_hu_269aded5d5d60841.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-24.webp"></figure><p>In the wizard:</p>
<ol>
<li>On <strong>Name and description</strong>, enter <code>Unified Sensor RPC Audit</code> as the rule name, add a description, and click <strong>Next</strong>.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Name and description step"
    width="1919"
    height="997"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-33_hu_49e38fe767c6b743.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-33.webp"></figure><ol start="2">
<li>
<p>On <strong>Rule conditions</strong>, define which devices the rule targets. Use <strong>Device name</strong> with <strong>Starts with</strong> conditions to match your DC naming convention. Use <strong>OR</strong> logic to cover multiple DCs. You can also filter by <strong>Domain</strong> or <strong>Device tag</strong>. Click <strong>Next</strong>.</p>
<p>Only target devices that already have the MDI v3.x sensor installed and running. The tag has no effect on devices without the v3.x sensor.</p>
</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Rule conditions step"
    width="1919"
    height="997"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-29_hu_745f99b471044fac.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-29.webp"></figure><ol start="3">
<li>On <strong>Select actions</strong>, expand <strong>Apply a tag</strong> and select or type <code>Unified Sensor RPC Audit</code>. Click <strong>Next</strong>.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Select actions step"
    width="1919"
    height="995"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-30_hu_27ff160ee5ce46d2.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-30.webp"></figure><ol start="4">
<li>On <strong>Review and finish</strong>, verify the rule name, tag, and number of affected devices. Click <strong>Submit</strong>.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Review and finish step"
    width="1919"
    height="998"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-31_hu_5ae5210d5d7fb439.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-31.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="New asset rule created for the Unified Sensor RPC Audit tag"
    width="1919"
    height="998"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-32_hu_32f5f68b2a1ad7ac.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-32.webp"></figure><blockquote><p>The rule can take <strong>up to 1 hour</strong> to take effect. To remove RPC auditing from a device later, delete the rule or update the conditions to exclude it.</p>
</blockquote>
<h3 class="relative group">Enabling automatic Windows auditing
    <div id="enabling-automatic-windows-auditing" class="anchor"></div>
    
</h3>
<p>Windows event log collection is the foundation of MDI’s detection engine. The sensor relies on events such as 4662 (object access), 4776 (NTLM authentication), and 4688 (process creation) to detect suspicious activity.</p>
<p>In the v2.x era, this required manually configuring Group Policy Objects, SACL entries on the domain root, and NTLM auditing registry values. With v3.x there’s a preview feature that handles all of this automatically.</p>
<p>Navigate to <strong>Settings &gt; Identities &gt; General &gt; Advanced features</strong></p>
<p>The <strong>Automatic Windows auditing configuration (preview)</strong> toggle is set to <strong>Off</strong> by default. Toggle it to <strong>On</strong> and click <strong>Save preferences</strong>.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Automatic Windows auditing configuration turned off in the Defender for Identity advanced features"
    width="1919"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-34_hu_d08989f3065ddb3b.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-34.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Automatic Windows auditing configuration turned on in the Defender for Identity advanced features"
    width="1919"
    height="998"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-35_hu_95554b4229f167f1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-35.webp"></figure><p>What this configures automatically on each eligible DC:</p>
<ul>
<li>Directory Services advanced auditing (SACL on the domain root object)</li>
<li>NTLM auditing via Windows Registry</li>
<li>Domain object auditing (SACL on the Configuration partition)</li>
<li>AD FS auditing (SACL on the AD FS configuration container)</li>
<li>Windows audit policy subcategories via Local Security Authority (LSA) APIs</li>
</ul>
<p>The check runs <strong>once every 24 hours</strong>, so it will self-correct any auditing drift over time, not just at initial deployment.</p>
<blockquote><p><strong>GPO conflict warning:</strong> GPO settings applied to domain controllers can conflict with local settings applied by the sensor. If you have existing GPOs enforcing audit policies, check for conflicts after enabling this feature. The health alerts in <strong>Settings &gt; Identities &gt; Health issues</strong> will surface any configuration gaps that couldn’t be auto-corrected.</p>
</blockquote><blockquote><p>This feature only applies to domain controllers with the v3.x sensor installed and updated to the latest cumulative update. Manual GPO-based configuration still works if you prefer. See the <a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/configure-windows-event-collection"  target="_blank" rel="noreferrer">Microsoft Learn documentation</a>.</p>
</blockquote>
<h2 class="relative group">Migration from v2.x to v3.x
    <div id="migration-from-v2-x-to-v3-x" class="anchor"></div>
    
</h2>
<p>If you have existing MDI v2.x sensors, this section walks through the migration. The migration itself is portal-driven and non-disruptive: the v2.x sensor keeps running until the v3.x sensor is fully ready. After migration completes, there are a few configuration steps to apply, including switching away from gMSA.</p>

<h3 class="relative group">Migration prerequisites
    <div id="migration-prerequisites" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Requirement</th>
              <th>Detail</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Current sensor</td>
            <td>MDI v2.x installed and running</td>
        </tr>
        <tr>
            <td>Operating system</td>
            <td>Windows Server 2019 or later</td>
        </tr>
        <tr>
            <td>Cumulative update</td>
            <td>March 2026 or later (KB5078766 for Windows Server 2022; KB varies by OS version)</td>
        </tr>
        <tr>
            <td>MDE</td>
            <td>Microsoft Defender for Endpoint deployed and active</td>
        </tr>
        <tr>
            <td>DC role</td>
            <td>Domain controller only: no additional identity roles (AD FS, AD CS, Entra Connect)</td>
        </tr>
    </tbody>
  </table>
</div>
<blockquote><p><strong>Important:</strong> The migration wizard does not support domain controllers that also run AD FS, AD CS, or Entra Connect roles, even though v3.x itself now supports these DCs via fresh deployment. If your DC carries one of these additional roles, uninstall the v2.x sensor manually and then activate v3.x from the Activation page instead of using the Migrate button.</p>
</blockquote><blockquote><p><strong>Common issue:</strong> If a DC doesn’t appear as “Ready for migration”, check the MDE/SENSE service version first. An outdated MDE sensor can block the migration. Update MDE to the latest version and try again.</p>
</blockquote>
<h3 class="relative group">Running the migration
    <div id="running-the-migration" class="anchor"></div>
    
</h3>
<p>Navigate to <strong>Settings &gt; Identities &gt; On-premises &gt; Sensors</strong>. Eligible servers show <strong>Ready for migration</strong> in the Migration state column.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Domain controllers marked ready for migration in the sensors list"
    width="1919"
    height="987"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-37_hu_f55a354c6657a090.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-37.webp"></figure><ol>
<li>Select the DCs you want to migrate. You can select all at once or work in batches.</li>
<li>Click <strong>Migrate</strong> in the toolbar.</li>
<li>In the confirmation dialog, verify the server names and click <strong>Migrate</strong>.</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Migrate action for the selected domain controllers"
    width="1919"
    height="987"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-38_hu_61bcdb11af46c310.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-38.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="MDI Defender for Identity"
    width="1919"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-39_hu_6e7d9c0eb126ce7e.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-39.webp"></figure><p>Migration takes up to 20 minutes per batch. During this time:</p>
<ul>
<li>The v2.x sensor continues running and sending telemetry, no detection gap</li>
<li>The v3.x sensor is installed and initialized in the background</li>
<li>Switchover happens automatically once v3.x is ready</li>
<li>No reboot is required</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Domain controllers in the migrating state during the sensor v3 migration"
    width="1919"
    height="987"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-40_hu_7fa13b58d670f283.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-40.webp"></figure><p>The Migration state column will progress: <strong>Ready for migration</strong> → <strong>Migrating</strong> → <strong>Already V3 sensor</strong>.</p>
<p>Once complete, confirm the sensors show Service status <strong>Running</strong>, Sensor status <strong>Up to date</strong>, and version <strong>3.0.7.419</strong> or later.</p>

<h3 class="relative group">Post-migration configuration
    <div id="post-migration-configuration" class="anchor"></div>
    
</h3>
<p>After migration completes, apply the following configuration steps:</p>
<p><strong>Remove gMSA</strong></p>
<p>The v3.x sensor uses the <strong>Local SYSTEM</strong> account for all Active Directory queries and response actions. There is no longer a need for a Group Managed Service Account.</p>
<blockquote><p><strong>Critical:</strong> If gMSA remains enabled after migration, response actions will stop working. This includes disabling compromised accounts, resetting passwords, and forcing password expiration, both automated and manual.</p>
</blockquote><p>Navigate to <strong>Settings &gt; Identities &gt; General &gt; Manage action accounts</strong>, select <strong>Automatically use the sensor’s local system account</strong>, and click <strong>Save</strong>.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Action accounts set to automatically use the sensor&rsquo;s local system account"
    width="1919"
    height="999"
    src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-41_hu_a0bbb8d98c06f39a.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/image-41.webp"></figure><p>If you’re running a phased migration with some DCs still on v2.x, switch all sensors to local system accounts now. Mixing gMSA and local system in the same environment causes inconsistencies in response actions.</p>
<p><strong>Configure RPC auditing</strong></p>
<p>If the Unified Sensor RPC Audit asset rule doesn’t exist yet, create it following the steps in the <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/#configuring-rpc-auditing" >Configuring RPC auditing</a> section above. If the rule already exists, update the conditions to include the newly migrated DCs.</p>
<p><strong>Enable automatic Windows auditing</strong></p>
<p>Navigate to <strong>Settings &gt; Identities &gt; General &gt; Advanced features</strong> and enable the <strong>Automatic Windows auditing configuration (preview)</strong> toggle if <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/#enabling-automatic-windows-auditing" >not already active</a>. Existing auditing settings from the v2.x sensor are preserved during migration, but enabling automatic auditing will validate and correct any gaps.</p>

<h3 class="relative group">Cleaning up the v2.x sensor
    <div id="cleaning-up-the-v2-x-sensor" class="anchor"></div>
    
</h3>
<p>After confirming the v3.x sensor is healthy, remove the legacy components from each DC.</p>
<p><strong>Uninstall the v2.x sensor:</strong> Go to <strong>Settings &gt; Apps</strong> (or <strong>Add/Remove Programs</strong>) and uninstall <strong>“Azure Advanced Threat Protection Sensor”</strong>.</p>
<blockquote><p>This may require a <strong>server reboot</strong>. Plan it during a maintenance window. After uninstalling, the sensor entry is automatically removed from the portal. If it persists, delete it manually from <strong>Settings &gt; Identities &gt; Sensors</strong>.</p>
</blockquote><p><strong>Remove Npcap:</strong> The v2.x sensor installed Npcap for network packet capture. The v3.x sensor does not use it. Unless another application on the DC requires Npcap, uninstall it via <strong>Add/Remove Programs</strong>.</p>

<h2 class="relative group">Health alerts
    <div id="health-alerts" class="anchor"></div>
    
</h2>
<p>After deployment, keep an eye on <strong>Settings &gt; Identities &gt; Health issues</strong> for these two alerts:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Alert</th>
              <th>Cause</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Sensor v3.x RPC audit misconfigured</td>
            <td>The Unified Sensor RPC Audit asset rule is missing or not matching the DC</td>
        </tr>
        <tr>
            <td>Windows event auditing gaps</td>
            <td>Automatic auditing found issues it could not auto-correct, typically a conflicting GPO</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Frequently asked questions
    <div id="frequently-asked-questions" class="anchor"></div>
    
</h2>
<p><strong>Do I need to uninstall v2.x before activating v3.x?</strong><br>
For fresh deployments on a clean DC, yes: a DC cannot have both sensors simultaneously. For migrations, the portal wizard manages the transition automatically without a manual uninstall first.</p>
<p><strong>What are the known limitations in v3.x?</strong><br>
Known limitations of v3.x are: no VPN integration, no syslog notifications, and limited Azure ExpressRoute compatibility.</p>
<p><strong>Will I lose detection coverage during migration?</strong><br>
No. The v2.x sensor continues running and reporting until the v3.x sensor is fully initialized. There is no detection gap.</p>
<p><strong>My DC runs Windows Server 2016: can I use v3.x?</strong>
No. v3.x requires Windows Server 2019 or later with the March 2026 cumulative update. Either upgrade the OS or continue with the v2.x sensor.</p>
<p><strong>Is the March 2026 cumulative update a hard requirement?</strong><br>
Yes. Without it, activation or migration will fail. Apply it before starting.</p>
<p><strong>Can I still configure Windows auditing manually?</strong><br>
Yes. Automatic auditing is a preview feature and optional. Manual GPO-based configuration continues to work with v3.x.</p>
<p><strong>What about AD FS or AD CS servers?</strong><br>
For standalone servers not running a DC role, continue with v2.x: v3.x does not apply there. For DCs that also run AD FS, AD CS, or Entra Connect roles, v3.x support is rolling out as of March 2026. Note that the migration wizard does not support these DCs. They require a fresh v3.x deployment: uninstall v2.x manually, then activate v3.x from the Activation page.</p>
<p><strong>The RPC audit rule is applied, how do I verify it’s working?</strong>
Check <strong>Settings &gt; Identities &gt; Health issues</strong>. If the tag is correctly applied and the sensor is running, the “Sensor v3.x RPC audit misconfigured” alert will not appear. Allow up to 1 hour after rule creation.</p>

<h2 class="relative group">References
    <div id="references" class="anchor"></div>
    
</h2>
<p><a href="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/" >Install Microsoft Defender for Identity (classic v2.x guide), modernsecurity.nl</a></p>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/prerequisites-sensor-version-3"  target="_blank" rel="noreferrer">Defender for Identity sensor v3.x prerequisites: Microsoft Learn</a></p>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/activate-sensor"  target="_blank" rel="noreferrer">Activate the Defender for Identity sensor v3.x: Microsoft Learn</a></p>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/migrate-to-sensor-v3"  target="_blank" rel="noreferrer">Migrate from sensor v2.x to sensor v3.x: Microsoft Learn</a></p>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/configure-windows-event-collection"  target="_blank" rel="noreferrer">Configure Windows event collection: Microsoft Learn</a></p>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/whats-new"  target="_blank" rel="noreferrer">What’s new in Microsoft Defender for Identity: Microsoft Learn</a></p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>The Microsoft Defender for Identity sensor v3.x is a major improvement in how identity security is deployed and operated. By building on MDE infrastructure already present on your domain controllers, Microsoft has removed most of the friction that made MDI deployments time-consuming. No more installer packages, no gMSA accounts to manage, no manual audit GPOs, no Npcap to maintain.</p>
<p>For MSSP and enterprise teams managing MDI across multiple tenants, this simplification is significant. Activation is portal-based and takes minutes. Post-deployment configuration, RPC audit tagging and automatic Windows auditing, runs without touching Group Policy.</p>
<p>If you’re still running v2.x, the migration path is now stable and production-ready. Check the March 2026 cumulative update, confirm MDE is deployed and healthy on your DCs, and use the built-in migration wizard. Once migration completes, switch from gMSA to local system and apply the RPC audit tag. The v2.x sensor stays running until v3.x is ready, no maintenance window needed.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/featured_hu_9cb310abc6e98c19.jpg" medium="image" type="image/jpeg" width="1200" height="884"/><enclosure url="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/featured_hu_9cb310abc6e98c19.jpg" type="image/jpeg" length="64146"/></item><item><title>Using Honeytoken Accounts in Microsoft Defender for Identity (MDI) for proactive threat detection</title><link>https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/</link><guid isPermaLink="true">https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/</guid><pubDate>Tue, 01 Oct 2024 12:36:40 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Microsoft Defender for Identity</category><category>Microsoft Defender XDR</category><category>Microsoft Entra ID (Azure AD)</category><description>Discover how to effectively deploy, configure, and monitor honeytoken accounts in Microsoft Defender for Identity (MDI) to detect identity threats</description><content:encoded><![CDATA[
<h2 class="relative group">Introduction to Honeytoken Accounts in Microsoft Defender for Identity (MDI)
    <div id="introduction-to-honeytoken-accounts-in-microsoft-defender-for-identity-mdi" class="anchor"></div>
    
</h2>
<p><em>Microsoft Defender for Identity</em> provides organizations with an effective way to detect and deter identity-based attacks through the use of <strong>honeytoken accounts</strong>. Honeytokens are decoy accounts, configured to look valuable to attackers, which trigger alerts whenever they’re accessed without authorization. This proactive defense strategy helps organizations identify potential breaches early, enabling rapid response to suspicious activity.</p>
<p>By leveraging these accounts in security teams can monitor lateral movement attempts, credential harvesting, and other suspicious behavior within their Active Directory environments. Honeytoken accounts are essential to a layered defense approach, offering high-value insights into potential attack paths and improving an organization’s overall security posture.</p>

<h2 class="relative group">Benefits of Honeytoken Accounts in MDI
    <div id="benefits-of-honeytoken-accounts-in-mdi" class="anchor"></div>
    
</h2>
<p>Implementing honeytoken accounts offers several security advantages:</p>
<ul>
<li><strong>Early detection of unauthorized access</strong>: Honeytokens are designed to alert security teams at the first sign of an attack, allowing for a quick and effective response.</li>
<li><strong>Enhanced threat visibility</strong>: Honeytoken alerts provide insights into attacker tactics, such as lateral movement and privilege escalation, enabling better threat analysis.</li>
<li><strong>Reduced false positives</strong>: Since honeytokens are unused by legitimate users, alerts associated with these accounts are high-fidelity, reducing false positives and enabling faster action.</li>
</ul>
<p>These benefits make it a valuable component in securing identity-based assets</p>

<h2 class="relative group">Prerequisites and licensing
    <div id="prerequisites-and-licensing" class="anchor"></div>
    
</h2>
<p>To deploy this solution with Microsoft Defender for Identity, ensure your organization meets the prerequisites and licensing requirements:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Requirement</th>
              <th>Licensing requirement</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Microsoft Defender for Identity</td>
            <td>Microsoft 365 E5 or E5 Security</td>
        </tr>
        <tr>
            <td>Microsoft Sentinel Integration</td>
            <td>Azure Subscription</td>
        </tr>
        <tr>
            <td>Active Directory Environment</td>
            <td>Required for honeytoken account setup</td>
        </tr>
    </tbody>
  </table>
</div>
<p><strong>Supported requirements for the deployment</strong>:</p>
<ul>
<li><strong>Microsoft 365 E5 or E5 Security License</strong>: Required for access to MDI’s functionality</li>
<li><strong>Active Directory or Hybrid Identity setup</strong>: Configuring tokens requires AD or hybrid identity support</li>
<li><strong>Microsoft Sentinel Integration</strong>: Optional but recommended to centralize alert monitoring</li>
</ul>
<p>Meeting these prerequisites ensures that honeytokens are fully supported and effectively monitored</p>

<h2 class="relative group">Strategic placement and naming of accounts
    <div id="strategic-placement-and-naming-of-accounts" class="anchor"></div>
    
</h2>
<p>The solution works best when strategically configured:</p>
<ul>
<li><strong>Repurpose inactive accounts</strong>: Use existing, unused (stale) accounts to enhance realism by giving the accounts a history within AD</li>
<li><strong>Enticing names</strong>: Assign names that look valuable to attackers, such as “Temp Admin” or “Back Office”</li>
<li><strong>Group placement for visibility</strong>: Add honeytokens to (fake) sensitive groups like “Remote Desktop Users” to increase their visibility to attackers</li>
<li><strong>Assign Service Principal Names (SPNs)</strong>: Assign SPNs to honeytokens, making them targets for Kerberos-based attacks, such as Pass-the-Ticket</li>
<li><strong>Plant credentials on shared resources</strong>: Place honeytoken credentials in realistic-looking files on file shares or SharePoint to attract attackers during internal reconnaissance and trigger early alerts.</li>
</ul>
<p>Properly configuration is essential to successfully attracting and detecting malicious access attempts.</p>

<h2 class="relative group">Creating accounts for Microsoft Defender for Identity
    <div id="creating-accounts-for-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>

<h3 class="relative group">Scenario 1: Service Account with SPN (on-premises AD, non-synced)
    <div id="scenario-1-service-account-with-spn-on-premises-ad-non-synced" class="anchor"></div>
    
</h3>
<p>This scenario creates a fake service account with a realistic SPN, simulating a common target for attackers attempting Kerberoasting or LDAP reconnaissance.</p>
<p><strong>Step 1: Create the AD account</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="nb">New-ADUser</span> <span class="p">`</span>  <span class="n">-Name</span> <span class="s2">&#34;svc_backup&#34;</span> <span class="p">`</span>  <span class="n">-SamAccountName</span> <span class="s2">&#34;svc_backup&#34;</span> <span class="p">`</span>  <span class="n">-UserPrincipalName</span> <span class="s2">&#34;svc_backup@contoso.local&#34;</span> <span class="p">`</span>  <span class="n">-AccountPassword</span> <span class="p">(</span><span class="nb">ConvertTo-SecureString</span> <span class="s2">&#34;VeryStrongPassword!123&#34;</span> <span class="n">-AsPlainText</span> <span class="n">-Force</span><span class="p">)</span> <span class="p">`</span>  <span class="n">-Enabled</span> <span class="vm">$true</span> <span class="p">`</span>  <span class="n">-PasswordNeverExpires</span> <span class="vm">$true</span> <span class="p">`</span>  <span class="n">-CannotChangePassword</span> <span class="vm">$true</span> <span class="p">`</span>  <span class="n">-Path</span> <span class="s2">&#34;OU=NotSynced,DC=contoso,DC=local&#34;</span></span></span></code></pre></div></div>
<p><strong>Step 2: Restrict the account</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="nb">Set-ADUser</span> <span class="n">-Identity</span> <span class="s2">&#34;svc_backup&#34;</span> <span class="n">-LogonWorkstations</span> <span class="s2">&#34;&#34;</span></span></span></code></pre></div></div>
<p><strong>Step 3: Assign fake SPNs</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">setspn -S MSSQL/fake-database01.contoso.local contoso\svc_backupsetspn -S HTTP/fake-webapp.contoso.local contoso\svc_backup</span></span></code></pre></div></div>
<p><strong>Step 4: Add to permissive-looking groups</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="nv">$groups</span> <span class="p">=</span> <span class="vm">@</span><span class="p">(</span><span class="s2">&#34;Remote Desktop Users&#34;</span><span class="p">,</span> <span class="s2">&#34;Backup Operators&#34;</span><span class="p">)</span><span class="nv">$user</span> <span class="p">=</span> <span class="s2">&#34;svc_backup&#34;</span><span class="k">foreach</span> <span class="p">(</span><span class="nv">$group</span> <span class="k">in</span> <span class="nv">$groups</span><span class="p">)</span> <span class="p">{</span>    <span class="k">if</span> <span class="p">(</span><span class="o">-not</span> <span class="p">(</span><span class="nb">Get-ADGroupMember</span> <span class="n">-Identity</span> <span class="nv">$group</span> <span class="n">-Recursive</span> <span class="p">|</span> <span class="nb">Where-Object</span> <span class="p">{</span> <span class="nv">$_</span><span class="p">.</span><span class="py">SamAccountName</span> <span class="o">-eq</span> <span class="nv">$user</span> <span class="p">}))</span> <span class="p">{</span>        <span class="nb">Add-ADGroupMember</span> <span class="n">-Identity</span> <span class="nv">$group</span> <span class="n">-Members</span> <span class="nv">$user</span>    <span class="p">}}</span></span></span></code></pre></div></div>

<h3 class="relative group">Scenario 2: Legacy or stale-looking acccount (on-premises AD, non-synced)
    <div id="scenario-2-legacy-or-stale-looking-acccount-on-premises-ad-non-synced" class="anchor"></div>
    
</h3>
<p>This scenario leverages an old or unused account, renamed to appear legitimate, and left visible in AD to catch unauthorized access or enumeration.</p>
<p><strong>Step 1: Identify an unused or stale account</strong></p>
<p>You can locate unused accounts with PowerShell:</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">Search-ADAccount -AccountInactive -UsersOnly -TimeSpan 180.00:00:00</span></span></code></pre></div></div>
<p><strong>Step 2: Rename the account</strong></p>
<p>Choose a generic name that reflects legacy usage:</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">Rename-ADObject</span> <span class="n">-Identity</span> <span class="s2">&#34;CN=John.Doe,CN=Users,DC=contoso,DC=local&#34;</span> <span class="n">-NewName</span> <span class="s2">&#34;Back Office&#34;</span><span class="nb">Set-ADUser</span> <span class="n">-Identity</span> <span class="s2">&#34;BackOffice&#34;</span> <span class="n">-SamAccountName</span> <span class="s2">&#34;Back Office&#34;</span> <span class="n">-UserPrincipalName</span> <span class="s2">&#34;BackOffice@contoso.local&#34;</span></span></span></code></pre></div></div>
<p>Or create a new one, depending on your environment:</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">New-ADUser</span>   <span class="n">-Name</span> <span class="s2">&#34;Temp Admin&#34;</span>   <span class="n">-SamAccountName</span> <span class="s2">&#34;TempAdmin&#34;</span>   <span class="n">-UserPrincipalName</span> <span class="s2">&#34;TempAdmin@contoso.local&#34;</span>   <span class="n">-AccountPassword</span> <span class="p">(</span><span class="nb">ConvertTo-SecureString</span> <span class="s2">&#34;YetAnotherStrongPass#2024&#34;</span> <span class="n">-AsPlainText</span> <span class="n">-Force</span><span class="p">)</span>   <span class="n">-Enabled</span> <span class="vm">$true</span>   <span class="n">-PasswordNeverExpires</span> <span class="vm">$true</span>   <span class="n">-CannotChangePassword</span> <span class="vm">$true</span>   <span class="n">-Path</span> <span class="s2">&#34;OU=NotSynced,DC=contoso,DC=local&#34;</span></span></span></code></pre></div></div>
<p><strong>Step 3: (Optional) Add to permissive-looking groups</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="nb">Add-ADGroupMember</span> <span class="n">-Identity</span> <span class="s2">&#34;Help Desk&#34;</span> <span class="n">-Members</span> <span class="n">BackOffice</span></span></span></code></pre></div></div>

<h2 class="relative group">Setting up accounts in MDI
    <div id="setting-up-accounts-in-mdi" class="anchor"></div>
    
</h2>

<h3 class="relative group">Configuration Steps
    <div id="configuration-steps" class="anchor"></div>
    
</h3>
<p><strong>Access Defender for Identity settings</strong>:</p>
<ul>
<li>Go to <strong>Microsoft 365 Defender</strong> &gt; <strong>Identity</strong> &gt; <strong>Settings</strong></li>
<li>Use the button <strong>Tag users</strong> to tag the above created users</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Two honeytoken accounts tagged in the Defender for Identity entity tags"
    width="2000"
    height="1154"
    src="https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/image-2_hu_ee48c01fcae44ee1.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/image-2.webp"></figure>
<h2 class="relative group">Strategic placement of Honeytoken credentials
    <div id="strategic-placement-of-honeytoken-credentials" class="anchor"></div>
    
</h2>
<p>Creating and tagging honeytoken accounts is only part of an effective deception strategy. To increase the likelihood of detection, organizations should <strong>intentionally plant fake credentials</strong> in locations attackers are likely to explore: such as <strong>file shares</strong>, <strong>SharePoint</strong>, and <strong>network drives</strong>.</p>
<p>These planted credentials act as bait during internal reconnaissance and privilege escalation attempts.</p>

<h3 class="relative group">Recommended locations
    <div id="recommended-locations" class="anchor"></div>
    
</h3>
<p><strong>File servers and network shares</strong><br>
Place fake credential files on accessible shares that mimic sensitive or forgotten data repositories:</p>
<ul>
<li><code>\\fileserver\IT\old_credentials.txt</code></li>
<li><code>\\fileserver\Finance\VPN_Access.xlsx</code></li>
<li><code>\\nas01\Archive\admin_creds.docx</code></li>
</ul>
<p>Use realistic formats and filenames, such as:</p>
<div class="highlight-wrapper"><div class="highlight"><div class="ms-code-label">YAML</div><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">Username</span><span class="p">:</span><span class="w"> </span><span class="nt">svc_backup@contoso.local  Password</span><span class="p">:</span><span class="w"> </span><span class="l">P@ssw0rd1234!</span></span></span></code></pre></div></div>
<p><strong>SharePoint document libraries</strong><br>
Upload decoy files to shared SharePoint folders that appear internal or technical in nature:</p>
<ul>
<li><code>HR_Accounts_Export.xlsx</code></li>
<li><code>Support_Logins_March.docx</code></li>
<li><code>Infrastructure_Passwords_Archive.zip</code></li>
</ul>
<p>Make sure the files are readable but isolated from legitimate workflows. Limit indexing and sharing where possible to reduce noise.</p>
<p><strong>Mapped drives</strong><br>
Mapped drives often appear during lateral movement and are browsed manually or with tools. Place credentials in deep folder paths like:</p>
<ul>
<li><code>S:\Projects\Legacy\Support\credentials.txt</code></li>
<li><code>R:\InternalDocs\Infra\Old_DB_Logins.docx</code></li>
</ul>
<p>The goal is to make the data visible to intruders who gain file-level access, while ensuring it’s <strong>meaningless and unused</strong> by legitimate users.</p>

<h2 class="relative group">Configuring monitoring in MDI and Sentinel
    <div id="configuring-monitoring-in-mdi-and-sentinel" class="anchor"></div>
    
</h2>

<h3 class="relative group">Native alerting in MDI
    <div id="native-alerting-in-mdi" class="anchor"></div>
    
</h3>
<p>Once the accounts are registered in <strong>Microsoft Defender for Identity</strong>, the platform automatically generates alerts when the account is:</p>
<ul>
<li>Queried via <strong>LDAP</strong> or <strong>SAM-R</strong></li>
<li>Used for <strong>authentication</strong></li>
<li>Targeted by a <strong>Kerberos TGS request</strong> (Kerberoasting)</li>
<li><strong>Modified</strong> or <strong>added to groups</strong></li>
</ul>
<p>These alerts are built-in, preclassified by Microsoft, and do <strong>not require any custom rule creation</strong>.</p>

<h3 class="relative group">Connect MDI to Microsoft Sentinel
    <div id="connect-mdi-to-microsoft-sentinel" class="anchor"></div>
    
</h3>
<ul>
<li>Use the <strong>Microsoft Defender for Identity</strong> data connector in Sentinel</li>
<li>Alerts from MDI are ingested automatically through the <strong>Microsoft 365 Defender integration</strong></li>
</ul>

<h3 class="relative group">Sample KQL query: view all Honeytoken alerts
    <div id="sample-kql-query-view-all-honeytoken-alerts" 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">kqlKopiërenBewerkenSecurityAlert
<span class="o">|</span> <span class="k">where</span> ProductName <span class="o">==</span> <span class="s">&#34;Azure Advanced Threat Protection&#34;</span>
<span class="o">|</span> <span class="k">where</span> AlertName <span class="k">contains</span> <span class="s">&#34;Honeytoken&#34;</span>
<span class="o">|</span> <span class="k">project</span> TimeGenerated, AlertName, CompromisedEntity, Entities, AlertSeverity, Description</code></pre></div>
</div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Sentinel log query showing honeytoken alerts from Defender for Identity"
    width="2000"
    height="1154"
    src="https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/image-1_hu_e6f989c07ae49e4c.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/image-1.webp"></figure><p>This query surfaces all alerts triggered specifically by above criteria</p>

<h2 class="relative group">Tools and techniques for testing effectiveness
    <div id="tools-and-techniques-for-testing-effectiveness" class="anchor"></div>
    
</h2>

<h3 class="relative group">Event IDs for monitoring (manually monitoring)
    <div id="event-ids-for-monitoring-manually-monitoring" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Event ID</th>
              <th>Description</th>
              <th>Source</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>4624</td>
            <td>Successful account logon</td>
            <td>Security Log</td>
        </tr>
        <tr>
            <td>4768</td>
            <td>Kerberos authentication (TGT request)</td>
            <td>Security Log</td>
        </tr>
        <tr>
            <td>4776</td>
            <td>NTLM authentication attempt</td>
            <td>Security Log</td>
        </tr>
        <tr>
            <td>4648</td>
            <td>Logon attempt using explicit credentials</td>
            <td>Security Log</td>
        </tr>
        <tr>
            <td>4625</td>
            <td>Failed logon attempt</td>
            <td>Security Log</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Using Microsoft Sysinternals Tools for Testing
    <div id="using-microsoft-sysinternals-tools-for-testing" class="anchor"></div>
    
</h3>
<p><strong>Process Monitor</strong>:</p>
<ul>
<li>Filter <em>Process Monitor</em> to capture “Event Category = Logon/Logoff” and “Username = <code>TempAdmin</code>” for honeytoken activity tracking.</li>
</ul>
<p><strong>PsExec</strong>:</p>
<ul>
<li>Use <em>PsExec</em> to simulate remote access:<br>
<code>powershell PsExec.exe \\RemoteComputer -u contoso.local\TempAdmin -p &lt;password&gt; cmd</code></li>
</ul>

<h3 class="relative group">Detailed testing and simulation Guide
    <div id="detailed-testing-and-simulation-guide" class="anchor"></div>
    
</h3>
<p><strong>Atomic Red Team for credential theft simulation</strong>:</p>
<ul>
<li>Run T1555.003 (Windows Credential Dumping) from Atomic Red Team to simulate credential theft aimed at honeytoken accounts.</li>
</ul>
<p><strong>Invoke-Adversary for lateral movement simulation</strong>:</p>
<ul>
<li>Simulate lateral movement using Invoke-Adversary:<br>
<code>powershell Invoke-Adversary -Command &quot;net use \\\\TargetMachine /USER:Domain\HoneytokenAccount&quot;</code></li>
</ul>

<h2 class="relative group">Combining with Endpoint Deception (MDE)
    <div id="combining-with-endpoint-deception-mde" class="anchor"></div>
    
</h2>
<p>Earlier I’ve blogged about Microsoft Defender for <a href="https://www.modernsecurity.nl/mde-endpoint-deception/" >Endpoint (MDE) Endpoint Deception</a>, the nice thing is you could also combine MDE Deception (custom) with MDI HoneyAccounts.</p>
<p>While Microsoft Defender for Identity help detecting identity-based attacks like Kerberoasting or LDAP enumeration, many attackers continue their activity on endpoints. That’s where <strong>Microsoft Defender for Endpoint (MDE) deception</strong> comes in.</p>
<p>By enabling deception in MDE, fake credentials, files, and network shares are silently deployed on endpoints. If an attacker interacts with these lures, an alert is triggered, often before they reach critical systems.</p>
<p>To increase detection coverage place your <strong>honeytoken credentials</strong> (e.g., <code>svc_backup@contoso.local</code>) in <strong>fake <code>.txt</code> or <code>.xlsx</code> files</strong>. Combined, MDI and MDE deception provide layered, early detection across both identity and endpoint layers, all correlated automatically in Microsoft 365 Defender or Sentinel.</p>

<h2 class="relative group">Best Practices for deploying Honeytokens in MDI
    <div id="best-practices-for-deploying-honeytokens-in-mdi" class="anchor"></div>
    
</h2>
<ul>
<li><strong>Rotate Honeytoken Accounts regularly</strong>: Regularly update or replace honeytokens to prevent attackers from identifying patterns.</li>
<li><strong>Review alert thresholds</strong>: Fine-tune alert settings to avoid unnecessary notifications, ensuring that honeytoken alerts are highly actionable.</li>
<li><strong>Centralize monitoring in Sentinel</strong>: Use Microsoft Sentinel to centralize alerts and streamline incident management workflows.</li>
</ul>

<h2 class="relative group">Extra resources
    <div id="extra-resources" class="anchor"></div>
    
</h2>
<p><a href="https://techcommunity.microsoft.com/blog/microsoftthreatprotectionblog/deceptive-defense-best-practices-for-identity-based-honeytokens-in-microsoft-def/3851641"  target="_blank" rel="noreferrer">https://techcommunity.microsoft.com/blog/microsoftthreatprotectionblog/deceptive-defense-best-practices-for-identity-based-honeytokens-in-microsoft-def/3851641</a></p>
<p><a href="https://techcommunity.microsoft.com/blog/microsoftsecurityexperts/defender-experts%E2%80%99-recommendations-for-impactful-security-posture-management/4040147"  target="_blank" rel="noreferrer">https://techcommunity.microsoft.com/blog/microsoftsecurityexperts/defender-experts%E2%80%99-recommendations-for-impactful-security-posture-management/4040147</a></p>
<p><a href="https://techcommunity.microsoft.com/blog/microsoftsecurityexperts/follow-the-breadcrumbs-with-microsoft-ir--mdi-working-together-to-fight-identity/4089623"  target="_blank" rel="noreferrer">https://techcommunity.microsoft.com/blog/microsoftsecurityexperts/follow-the-breadcrumbs-with-microsoft-ir–mdi-working-together-to-fight-identity/4089623</a></p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p>Deploying honeytokens within <em>Microsoft Defender for Identity</em> strengthens identity protection, helping organizations detect and respond to identity-based threats early. By strategically configuring, monitoring, and testing honeytokens, organizations can act on high-fidelity alerts and reinforce overall identity security.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/featured_hu_f2c62b0b00527376.jpg" medium="image" type="image/jpeg" width="1200" height="800"/><enclosure url="https://www.modernsecurity.nl/honeytoken-microsoft-defender-for-identity/featured_hu_f2c62b0b00527376.jpg" type="image/jpeg" length="111101"/></item><item><title>How-to install guide for Microsoft Defender for Identity</title><link>https://www.modernsecurity.nl/install-microsoft-defender-for-identity/</link><guid isPermaLink="true">https://www.modernsecurity.nl/install-microsoft-defender-for-identity/</guid><pubDate>Mon, 02 Sep 2024 15:57:00 +0100</pubDate><dc:creator>Farid Kalaidji</dc:creator><category>Identity</category><category>Microsoft Defender for Identity</category><description>Step-by-step guide to install and configure Microsoft Defender for Identity, ensuring optimal security and performance for your environment.</description><content:encoded><![CDATA[
<h2 class="relative group">New blogpost and version Defender for Identity
    <div id="new-blogpost-and-version-defender-for-identity" class="anchor"></div>
    
</h2>
<p><strong>Refer to the new version: <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-guide-v3-x/" >Microsoft Defender for Identity guide v3.x</a></strong></p>

<h2 class="relative group">Introduction
    <div id="introduction" class="anchor"></div>
    
</h2>
<p>In today’s digital landscape, protecting your organization’s identity infrastructure is more critical than ever. Microsoft Defender for Identity is a robust cloud-based security solution designed to safeguard your on-premises Active Directory (AD) environment. By leveraging advanced analytics and real-time monitoring, it detects and responds to identity-based threats such as credential theft and lateral movement attempts. This guide will walk you through the setup, configuration, and optimization of Microsoft Defender for Identity, ensuring your AD environment is secure and resilient against modern cyber threats.</p>

<h2 class="relative group">What is Microsoft Defender for Identity?
    <div id="what-is-microsoft-defender-for-identity" class="anchor"></div>
    
</h2>
<p>Microsoft Defender for Identity is a cloud-based security solution that provides advanced protection for your on-premises Active Directory (AD) environment. It detects and analyzes identity-based attacks, such as credential theft and lateral movement attempts, and helps you respond quickly by correlating AD signals with cloud analytics.</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender for Identity architecture with on-premises sensors on domain controllers, AD FS and AD CS"
    width="1427"
    height="1497"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/architecture_hu_b56a50458aedb3d7.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/architecture.webp"></figure>
<h3 class="relative group">Key Features
    <div id="key-features" class="anchor"></div>
    
</h3>
<ul>
<li><strong>Real-time Monitoring</strong>: Detect suspicious activities, such as Pass-the-Hash, Pass-the-Ticket, and other credential theft techniques</li>
<li><strong>Behavioral Analytics</strong>: Use machine learning to understand the typical behavior of users and entities and flag anomalies</li>
<li><strong>Cloud Integration</strong>: Integrates with Microsoft 365 Defender for a unified security management experience</li>
</ul>

<h2 class="relative group">Prerequisites for Microsoft Defender for Identity Setup
    <div id="prerequisites-for-microsoft-defender-for-identity-setup" class="anchor"></div>
    
</h2>
<blockquote><p>Microsoft now offers a new sensor deployment method without installation, but for full control and compatibility, the classic sensor install remains the preferred approach.</p>
</blockquote>
<h3 class="relative group">Licensing
    <div id="licensing" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>License Type</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Enterprise Mobility + Security E5 (EMS E5/A5)</td>
            <td>Comprehensive security suite for enterprise environments</td>
        </tr>
        <tr>
            <td>Microsoft 365 E5 (Microsoft E5/A5/G5)</td>
            <td>Includes advanced security, compliance, and collaboration tools</td>
        </tr>
        <tr>
            <td>Microsoft 365 E5/A5/G5/F5 Security</td>
            <td>Focused on security and compliance features</td>
        </tr>
        <tr>
            <td>Microsoft 365 F5 Security + Compliance</td>
            <td>Requires Microsoft 365 F1/F3 or Office 365 F3 and EMS E3</td>
        </tr>
        <tr>
            <td>Standalone Defender for Identity License</td>
            <td>Specific license for Defender for Identity</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Permissions
    <div id="permissions" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Permission Type</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Security Administrator</td>
            <td>Required to create and manage the Defender for Identity workspace</td>
        </tr>
        <tr>
            <td>Directory Service Account</td>
            <td>Read access to all objects in the monitored domains</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Supported Operating Systems
    <div id="supported-operating-systems" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Operating System</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Windows Server 2012 R2</td>
            <td><em>Minimum supported version</em> – functional but lacks modern hardening</td>
        </tr>
        <tr>
            <td>Windows Server 2016</td>
            <td><em>Recommended minimum</em> – better performance and supportability</td>
        </tr>
        <tr>
            <td>Windows Server 2019</td>
            <td><em>Fully supported</em> – enhanced telemetry and sensor performance</td>
        </tr>
        <tr>
            <td>Windows Server 2025</td>
            <td><em>Latest supported version</em> – includes newest security capabilities</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Sensor Requirements
    <div id="sensor-requirements" class="anchor"></div>
    
</h3>

<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>RAM</td>
            <td>Minimum 6 GB (8 GB recommended for high-load environments)</td>
        </tr>
        <tr>
            <td>CPU</td>
            <td>Minimum 2 cores (dedicated preferred)</td>
        </tr>
        <tr>
            <td>Disk Space</td>
            <td>At least 6 GB free (10 GB recommended to account for logs and telemetry buffer)</td>
        </tr>
        <tr>
            <td>Network</td>
            <td>Outbound access to <code>*.atp.azure.com</code> over TCP/443 required</td>
        </tr>
        <tr>
            <td>.NET Framework</td>
            <td>Version 4.7 or higher must be installed</td>
        </tr>
        <tr>
            <td>Time Synchronization</td>
            <td>Clock skew must be less than 5 minutes from domain controllers</td>
        </tr>
    </tbody>
  </table>
</div>

<h3 class="relative group">Connectivity Requirements
    <div id="connectivity-requirements" class="anchor"></div>
    
</h3>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Port(s)</strong></th>
              <th><strong>Description</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td><strong>443 (TCP)</strong></td>
            <td>Outbound communication with Microsoft Defender for Identity cloud (*.sensorapi.atp.azure.com) (<a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/prerequisites?utm_source=chatgpt.com"  target="_blank" rel="noreferrer">learn.microsoft.com</a>)</td>
        </tr>
        <tr>
            <td><strong>389 (TCP/UDP)</strong></td>
            <td>LDAP communication with Domain Controllers</td>
        </tr>
        <tr>
            <td><strong>636 (TCP)</strong></td>
            <td>Secure LDAPS communication (optional, if enabled)</td>
        </tr>
        <tr>
            <td><strong>3268 (TCP)</strong></td>
            <td>LDAP to Global Catalog (unencrypted)</td>
        </tr>
        <tr>
            <td><strong>3269 (TCP)</strong></td>
            <td>LDAPS to Global Catalog (secure)</td>
        </tr>
        <tr>
            <td><strong>53 (TCP/UDP)</strong></td>
            <td>DNS lookups (including reverse lookups for asset correlation)</td>
        </tr>
        <tr>
            <td><strong>88 (TCP/UDP)</strong></td>
            <td>Kerberos authentication communication</td>
        </tr>
        <tr>
            <td><strong>135 (TCP)</strong></td>
            <td>RPC endpoint mapper for NTLM-over-RPC name resolution</td>
        </tr>
        <tr>
            <td><strong>445 (TCP/UDP)</strong></td>
            <td>SMB/CIFS/SAM-R for NetLogon and lateral movement path detection</td>
        </tr>
        <tr>
            <td><strong>UDP 137</strong></td>
            <td>NetBIOS name resolution (one option for NNR)</td>
        </tr>
        <tr>
            <td><strong>TCP 3389</strong></td>
            <td>RDP handshake packet for network name resolution (NNR)</td>
        </tr>
        <tr>
            <td><strong>UDP 1813</strong></td>
            <td>RADIUS communication (if using RADIUS logs or workflows)</td>
        </tr>
        <tr>
            <td><strong>444 (TCP, localhost)</strong></td>
            <td>Local sensor updater service communication</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Pre-Checks and New Defender for Identity Module
    <div id="pre-checks-and-new-defender-for-identity-module" class="anchor"></div>
    
</h2>
<p>Before starting the installation, ensure that your environment meets all prerequisites. Microsoft provides a PowerShell module to help automate the configuration processes for domains, domain controllers, and other sensor servers.</p>
<p><strong>Installing the DefenderForIdentity Module:</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="nb">Install-Module</span> <span class="n">-Name</span> <span class="n">DefenderForIdentity</span></span></span></code></pre></div></div>
<p><strong>Importing the Module:</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="nb">Import-Module</span> <span class="n">DefenderForIdentity</span></span></span></code></pre></div></div>
<p><strong>Testing 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="nb">Test-MDIConfiguration</span> <span class="n">-Mode</span> <span class="n">LocalMachine</span> <span class="n">-Configuration</span> <span class="n">All</span></span></span></code></pre></div></div>
<p>(this is just to check the configuration – a False will be given as you don’t have anything installed at this point, but we’ll continue this in step 6)</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="PowerShell installing the DefenderForIdentity module and running Test-MDIConfiguration"
    width="839"
    height="393"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/capture_hu_762a0c04e4291171.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/capture.webp"></figure>
<h2 class="relative group">Step-by-Step Installation of Defender for Identity
    <div id="step-by-step-installation-of-defender-for-identity" class="anchor"></div>
    
</h2>

<h3 class="relative group">Step 1: Create a gMSA for the Sensor
    <div id="step-1-create-a-gmsa-for-the-sensor" class="anchor"></div>
    
</h3>
<p>Defender for Identity requires a Group Managed Service Account (gMSA). This account ensures the necessary access permissions for monitoring AD activity.</p>
<p><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/group-managed-service-accounts/group-managed-service-accounts/getting-started-with-group-managed-service-accounts"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/group-managed-service-accounts/group-managed-service-accounts/getting-started-with-group-managed-service-accounts</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"># Create KDS root key for the gMSA (if not existing)</span>
</span></span><span class="line"><span class="cl"><span class="nb">Add-KdsRootKey</span> <span class="n">-EffectiveImmediately</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Create the universal group (if needed)</span>
</span></span><span class="line"><span class="cl"><span class="nb">New-ADGroup</span> <span class="n">-Name</span> <span class="s2">&#34;MdiSvcAccountGroup&#34;</span> <span class="n">-GroupScope</span> <span class="n">Universal</span> <span class="n">-GroupCategory</span> <span class="n">Security</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Create the gMSA account, specifying the group as PrincipalsAllowedToRetrieveManagedPassword</span>
</span></span><span class="line"><span class="cl"><span class="nb">New-ADServiceAccount</span> <span class="n">-Name</span> <span class="s2">&#34;MdiSvcAccount&#34;</span> <span class="n">-DNSHostName</span> <span class="s2">&#34;yourdomain.com&#34;</span> <span class="n">-KerberosEncryptionType</span> <span class="n">AES256</span> <span class="n">-PrincipalsAllowedToRetrieveManagedPassword</span> <span class="s2">&#34;MdiSvcAccountGroup&#34;</span> <span class="n">-ManagedPasswordIntervalInDays</span> <span class="mf">30</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Add the gMSA to the group</span>
</span></span><span class="line"><span class="cl"><span class="nb">Add-ADGroupMember</span> <span class="n">-Identity</span> <span class="s2">&#34;MdiSvcAccountGroup&#34;</span> <span class="n">-Members</span> <span class="s2">&#34;MdiSvcAccount$&#34;</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c"># Verify the gMSA account</span>
</span></span><span class="line"><span class="cl"><span class="nb">Test-ADServiceAccount</span> <span class="n">-Identity</span> <span class="s2">&#34;MdiSvcAccount&#34;</span></span></span></code></pre></div></div>
<p>Make sure to add Log on as a service user rights on the servers added to MDI, otherwise the service(s) won’t start and will error in the Eventviewer.</p>

<h3 class="relative group">Step 2: Add the gMSA in the Defender for Identity Portal
    <div id="step-2-add-the-gmsa-in-the-defender-for-identity-portal" class="anchor"></div>
    
</h3>
<ol>
<li>Go to the Microsoft 365 Defender portal</li>
<li>Navigate to <strong>Settings &gt; Identities &gt; Directory services accounts</strong></li>
<li>Enter the account name and domain, then select <strong>Save</strong></li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Adding directory services account credentials in the Defender for Identity settings"
    width="1685"
    height="1083"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-5_hu_950a06b66f14f9fd.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-5.webp"></figure>
<h3 class="relative group">Step 3: Download and Install the Defender for Identity Sensor
    <div id="step-3-download-and-install-the-defender-for-identity-sensor" class="anchor"></div>
    
</h3>
<ol>
<li>Download the sensor installer from the Microsoft Defender portal through <strong>Settings &gt; Identities &gt; Sensor &gt; Add Sensor</strong></li>
<li>Install the sensor on your domain controllers. This can be done either through the GUI or silently using PowerShell</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Adding a new Defender for Identity sensor with the installer download and access key"
    width="1772"
    height="1085"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-6_hu_e6279145410b062d.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-6.webp"></figure><p><strong>GUI Installation:</strong></p>
<ul>
<li>Run the installer</li>
<li>Follow the on-screen steps to choose the installation path</li>
<li>Enter the access key provided in the portal</li>
</ul>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender for Identity sensor installer language selection"
    width="669"
    height="411"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-7.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-7.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Sensor deployment type selection in the Defender for Identity installer"
    width="669"
    height="411"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-8.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-8.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Configuring the installation path and access key for the Defender for Identity sensor"
    width="669"
    height="411"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-9.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-9.webp"></figure><figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender for Identity sensor installation in progress"
    width="669"
    height="411"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-10.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-10.webp"></figure><p><strong>Silent Installation:</strong></p>
<p>Use this PowerShell script to automate the installation:</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">.\Azure ATP sensor Setup.exe /quiet AccessKey=&#34;YOUR-ACCESS-KEY&#34;</span></span></code></pre></div></div>

<h3 class="relative group">Step 4: Validate Sensor Installation
    <div id="step-4-validate-sensor-installation" class="anchor"></div>
    
</h3>
<p>After installation, ensure the sensor is communicating with the Defender for Identity cloud service:</p>
<ol>
<li>Open the Microsoft 365 Defender portal and navigate to <strong>Settings &gt; Identities</strong></li>
<li>Verify the sensor’s status, ensuring it shows as “Connected” or “Running”</li>
</ol>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="Defender for Identity sensors listed as running and up to date in the Defender portal"
    width="1685"
    height="1083"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-11_hu_fe542866d5c3b445.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-11.webp"></figure>
<h2 class="relative group">Post-Configuration Setup
    <div id="post-configuration-setup" class="anchor"></div>
    
</h2>

<h3 class="relative group">Step 5: Validating Defender for Identity configuration
    <div id="step-5-validating-defender-for-identity-configuration" class="anchor"></div>
    
</h3>
<p>To continue on the early steps you’ve taken on the MDI powershell script, you can now use it to check if the installation is succesful and/or you need to have (more) logging enabled as mentioned in step 6 or 7 (prefer step 7 – as it can directly set all the configuration FOR you).</p>
<p><strong>Running the script:</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="nb">New-MDIConfigurationReport</span> <span class="n">-Path</span> <span class="s2">&#34;C:\Reports&#34;</span> <span class="n">-OpenHtmlReport</span></span></span></code></pre></div></div>
<p>Lot of failed checks? Move over to step 6 or 7</p>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="MDI configuration report with most domain configuration checks failed"
    width="874"
    height="475"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-12_hu_35a26bea2ec63c06.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/image-12.webp"></figure>
<h3 class="relative group">Step 6: Configuring Audit Policies (semi-manual way)
    <div id="step-6-configuring-audit-policies-semi-manual-way" class="anchor"></div>
    
</h3>
<p>Defender for Identity requires specific audit policies to be enabled on domain controllers. You can apply these settings using Group Policy Objects (GPOs) or PowerShell.</p>
<p><a href="https://learn.microsoft.com/en-us/defender-for-identity/deploy/configure-windows-event-collection"  target="_blank" rel="noreferrer">https://learn.microsoft.com/en-us/defender-for-identity/deploy/configure-windows-event-collection</a></p>
<p><strong>Required Audit Events:</strong></p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Audit Policy</th>
              <th>Event ID</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Logon Success/Failure</td>
            <td>4624</td>
            <td>A successful logon event</td>
        </tr>
        <tr>
            <td>Logon Success/Failure</td>
            <td>4625</td>
            <td>A failed logon event</td>
        </tr>
        <tr>
            <td>Account Logon Success/Failure</td>
            <td>4776</td>
            <td>The computer attempted to validate credentials</td>
        </tr>
        <tr>
            <td>Logoff Success</td>
            <td>4634</td>
            <td>The user has logged off</td>
        </tr>
        <tr>
            <td>Special Logon</td>
            <td>4672</td>
            <td>A privileged user has logged on</td>
        </tr>
        <tr>
            <td>Process Creation</td>
            <td>4688</td>
            <td>A process has been created</td>
        </tr>
        <tr>
            <td>Directory Service Access</td>
            <td>4662</td>
            <td>Permissions were requested for an object in AD</td>
        </tr>
        <tr>
            <td>Account Creation</td>
            <td>4720</td>
            <td>A user account was created</td>
        </tr>
        <tr>
            <td>Account Deletion</td>
            <td>4726</td>
            <td>A user account was deleted</td>
        </tr>
        <tr>
            <td>Privilege Use</td>
            <td>4673</td>
            <td>A privilege service was called</td>
        </tr>
        <tr>
            <td>Privilege Use</td>
            <td>4674</td>
            <td>A privilege operation was performed</td>
        </tr>
    </tbody>
  </table>
</div>
<p><strong>PowerShell commands to apply Audit Policies:</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"># Enforce logon auditing
</span></span><span class="line"><span class="cl">auditpol /set /subcategory:&#34;Logon/Logoff&#34; /success:enable /failure:enable
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"># Enable account logon auditing
</span></span><span class="line"><span class="cl">auditpol /set /subcategory:&#34;Account Logon&#34; /success:enable /failure:enable</span></span></code></pre></div></div>

<h3 class="relative group">Step 7: Automate the configuration with PowerShell
    <div id="step-7-automate-the-configuration-with-powershell" class="anchor"></div>
    
</h3>
<p>Microsoft provides a PowerShell script to automate the configuration of audit policies and other settings, which you’ve used above. You can use this script to automatically all the correct ACL’s and logging.</p>
<p><strong>Running the Configuration Script:</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="nb">Set-MDIConfiguration</span> <span class="n">-Mode</span> <span class="n">Domain</span> <span class="n">-Configuration</span> <span class="n">AdfsAuditing</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">AdvancedAuditPolicyCAs</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">AdvancedAuditPolicyDCs</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">CAAuditing</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">ConfigurationContainerAuditing</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">DomainObjectAuditing</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">NTLMAuditing</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">ProcessorPerformance</span></span></span></code></pre></div></div>

<h3 class="relative group">Step 8: Re-check the configuration
    <div id="step-8-re-check-the-configuration" 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="nb">New-MDIConfigurationReport</span> <span class="n">-Path</span> <span class="s2">&#34;C:\Reports&#34;</span> <span class="n">-OpenHtmlReport</span></span></span></code></pre></div></div>
<figure><img
    class="my-0 rounded-md"
    loading="lazy"
    decoding="async"
    fetchpriority="auto"
    alt="MDI configuration report with all domain configuration checks passed"
    width="827"
    height="460"
    src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/2024-10-15-16-49-17_hu_5b1af16400d22db9.webp"
   
   
    data-zoom-src="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/2024-10-15-16-49-17.webp"></figure>
<h2 class="relative group">Testing the Environment
    <div id="testing-the-environment" class="anchor"></div>
    
</h2>

<h3 class="relative group">Simulating Attacks
    <div id="simulating-attacks" class="anchor"></div>
    
</h3>
<p>To verify that Microsoft Defender for Identity is properly configured, simulate common attacks like Pass-the-Hash or Brute-force. Use the Mimikatz tool to extract NTLM hashes and attempt unauthorized access.</p>
<p><strong>Simulating Pass-the-Ticket Attack:</strong></p>
<ol>
<li>Use a tool like Mimikatz to extract a Kerberos ticket from a compromised host</li>
<li>Inject the ticket into another session to simulate lateral movement</li>
</ol>
<p><strong>Validating Detection:</strong></p>
<p>Check the Defender for Identity portal for alerts related to the simulated attack. The detection process should identify the Pass-the-Ticket activity and flag the suspicious behavior.</p>

<h2 class="relative group">Additional Configurations: AD FS, AD CS, and Entra Connect
    <div id="additional-configurations-ad-fs-ad-cs-and-entra-connect" class="anchor"></div>
    
</h2>
<p>Although Defender for Identity’s primary focus is monitoring Active Directory, it also supports integrating AD FS, AD CS, and Entra Connect for comprehensive identity protection.</p>

<h3 class="relative group">AD FS Integration
    <div id="ad-fs-integration" class="anchor"></div>
    
</h3>
<p>To monitor AD FS (Active Directory Federation Services) for suspicious authentication events:</p>
<ol>
<li>Install the Defender for Identity sensor on the AD FS server</li>
<li>Enable verbose auditing on AD FS using 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="nb">Set-AdfsProperties</span> <span class="n">-AuditLevel</span> <span class="n">Verbose</span></span></span></code></pre></div></div>
<ol start="3">
<li>Configure read permissions for the AD FS database:</li>
</ol>
<p>SQL</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">-- Grant read permissions to the Directory Service Account
</span></span><span class="line"><span class="cl">GRANT SELECT ON [AdfsConfiguration] TO [domain\gMSA$];</span></span></code></pre></div></div>

<h3 class="relative group">AD CS Integration
    <div id="ad-cs-integration" class="anchor"></div>
    
</h3>
<p>Configure AD CS (Active Directory Certificate Services) to monitor certificate-based authentications:</p>
<ol>
<li>Enable auditing on the AD CS server:</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">auditpol /set /subcategory:&#34;Certification Services&#34; /success:enable /failure:enable</span></span></code></pre></div></div>
<ol start="2">
<li>Install the Defender for Identity sensor on the AD CS server</li>
</ol>

<h3 class="relative group">Entra Connect Sensor
    <div id="entra-connect-sensor" class="anchor"></div>
    
</h3>
<p>To monitor Microsoft Entra Connect, ensure that:</p>
<ul>
<li>Entra Connect version 2.0 or higher is installed</li>
<li>Install the Entra Connect Sensor on the Entra Connect server to capture authentication events between on-prem AD and Azure AD</li>
</ul>

<h2 class="relative group">Event IDs to Monitor
    <div id="event-ids-to-monitor" class="anchor"></div>
    
</h2>
<p>Defender for Identity relies on key event IDs to detect suspicious behavior. Here’s a list of the most critical ones:</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th>Component</th>
              <th>Event ID</th>
              <th>Description</th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Kerberos TGT Request</td>
            <td>4768</td>
            <td>Ticket-granting ticket (TGT) request received</td>
        </tr>
        <tr>
            <td>AD FS Authentication</td>
            <td>1200</td>
            <td>AD FS authentication</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Defender for Identity learning period
    <div id="defender-for-identity-learning-period" class="anchor"></div>
    
</h2>
<p>Microsoft Defender for Identity (MDI) uses a learning period to understand the typical behavior patterns within your network. This period is crucial for fine-tuning the detection capabilities, ensuring that alerts are both accurate and relevant. By establishing a baseline of normal activities, MDI can more effectively identify anomalies and potential security threats.</p>

<div class="ms-table" role="region" aria-label="Table" tabindex="0">
  <table>
      <thead>
          <tr>
              <th><strong>Source Type</strong></th>
              <th><strong>Learning Period</strong></th>
          </tr>
      </thead>
    <tbody>
        <tr>
            <td>Active Directory (AD)</td>
            <td>30 days</td>
        </tr>
        <tr>
            <td>Network Traffic</td>
            <td>30 days</td>
        </tr>
        <tr>
            <td>User and Entity Behavior</td>
            <td>30 days</td>
        </tr>
        <tr>
            <td>NTLM Authentication</td>
            <td>30 days</td>
        </tr>
        <tr>
            <td>Kerberos Authentication</td>
            <td>30 days</td>
        </tr>
    </tbody>
  </table>
</div>

<h2 class="relative group">Defender for Identity security posture recommendations
    <div id="defender-for-identity-security-posture-recommendations" class="anchor"></div>
    
</h2>
<p>Microsoft released impressive updates to the <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/" ><strong>Microsoft Defender for Identity</strong> posture recommendations</a>, check out my previous blog post and make sure to walk through the findings:</p>
<p><strong>Related:</strong> <a href="https://www.modernsecurity.nl/microsoft-defender-for-identity-posture/" >Maximizing security with Microsoft Defender for Identity</a></p>

<h2 class="relative group">Conclusion
    <div id="conclusion" class="anchor"></div>
    
</h2>
<p><strong>Microsoft Defender for Identity</strong> offers comprehensive protection for on-premises Active Directory environments, leveraging advanced threat detection and behavioral analytics. This guide provides a clear, step-by-step process for deploying and configuring the solution, along with testing mechanisms to ensure proper functionality. By integrating it with AD FS, AD CS, and Entra Connect, organizations can achieve complete identity security monitoring across their hybrid environments.</p>
]]></content:encoded><media:content url="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/featured_hu_9cb310abc6e98c19.jpg" medium="image" type="image/jpeg" width="1200" height="884"/><enclosure url="https://www.modernsecurity.nl/install-microsoft-defender-for-identity/featured_hu_9cb310abc6e98c19.jpg" type="image/jpeg" length="64146"/></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></channel></rss>