<?xml version="1.0" encoding="UTF-8"?><feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang=""
  >
  <id>https://www.verboon.info/feed/atom/</id>
  <updated>2024-02-05T22:09:15Z</updated>
  <title type="text">Anything about IT</title>
  <subtitle type="text">by Alex Verboon</subtitle>
  <link rel="self" type="application/atom+xml" href="https://www.verboon.info/feed/" />
  <link rel="alternate" href="https://www.verboon.info" />
  <rights type="text">Copyright 2024</rights>
  <generator uri="http://wordpress.org/" version="6.9.4">WordPress</generator>
      <entry>
    <id>https://www.verboon.info/?p=9287</id>
    <title type="html"><![CDATA[Monitoring Windows built-in local security Groups with Microsoft Defender XDR or Sentinel]]></title>
    <updated>2024-02-05T22:09:15Z</updated>
    <published>2024-02-04T21:50:36Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2024/02/monitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2024/02/monitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel/" />
    <category scheme="https://www.verboon.info" term="Azure Sentinel" />
    <category scheme="https://www.verboon.info" term="DefenderXDR" />
    <category scheme="https://www.verboon.info" term="Security" />
    <summary type="html"><![CDATA[Windows Built-in local security groups Windows has several built-in local security groups that are designed to manage permissions and access rights on a computer. These groups are predefined by Windows, and each group has specific rights and permissions. The exact <a class="more-link" href="https://www.verboon.info/2024/02/monitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2020/09/hunting-for-local-group-membership-changes/" rel="bookmark" title="Hunting for Local Group Membership changes">Hunting for Local Group Membership changes</a></li>
<li><a href="https://www.verboon.info/2010/12/readtip-how-to-use-group-policy-preferences-to-secure-local-administrator-groups/" rel="bookmark" title="ReadTip: How to use Group Policy Preferences to Secure Local Administrator Groups">ReadTip: How to use Group Policy Preferences to Secure Local Administrator Groups</a></li>
<li><a href="https://www.verboon.info/2019/10/microsoft-defender-atp-advanced-hunting-whos-logging-on-with-local-admin-rights/" rel="bookmark" title="Microsoft Defender ATP Advanced Hunting – Who’s logging on with local admin rights?">Microsoft Defender ATP Advanced Hunting – Who’s logging on with local admin rights?</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2024/02/monitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel/"><![CDATA[
<p></p>



<h1 class="wp-block-heading">Windows Built-in local security groups</h1>



<p>Windows has several built-in local security groups that are designed to manage permissions and access rights on a computer. These groups are predefined by Windows, and each group has specific rights and permissions. The exact groups available can vary depending on the version of Windows you&#8217;re using or the features that are enabled, but here&#8217;s a general overview of the most commonly found built-in local security groups in Windows systems:</p>



<ul class="wp-block-list">
<li>Administrators</li>



<li>Users</li>



<li>Guests</li>



<li>Backup Operators</li>



<li>Remote Desktop Users</li>



<li>Network Configuration Operators</li>



<li>Remote Management Users</li>



<li>Power Users</li>



<li>Access Control Assistance Operators</li>



<li>Device Owners</li>



<li>Distributed COM Users</li>



<li>Event Log Readers</li>



<li>Performance Log Users</li>



<li>Performance Monitor Users</li>
</ul>



<p>In an enterprise environment, usually only the following groups are used:</p>



<p><strong>Users</strong> &#8211; This group is intended for regular users who do not need administrative privileges. Members can run installed applications and perform basic tasks but cannot make significant changes to the system settings or the security configuration.</p>



<p>When the device is joined to an Active Directory domain or Entra ID, the users account is automatically added to this group during their first login.</p>



<p><strong>Administrators</strong> &#8211; Members of this group have full control of the computer and can make any changes, including adding other users to the administrator’s group, changing security settings, installing software, and accessing all files on the computer.</p>



<p>When the device is joined to Active Directory, only the Domain Admins group is added to the local Administrator group, when the device is joined into Entra ID, the following security principals are added to the local Administrators group:</p>



<ul class="wp-block-list">
<li>The Microsoft Entra Global Administrator role</li>



<li>The Microsoft Entra Joined Device Local Administrator role.</li>



<li>The user performing the Microsoft Entra join.</li>
</ul>



<p>For more details read: <a href="https://learn.microsoft.com/en-us/entra/identity/devices/assign-local-admin#manage-regular-users">How to manage the local administrators group on Microsoft Entra joined devices</a></p>



<p><strong>Remote Desktop Users</strong> &#8211; This group is for users who need to access the computer using Remote Desktop. Members can log on remotely but do not have administrative rights unless explicitly granted.</p>



<h1 class="wp-block-heading">Managing local security groups</h1>



<p>In a managed enterprise environment, you want to have control over who has privileged access on your devices. When possible, avoid granting users permanent administrative rights by adding their account to the local Administrators group. Instead for ad-hoc activities that require elevated permissions consider the use of <a href="https://learn.microsoft.com/en-us/windows-server/identity/laps/laps-overview">Windows LAPS</a><a href="https://learn.microsoft.com/en-us/mem/intune/protect/epm-overview">, Microsoft Intune Endpoint Privilege Management (EPM)</a> &nbsp;or manage the <a href="https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/using-group-policy-preferences-to-manage-the-local-administrator/ba-p/259223">local Administrator group membership with Group Policy Preferences</a> so that you have central control over these permissions.</p>



<h1 class="wp-block-heading">The Risk of unmanaged local security group memberships</h1>



<p>The risk of users with local administrative and/or remote access are obvious but let me summarize some of them.</p>



<ul class="wp-block-list">
<li><strong>Malware and Ransomware</strong>: Users with administrative rights are more susceptible to malware and ransomware attacks.</li>



<li><strong>Accidental or Deliberate System Changes:</strong> With full system access, an administrator can unintentionally change or delete critical system files or settings, potentially leading to system instability, data loss, or exposure of sensitive information.</li>



<li><strong>Lateral Movement</strong> &#8211; Once an attacker gains the credentials of a local administrator account, they can use those privileges to explore and compromise other systems within the network. If you have Defender for Identity deployed, I suggest your read <a href="https://learn.microsoft.com/en-us/defender-for-identity/understand-lateral-movement-paths">Understand and investigate Lateral Movement Paths (LMPs) with Microsoft Defender for Identity</a></li>



<li><strong>RDP as a Target</strong> &#8211; RDP is a common target for attackers. Systems with open RDP ports (especially those <a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/internet-facing-devices?view=o365-worldwide">exposed to the internet</a>) are at a higher risk of brute force attacks, where attackers attempt to guess passwords to gain unauthorized access.</li>



<li><strong>Credential Harvesting</strong>: Once attackers gain access to a system via RDP, they can potentially use tools to harvest credentials stored on the system, enabling further attacks both on the local system and across the network.</li>
</ul>



<h1 class="wp-block-heading">Monitoring local security group membership additions</h1>



<p>Assuming you have processes in place for managing access to local security groups, you also want to monitor what is going on in your environment to identify real threat actors or internal staff, that, let’s put this nicely, bypasses your security controls.</p>



<p>With Microsoft Defender for Endpoint deployed, we can use advanced hunting to detect when a user was added to a security-enabled local group and look for the ActionType <strong>UserAccountAddedToLocalGroup</strong>, in simple words, a translation of the Event <a href="https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4732">4732 &nbsp;A member was added to a security-enabled local group</a>.</p>



<p>DeviceEvents</p>



<p>| where ActionType == &#8216;UserAccountAddedToLocalGroup&#8217;</p>



<p>When looking at the event details we see the following</p>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="388" height="686" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp1.png?resize=388%2C686&#038;ssl=1" alt="" class="wp-image-9288" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp1.png?w=388&amp;ssl=1 388w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp1.png?resize=170%2C300&amp;ssl=1 170w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp1.png?resize=169%2C300&amp;ssl=1 169w" sizes="auto, (max-width: 388px) 100vw, 388px" /></a></figure>



<ol class="wp-block-list">
<li>The device name where the user was added to a local group.</li>



<li>The AccountSID of the User that was added to the local group.</li>



<li>The User Account name, domain and SID that performed the action.</li>



<li>The Group name and SID of the local Group</li>
</ol>



<p>Now if you run the above script in your lab or a small environment, you might recognize the account names, and maybe event the SIDs 😊 But what if you run this in a real enterprise environment?</p>



<p>Also keep in mind, that there are quite a few scenarios for adding users to a local group, provided the user has the permission to do so.</p>



<ul class="wp-block-list">
<li>A local user can add themselves or another local user to a local group.</li>



<li>A Domain User can add themselves or another local or domain user to a local group.</li>



<li>An Entra User can add themselves or another local or Entra ID user to a local group.</li>
</ul>



<p>You will end up with something like shown in the example below.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="143" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?resize=540%2C143&#038;ssl=1" alt="" class="wp-image-9289" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?resize=1024%2C271&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?resize=300%2C79&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?resize=768%2C203&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?w=1331&amp;ssl=1 1331w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp2.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>As mentioned above, we don’t get the friendly name of the user that was added to the group, but only their AccountSID. When you look closely, you’ll notice different patterns of the SID, this is because as mentioned previously there are several scenarios that can occur, i.e. whether the added user is a local user, an Active Directory User or an Entra ID user.</p>



<p>I wanted to have something that is easier to read, so I started working on a KQL query that enriches the information accordingly. &nbsp;</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="90" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?resize=540%2C90&#038;ssl=1" alt="" class="wp-image-9290" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?resize=1024%2C170&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?resize=300%2C50&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?resize=768%2C128&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?resize=1536%2C255&amp;ssl=1 1536w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?resize=2048%2C340&amp;ssl=1 2048w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?w=1080&amp;ssl=1 1080w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp3.png?w=1620&amp;ssl=1 1620w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>Let me walk you through the query in detail.</p>



<p><strong>Important</strong>: The below query example is for use in Microsoft Sentinel, you will find the link to both queries for Defender XDR and Sentinel at the end of the post.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="55" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?resize=540%2C55&#038;ssl=1" alt="" class="wp-image-9291" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?resize=1024%2C105&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?resize=300%2C31&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?resize=768%2C79&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?w=1152&amp;ssl=1 1152w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp4.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>Retrieve all Identities from the <strong>IdentityInfo</strong> table and store them in a variable, we use this information later to join it with the results. Note that you must have Defender for Identity enabled in Defender XDR and when using the query in Microsoft Sentinel, you must configure the synchronization within the UEBA options.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="51" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?resize=540%2C51&#038;ssl=1" alt="" class="wp-image-9292" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?resize=1024%2C96&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?resize=300%2C28&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?resize=768%2C72&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?w=1163&amp;ssl=1 1163w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp5.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>Here we trying to determine the Active Directory Domain identifiers, we use this later to find out whether the account is an AD based account.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp6.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="119" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp6.png?resize=540%2C119&#038;ssl=1" alt="" class="wp-image-9293" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp6.png?resize=1024%2C225&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp6.png?resize=300%2C66&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp6.png?resize=768%2C169&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp6.png?w=1077&amp;ssl=1 1077w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>Here we’re retrieving information about local accounts that were created so that we can later enrich the SIDs that relate to local accounts, since we don’t have information about them in the IdentityInfo table.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp7.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="102" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp7.png?resize=540%2C102&#038;ssl=1" alt="" class="wp-image-9294" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp7.png?resize=1024%2C193&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp7.png?resize=300%2C56&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp7.png?resize=768%2C145&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp7.png?w=1121&amp;ssl=1 1121w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>Here we define the SIDs and Group Names of the Windows built-in local security groups.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="110" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?resize=540%2C110&#038;ssl=1" alt="" class="wp-image-9295" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?resize=1024%2C209&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?resize=300%2C61&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?resize=768%2C156&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?resize=1536%2C313&amp;ssl=1 1536w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?w=1630&amp;ssl=1 1630w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp8.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>Now we are getting all events where any of the defined groups was changed. We exclude any actions that originate from the SID <strong>S-1-5-18</strong>, so we avoid the noise from local group membership changes originating from Windows LAPS or Group Policy.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="101" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?resize=540%2C101&#038;ssl=1" alt="" class="wp-image-9297" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?resize=1024%2C192&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?resize=300%2C56&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?resize=768%2C144&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?resize=1536%2C288&amp;ssl=1 1536w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?w=1619&amp;ssl=1 1619w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp9.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>And finally, we add some other attributes that should help to provide context whether the added account is a local, domain or Entra Account and the source of the account who performed the action.</p>



<p>Let’s take a look at the results.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="92" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?resize=540%2C92&#038;ssl=1" alt="" class="wp-image-9299" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?resize=1024%2C175&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?resize=300%2C51&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?resize=768%2C131&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?w=1245&amp;ssl=1 1245w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-1.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>In the first record, where the <strong>AccountSource</strong> is Entra ID, we can’t see the name of the User that was added, this is because the event only stores the SID, but we can’t find that SID in the IdentityInfo table, so the only way to identify the user is to convert the user’s Entra ID SID to the Object ID. Since we can’t do this in KQL, we have to do this elsewhere like <a href="https://erikengberg.com/azure-ad-sid-to-object-id/">https://erikengberg.com/azure-ad-sid-to-object-id/</a></p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="212" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?resize=540%2C212&#038;ssl=1" alt="" class="wp-image-9303" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?resize=1024%2C402&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?resize=300%2C118&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?resize=768%2C302&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?resize=1536%2C604&amp;ssl=1 1536w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?w=1682&amp;ssl=1 1682w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?w=1080&amp;ssl=1 1080w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert.png?w=1620&amp;ssl=1 1620w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>When we have the ObjectID, we can do a further search to find the Users friendly name.</p>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert2.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="176" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert2.png?resize=540%2C176&#038;ssl=1" alt="" class="wp-image-9304" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert2.png?w=877&amp;ssl=1 877w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert2.png?resize=300%2C98&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpconvert2.png?resize=768%2C250&amp;ssl=1 768w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>When looking at the records where the <strong>AccountSource</strong> is Local, we see one record with a Username and one without. For the record without the name, we were unable to retrieve the information from historical user creation events (unless we would increase the lookback period which would consume a lot of query resources). In this case you will have to search for the Account with the corresponding SID locally on the device.&nbsp; This can by collecting an <a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/respond-machine-alerts?view=o365-worldwide#collect-investigation-package-from-devices">investigation package</a> or running a <a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/respond-machine-alerts?view=o365-worldwide#initiate-live-response-session">live response session</a> in Microsoft Defender for Endpoint.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="92" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?resize=540%2C92&#038;ssl=1" alt="" class="wp-image-9305" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?resize=1024%2C175&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?resize=300%2C51&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?resize=768%2C131&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?w=1245&amp;ssl=1 1245w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-4.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>For Active Directory accounts its usually quite simple to correlate the SID with the actual user, provided the Account Information is visible within the IdentityInfo table.</p>



<figure class="wp-block-image size-large"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="92" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?resize=540%2C92&#038;ssl=1" alt="" class="wp-image-9306" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?resize=1024%2C175&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?resize=300%2C51&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?resize=768%2C131&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?w=1245&amp;ssl=1 1245w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bp10-5.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>To enrich the Actor information (so the Identity that added the user), we basically do the same as described above.</p>



<figure class="wp-block-image size-full"><a href="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpl1.png?ssl=1"><img data-recalc-dims="1" loading="lazy" decoding="async" width="540" height="230" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpl1.png?resize=540%2C230&#038;ssl=1" alt="" class="wp-image-9302" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpl1.png?w=896&amp;ssl=1 896w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpl1.png?resize=300%2C128&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2024/02/bpl1.png?resize=768%2C327&amp;ssl=1 768w" sizes="auto, (max-width: 540px) 100vw, 540px" /></a></figure>



<p>I hope this will help you to monitor or proactively hunt for Windows built-in local security group changes. In an upcoming post, we’ll investigate monitoring Active Directory and Entra ID group changes.</p>



<p>You can find the queries in my GitHub repository here.</p>



<p><a href="https://github.com/alexverboon/Hunting-Queries-Detection-Rules/blob/main/Defender%20For%20Endpoint/MDE-WindowsBuiltInGroupMemberChanges.md">Hunting-Queries-Detection-Rules/Defender For Endpoint/MDE-WindowsBuiltInGroupMemberChanges.md at main · alexverboon/Hunting-Queries-Detection-Rules (github.com)</a></p>



<p>Additional References</p>



<p><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers/?wt.mc_id=AZ-MVP-5003805">Security identifiers | Microsoft Learn</a></p>



<p><a href="https://learn.microsoft.com/en-us/windows/security/identity-protection/access-control/local-accounts//?wt.mc_id=AZ-MVP-5003805">Local Accounts &#8211; Windows Security | Microsoft Learn</a></p>



<p><a href="https://www.microsoft.com/en-us/security/blog/2020/04/16/security-guidance-remote-desktop-adoption/">Security guidance for remote desktop adoption | Microsoft Security Blog</a></p>



<p><a href="https://erikengberg.com/azure-ad-sid-to-object-id/">Azure AD SID to Object ID Converter &#8211; ErikEngberg.com</a></p>



<p><a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/internet-facing-devices?view=o365-worldwide//?wt.mc_id=AZ-MVP-5003805">Identify internet-facing devices in Microsoft Defender for Endpoint | Microsoft Learn</a></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&amp;linkname=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&amp;linkname=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&amp;linkname=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&amp;linkname=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&amp;linkname=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&amp;linkname=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2024%2F02%2Fmonitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel%2F&#038;title=Monitoring%20Windows%20built-in%20local%20security%20Groups%20with%20Microsoft%20Defender%20XDR%20or%20Sentinel" data-a2a-url="https://www.verboon.info/2024/02/monitoring-windows-built-in-local-security-groups-with-microsoft-defender-xdr-or-sentinel/" data-a2a-title="Monitoring Windows built-in local security Groups with Microsoft Defender XDR or Sentinel"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=9099</id>
    <title type="html"><![CDATA[Users can create AzureAD tenants]]></title>
    <updated>2022-11-22T22:13:10Z</updated>
    <published>2022-11-22T22:13:09Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2022/11/users-can-create-azuread-tenants/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2022/11/users-can-create-azuread-tenants/" />
    <category scheme="https://www.verboon.info" term="Azure Active Directory" />
    <category scheme="https://www.verboon.info" term="KQL" />
    <category scheme="https://www.verboon.info" term="Security" />
    <summary type="html"><![CDATA[Hello there, In this blog post we look at a new setting within the Azure AD portal. &#8220;Users can create Azure AD tenants&#8220;. Unfortunately, the setting is enabled by default. Not sure why, but I guess most organizations will want <a class="more-link" href="https://www.verboon.info/2022/11/users-can-create-azuread-tenants/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2020/10/monitoring-service-principal-sign-ins-with-azuread-and-azure-sentinel/" rel="bookmark" title="Monitoring Service principal sign-ins with AzureAD and Azure Sentinel">Monitoring Service principal sign-ins with AzureAD and Azure Sentinel</a></li>
<li><a href="https://www.verboon.info/2018/12/stay-in-control-of-azuread-enterprise-application-registrations-with-cloud-app-security/" rel="bookmark" title="Stay in Control of AzureAD Enterprise Application registrations with Cloud App Security">Stay in Control of AzureAD Enterprise Application registrations with Cloud App Security</a></li>
<li><a href="https://www.verboon.info/2021/02/collecting-azuread-user-authentication-method-information/" rel="bookmark" title="Collecting AzureAD User Authentication Method Information">Collecting AzureAD User Authentication Method Information</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2022/11/users-can-create-azuread-tenants/"><![CDATA[
<p>Hello there,</p>



<p>In this blog post we look at a new setting within the Azure AD portal. &#8220;<strong>Users can create Azure AD tenants</strong>&#8220;. Unfortunately, the setting is <strong>enabled</strong> by default. Not sure why, but I guess most organizations will want to turn this off. You can find the setting within the Azure AD portal, Settings / Users / User settings / Tenant creation.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre1.png?w=540&#038;ssl=1" alt=""/></figure>



<p>&#8216;Yes&#8217; allows default users to create Azure AD tenants. &#8216;No&#8217; allows only users with the global administrator or tenant creator roles to create Azure AD tenants. Anyone who creates a tenant will become the global administrator for that tenant.</p>



<p>Let&#8217;s look at what a standard user can do when the setting is enabled and when they have access to the Azure AD portal. Because there&#8217;s another setting that allows you to <a href="https://learn.microsoft.com/en-gb/azure/active-directory/fundamentals/users-default-permissions" target="_blank" rel="noopener">Restrict access to the Azure AD administration portal</a>.</p>



<p>Select <strong>Manage tenants</strong></p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre2.png?w=540&#038;ssl=1" alt=""/></figure>



<p>Then select <strong>Create</strong></p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre3.png?w=540&#038;ssl=1" alt=""/></figure>



<p>Select a <strong>tenant type</strong></p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre4.png?w=540&#038;ssl=1" alt=""/></figure>



<p>And finally enter the <strong>name</strong> of the tenant</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre5.png?w=540&#038;ssl=1" alt=""/></figure>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre6.png?w=540&#038;ssl=1" alt=""/></figure>



<p>…. And after a few minutes <strong><em>Sam</em></strong> has its own tenant.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre7.png?w=540&#038;ssl=1" alt=""/></figure>



<p>We also get an audit log for this activity with the activity type &#8216;<strong>Create Company</strong>&#8216;</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre8.png?w=540&#038;ssl=1" alt=""/></figure>



<p>And at least we also get the Tenant ID that was created.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre9.png?w=540&#038;ssl=1" alt=""/></figure>



<p>If you haven&#8217;t disabled the setting yet, here&#8217;s q KQL query to find out whether someone in your organization already created a tenant.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre10.png?w=540&#038;ssl=1" alt=""/></figure>



<p>And here&#8217;s another query to find out who enabled the feature again, after you had disabled it.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre11.png?w=540&#038;ssl=1" alt=""/></figure>



<p>If you use Microsoft Sentinel, you can create Analytic rules for both activities.</p>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre12.png?w=540&#038;ssl=1" alt=""/></figure>



<figure class="wp-block-image"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/11/112222_2202_Userscancre13.png?w=540&#038;ssl=1" alt=""/></figure>



<p>Below are the KQL queries. </p>



<pre class="wp-block-code"><code>// New Azure AD Tenant created
AuditLogs
| where OperationName == "Create Company"
| extend InitiatedByUser = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
| extend InitiatedByIP = tostring(parse_json(tostring(InitiatedBy.user)).ipAddress)
| extend TenantId = tostring(TargetResources&#91;0].id)
| project TimeGenerated, OperationName,TenantId, InitiatedByUser, InitiatedByIP</code></pre>



<pre class="wp-block-code"><code>// AzureAD - Allow users to create tenants - enabled
AuditLogs
| where OperationName == "Update authorization policy"
| extend Settings = parse_json(tostring(TargetResources&#91;0].modifiedProperties))
| mv-expand Settings
| where Settings.displayName == "DefaultUserRolePermissions.AllowedToCreateTenants"
| extend Setting = tostring(Settings.displayName)
| extend newValue = tostring(Settings.newValue)
| extend oldValue = tostring(Settings.oldValue)
| extend InitiatedByUser = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
| extend InitiatedByIP = tostring(parse_json(tostring(InitiatedBy.user)).ipAddress)
| project TimeGenerated, OperationName,Setting, newValue, oldValue, InitiatedByUser, InitiatedByIP, SourceSystem
| where newValue == "true"</code></pre>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&amp;linkname=Users%20can%20create%20AzureAD%20tenants" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&amp;linkname=Users%20can%20create%20AzureAD%20tenants" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&amp;linkname=Users%20can%20create%20AzureAD%20tenants" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&amp;linkname=Users%20can%20create%20AzureAD%20tenants" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&amp;linkname=Users%20can%20create%20AzureAD%20tenants" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&amp;linkname=Users%20can%20create%20AzureAD%20tenants" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2022%2F11%2Fusers-can-create-azuread-tenants%2F&#038;title=Users%20can%20create%20AzureAD%20tenants" data-a2a-url="https://www.verboon.info/2022/11/users-can-create-azuread-tenants/" data-a2a-title="Users can create AzureAD tenants"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=9059</id>
    <title type="html"><![CDATA[Microsoft Defender for Identity &#8211; Npcap driver Update]]></title>
    <updated>2022-08-23T15:48:37Z</updated>
    <published>2022-08-23T15:48:36Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2022/08/microsoft-defender-for-identity-npcap-driver-update/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2022/08/microsoft-defender-for-identity-npcap-driver-update/" />
    <category scheme="https://www.verboon.info" term="Security" />
    <summary type="html"><![CDATA[Hello everyone, In July 2021 Microsoft announced that starting with MDI version 2.156 they included the OEM version of the Npcap executable in the Sensor deployment package. The reason for doing so is because WinPcap is no longer supported and <a class="more-link" href="https://www.verboon.info/2022/08/microsoft-defender-for-identity-npcap-driver-update/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2017/12/exploring-microsoft-security-update-information-with-powershell/" rel="bookmark" title="Exploring Microsoft Security Update information with PowerShell">Exploring Microsoft Security Update information with PowerShell</a></li>
<li><a href="https://www.verboon.info/2010/03/updated-ms10-015-security-update-and-kernel-update-compatibility-assessment-tool/" rel="bookmark" title="Updated MS10-015 Security Update and Kernel Update Compatibility Assessment Tool">Updated MS10-015 Security Update and Kernel Update Compatibility Assessment Tool</a></li>
<li><a href="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/" rel="bookmark" title="Use advanced hunting to Identify Defender clients with outdated definitions">Use advanced hunting to Identify Defender clients with outdated definitions</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2022/08/microsoft-defender-for-identity-npcap-driver-update/"><![CDATA[<p>Hello everyone,</p>
<p>In July 2021 Microsoft <a href="https://techcommunity.microsoft.com/t5/microsoft-defender-for-identity/microsoft-defender-for-identity-and-npcap/m-p/2584151">announced</a> that starting with MDI version <a href="https://docs.microsoft.com/en-us/defender-for-identity/whats-new">2.156</a> they included the OEM version of the Npcap executable in the Sensor deployment package. The reason for doing so is because WinPcap is no longer supported and since it&#8217;s no longer being developed, the driver cannot be optimized any longer for the Defender for Identity sensor. Additionally, if there is an issue in the future with the WinPcap driver, there are no options for a fix. More details can be found <a href="https://docs.microsoft.com/en-us/defender-for-identity/technical-faq">here</a>.</p>
<p>Since version <a href="https://docs.microsoft.com/en-us/defender-for-identity/whats-new">2.184</a> released on July 10<sup>th</sup> 2022 the Defender for Identity installation package will now install the Npcap component instead of the WinPcap drivers.</p>
<p>Although the MDI Sensor does update itself, you will need to plan for this change and act yourself. If you haven&#8217;t installed the Npcap driver already, you will notice that within the Microsoft Defender for Identity portal, sensors that use WinPcap show up as &#8216;Not healthy&#8217;.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe1.png?w=540&#038;ssl=1" alt=""></p>
<p>When opening the status page, you&#8217;ll see the following information.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe2.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe3.png?w=540&#038;ssl=1" alt=""></p>
<p>You can use <a href="https://github.com/alexverboon/MDATP/blob/master/AdvancedHunting/MDI%20-%20WinPcap%20-%20npcap.md">this advanced hunting query</a> to get a quick overview of your domain controllers that have the WinPcap driver installed.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe4.png?w=540&#038;ssl=1" alt=""></p>
<p>Okay, now that you have identified the domain controllers that require an update, here&#8217;s what you need to do after you have received an internal approval for the change.</p>
<p>If you already installed the sensor with WinPcap and need to update to use Npcap:</p>
<ol>
<li><strong>Uninstall the sensor.</strong><br />
<em>Lesson learned: when trying to uninstall via the Apps and Features UI on Windows Server 2019, I couldn&#8217;t run the install, you really need to open the appwiz.cpl UI. </em><br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe5.png?w=540&#038;ssl=1" alt=""></li>
<li><strong>Uninstall WinPcap.<br />
</strong></li>
<li><strong>Reinstall the sensor</strong> (with an installation package of version 2.184 or greater). This will also install the Npcap driver package. You can download the latest Sensor installation package from the MDI portal.<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe6.png?w=540&#038;ssl=1" alt=""><br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe7.png?w=540&#038;ssl=1" alt=""><br />
Once the Sensor is installed, the Sensor will show up as healthy within the Defender for Identity portal.<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/08/082322_1544_MicrosoftDe8.png?w=540&#038;ssl=1" alt=""></li>
</ol>
<p>For other scenarios see: <a href="https://docs.microsoft.com/en-us/defender-for-identity/technical-faq">How do I download and install or upgrade the Npcap driver?</a></p>
<p>Have a great day</p>
<p>Alex</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&amp;linkname=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&amp;linkname=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&amp;linkname=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&amp;linkname=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&amp;linkname=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&amp;linkname=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2022%2F08%2Fmicrosoft-defender-for-identity-npcap-driver-update%2F&#038;title=Microsoft%20Defender%20for%20Identity%20%E2%80%93%20Npcap%20driver%20Update" data-a2a-url="https://www.verboon.info/2022/08/microsoft-defender-for-identity-npcap-driver-update/" data-a2a-title="Microsoft Defender for Identity – Npcap driver Update"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=9009</id>
    <title type="html"><![CDATA[Assessment and Control of Browser Extensions]]></title>
    <updated>2022-06-19T21:38:02Z</updated>
    <published>2022-06-19T21:38:01Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2022/06/assessment-and-control-of-browser-extensions/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2022/06/assessment-and-control-of-browser-extensions/" />
    <category scheme="https://www.verboon.info" term="Browser" />
    <category scheme="https://www.verboon.info" term="Microsoft Defender" />
    <summary type="html"><![CDATA[In this blog post we take a look at browser extensions and how Microsoft Defender for Endpoint, Microsoft Defender Threat and Vulnerability Management and system configuration policies can help us to gain control over the use of browser extensions. What <a class="more-link" href="https://www.verboon.info/2022/06/assessment-and-control-of-browser-extensions/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2019/11/how-to-generate-a-monthly-defender-atp-threat-and-vulnerability-report/" rel="bookmark" title="How to generate a monthly Defender ATP Threat and Vulnerability Report">How to generate a monthly Defender ATP Threat and Vulnerability Report</a></li>
<li><a href="https://www.verboon.info/2008/09/google-launches-chrome-browser/" rel="bookmark" title="Google launches Chrome Browser">Google launches Chrome Browser</a></li>
<li><a href="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/" rel="bookmark" title="Use advanced hunting to Identify Defender clients with outdated definitions">Use advanced hunting to Identify Defender clients with outdated definitions</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2022/06/assessment-and-control-of-browser-extensions/"><![CDATA[<p>In this blog post we take a look at browser extensions and how Microsoft Defender for Endpoint, Microsoft Defender Threat and Vulnerability Management and system configuration policies can help us to gain control over the use of browser extensions.</p>
<ul>
<li>What is a Browser Extension?</li>
<li>Where are Extensions installed</li>
<li>Browser Extension Permissions</li>
<li>Using advanced hunting to identify browser extension downloads</li>
<li>Browser Extension inventory in Microsoft Defender Threat and vulnerability Management</li>
<li>Controlling the use of Browser Extensions</li>
</ul>
<h1>What is a browser extension?</h1>
<p>A browser extension is a small software module for customizing a web browser. An extension improves a user&#8217;s browsing experience. It usually provides a niche function that is important to a target audience.</p>
<p>Well known browser extensions are used for:</p>
<ul>
<li>Password Managers</li>
<li>VPN</li>
<li>Ad blockers</li>
<li>User productivity</li>
</ul>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta1.png?w=540&#038;ssl=1" alt="" /></p>
<h1>Where are Extensions Installed?</h1>
<p>When you install a browser extension, the browser stores the content in the following locations:</p>
<ul>
<li><strong>Google Chrome</strong> &#8211; AppData\Local\Google\Chrome\User Data\Default\Extensions\</li>
<li><strong>Microsoft Edge</strong> &#8211; AppData\Local\Microsoft\Edge\User Data\Default\Extensions\</li>
<li><strong>Mozillla FireFox</strong> &#8211; AppData\Roaming\Mozilla\Firefox\Profiles\*release*\Extensions\</li>
</ul>
<p>Below is an example of the content of the NordVPN extension</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta2.png?w=540&#038;ssl=1" alt="" /></p>
<h1>Browser Extension Permissions</h1>
<p>The permissions a browser extension uses are defined within the manifest.json file. Below are the permissions defined for the LastPass browser extension.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta3.png?w=540&#038;ssl=1" alt="" /></p>
<p>Detailed information about the chrome API permissions can be found here: <a href="https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/enterprise/declare-permissions">Declare API permissions in extension manifests</a></p>
<p>If you are responsible for the security of your company you should pay attention to the permissions a browser extension is using, I recommend reading the whitepaper <a href="https://support.google.com/chrome/a/answer/9897812?hl=en">Understand the risks of permissions for Chrome extensions</a>.</p>
<h1>Using advanced hunting to identify browser extension downloads</h1>
<p>Extensions for Edge Chromium and Google chrome are packed in a file that ends with CRX, hence we can use advanced hunting in Microsoft Defender for endpoint to identify devices that download extensions.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta4.png?w=540&#038;ssl=1" alt="" /></p>
<h1>Browser Extension inventory in Microsoft Defender</h1>
<p>Last month Microsoft <a href="https://techcommunity.microsoft.com/t5/microsoft-defender-vulnerability/announcing-microsoft-defender-vulnerability-management-in-public/ba-p/3361003">announced</a> the public preview of Microsoft Defender for Threat and vulnerability management. Defender Vulnerability Management&#8217;s <strong>browser extensions inventory</strong> provides <a href="https://docs.microsoft.com/en-us/microsoft-365/security/defender-vulnerability-management/tvm-browser-extensions?view=o365-worldwide">detailed information</a> on the permissions requested by each extension and identifies those with the highest associated risk levels.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta5.png?w=540&#038;ssl=1" alt="" /></p>
<p>Let&#8217;s take a look at the LastPass extension permissions, within the manifest.json file the permissions are defined as following:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta6.png?w=540&#038;ssl=1" alt="" /></p>
<p>Microsoft Defender Threat and Vulnerability management nicely translates these permissions as shown below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta7.png?w=540&#038;ssl=1" alt="" /></p>
<p>We can use advanced hunting to query the browser extension data.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta8.png?w=540&#038;ssl=1" alt="" /></p>
<p>Let&#8217;s take a look at all the extensions that have the <strong>proxy</strong> permission</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta9.png?w=540&#038;ssl=1" alt="" /></p>
<h1>Controlling the use of Browser Extensions</h1>
<p>Now that we have an overview of the extensions in use, you might to start taking control over what extensions you allow to be used and what extensions you want to block. We can use Active Directory Group Policy or Microsoft Endpoint Manager Intune configuration profiles to control the use of Browser extensions.</p>
<ul>
<li><strong>Control which extensions cannot be installed</strong> &#8211; use this policy to explicitly block the use of certain extensions or just configure with * if you want to block everything and only allow explicitly defined extensions</li>
<li><strong>Allow specific extensions to be installed</strong> &#8211; Use this policy to allow users to install the extension when they need it</li>
<li><strong>Control which extensions are installed silently</strong> &#8211; Use this policy to force the installation of an extensions (and prevent removal) for extensions that are used across the enterprise.</li>
<li><strong>ExtensionSettings</strong> &#8211; You can control what extensions your users can install based on permissions using the ExtensionSettings policy</li>
</ul>
<p>Here, by default we do not allow the user to install any extension, except for those that are explicitly defined.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/06/061922_2134_Assessmenta10.png?w=540&#038;ssl=1" alt="" /></p>
<p>For more details see: <a href="https://docs.microsoft.com/en-us/deployedge/microsoft-edge-manage-extensions-policies">Use group policies to manage Microsoft Edge extensions</a></p>
<h1>Conclusion</h1>
<p>Browser extensions can be very useful, if you don&#8217;t allow users to install software themselves, i.e. don&#8217;t grant them local administrative rights, you should also consider to actively manage the use of browser extensions.</p>
<p>I hope you find this post useful, as always I welcome your feedback.</p>
<h1>Additional References</h1>
<ul>
<li>MITRE ATT&amp;CK – Browser Extensions<br />
<a href="https://attack.mitre.org/techniques/T1176/">https://attack.mitre.org/techniques/T1176/</a></li>
<li>Understand the risks of permissions for Chrome extensions<br />
<a href="https://support.google.com/chrome/a/answer/9897812?hl=en">https://support.google.com/chrome/a/answer/9897812?hl=en</a></li>
<li>A detailed guide to configuring extensions using the ExtensionSettings policy<br />
<a href="https://docs.microsoft.com/en-us/deployedge/microsoft-edge-manage-extensions-ref-guide">https://docs.microsoft.com/en-us/deployedge/microsoft-edge-manage-extensions-ref-guide</a></li>
<li>Declare API permissions in extension manifests<br />
<a href="https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/enterprise/declare-permissions">https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/enterprise/declare-permissions</a></li>
<li>The cybersecurity threat of browser extensions<br />
<a href="https://cybernews.com/security/the-cybersecurity-threat-of-browser-extensions/">https://cybernews.com/security/the-cybersecurity-threat-of-browser-extensions/</a></li>
<li>Third-party extensions for Facebook, Instagram, and others have infected millions<br />
<a href="https://blog.avast.com/malicious-browser-extensions-avast">https://blog.avast.com/malicious-browser-extensions-avast</a></li>
<li>The dangers of malicious browser extensions<br />
<a href="https://medium.com/mycrypto/the-dangers-of-malicious-browser-extensions-ef9c10f0128f">https://medium.com/mycrypto/the-dangers-of-malicious-browser-extensions-ef9c10f0128f</a></li>
<li>Browser Extensions Can Pose Significant Cyber Security Threats<br />
<a href="https://securityboulevard.com/2019/01/browser-extensions-can-pose-significant-cyber-security-threats/">https://securityboulevard.com/2019/01/browser-extensions-can-pose-significant-cyber-security-threats/</a></li>
<li>ExtAnalysis<br />
<a href="https://github.com/Tuhinshubhra/ExtAnalysis">https://github.com/Tuhinshubhra/ExtAnalysis</a></li>
</ul>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&amp;linkname=Assessment%20and%20Control%20of%20Browser%20Extensions" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&amp;linkname=Assessment%20and%20Control%20of%20Browser%20Extensions" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&amp;linkname=Assessment%20and%20Control%20of%20Browser%20Extensions" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&amp;linkname=Assessment%20and%20Control%20of%20Browser%20Extensions" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&amp;linkname=Assessment%20and%20Control%20of%20Browser%20Extensions" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&amp;linkname=Assessment%20and%20Control%20of%20Browser%20Extensions" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2022%2F06%2Fassessment-and-control-of-browser-extensions%2F&#038;title=Assessment%20and%20Control%20of%20Browser%20Extensions" data-a2a-url="https://www.verboon.info/2022/06/assessment-and-control-of-browser-extensions/" data-a2a-title="Assessment and Control of Browser Extensions"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8986</id>
    <title type="html"><![CDATA[How to analyze Microsoft Sentinel Daily Cap Alerts &#8211; AADNonInteractiveUserSignInLogs]]></title>
    <updated>2022-05-20T20:18:50Z</updated>
    <published>2022-05-20T20:18:50Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2022/05/how-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2022/05/how-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs/" />
    <category scheme="https://www.verboon.info" term="Azure Sentinel" />
    <category scheme="https://www.verboon.info" term="KQL" />
    <summary type="html"><![CDATA[To avoid unplanned costs for Microsoft Sentinel, it is recommended to set a daily cap and create an analytics rule that triggers an alert when the daily cap is reached. Microsoft has published general guidance for monitoring costs here In <a class="more-link" href="https://www.verboon.info/2022/05/how-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2020/10/monitoring-service-principal-sign-ins-with-azuread-and-azure-sentinel/" rel="bookmark" title="Monitoring Service principal sign-ins with AzureAD and Azure Sentinel">Monitoring Service principal sign-ins with AzureAD and Azure Sentinel</a></li>
<li><a href="https://www.verboon.info/2018/03/how-to-get-started-with-azure-log-analytics/" rel="bookmark" title="How to get started with Azure log Analytics">How to get started with Azure log Analytics</a></li>
<li><a href="https://www.verboon.info/2019/10/microsoft-defender-atp-advanced-hunting-whos-logging-on-with-local-admin-rights/" rel="bookmark" title="Microsoft Defender ATP Advanced Hunting – Who’s logging on with local admin rights?">Microsoft Defender ATP Advanced Hunting – Who’s logging on with local admin rights?</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2022/05/how-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs/"><![CDATA[<p><span style="background-color: white;">To avoid unplanned costs for Microsoft Sentinel, it is recommended to set a daily cap and create an analytics rule that triggers an alert when the daily cap is reached. Microsoft has published general guidance for monitoring costs <a href="Manage%20and%20monitor%20costs%20for%20Microsoft%20Sentinel"><span style="font-family: Segoe UI;">here</span></a><br />
</span></p>
<p><span style="background-color: white;">In the past months I have deployed a number of Microsoft Sentinel instances and in many cases the root cause for reaching the daily cap was related to data ingested into the AADNonInteractiveUserSignInLogs table. When analyzing the data we often found an individual user that created an unusual high amount of events. This can happen for various reasons such as:<br />
</span></p>
<ul>
<li><span style="background-color: white;">The user is still logged on to a device, but has changed their password on another device<br />
</span></li>
<li><span style="background-color: white;">The user has left the company , but is still logged on to some virtual desktops<br />
</span></li>
<li><span style="background-color: white;">The user account is disabled, but the user is still logged on somewhere<br />
</span></li>
<li><span style="background-color: white;">The user has left the company, his account is deactivated, but their mobile phone is still trying to pull e-mails<br />
</span></li>
</ul>
<p><span style="background-color: white;">Okay, let&#8217;s start at the beginning<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><strong>Data Cap<br />
</strong></span></p>
<p><span style="background-color: white;">To avoid a bill shock, we set a daily cap.<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz1.png?w=540&#038;ssl=1" alt="" /><span style="background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><strong>Analytics Rule<br />
</strong></span></p>
<p><span style="background-color: white;">If we want to get alerted, we can setup an analytics rule within Microsoft Sentinel as shown in the example below.<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz2.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><strong>The Alert<br />
</strong></span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Whit the analytics rule in place, we get an alert as shown below when the daily data cap is reached. </span><span style="background-color: white;"><br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz3.png?w=540&#038;ssl=1" alt="" /><span style="background-color: white;"><br />
</span></p>
<h1><span style="background-color: white;">Analyzing the Data Usage<br />
</span></h1>
<p>Now that we have an alert , we have to investigate, what caused the high data volume. <span style="background-color: white;">Logon to the Azure Portal and navigate to the Usage and estimated costs blade within the Microsoft Sentinel Log Analytics Workspace. Here we can already identify what Solution caused the data ingestion increase, Select the Open chart in analytics button<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz4.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Log Analytics is opened with a predefined query that shows the usage. Here we see that LogManagement had an increase in data ingestion. Remove the start date and set the time range to 24 hours.<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Usage<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| where IsBillable == true<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| summarize TotalVolumeGB = sum(Quantity) / 1000 by bin(StartTime, 1d), Solution<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| render columnchart<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz5.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Change the query to display <strong>DataType</strong> instead of Solution, then re-run the query<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Usage<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| where IsBillable == true<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| summarize TotalVolumeGB = sum(Quantity) / 1000 by bin(StartTime, 1d), DataType<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| render columnchart<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz6.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Next remove the | render instruction from the query to see the details<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Usage<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| where IsBillable == true<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| summarize TotalVolumeGB = sum(Quantity) / 1000 by bin(StartTime, 1d), DataType<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Now let&#8217;s find the user(s) that cause the high event volume.<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">AADNonInteractiveUserSignInLogs<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| summarize count() by UserPrincipalName<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz7.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Next we drill down into the events just for the user that triggers the most events.<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">AADNonInteractiveUserSignInLogs<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| where UserPrincipalName == &#8220;john.doe@foocorp.com&#8221;<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| summarize count() by UserPrincipalName, ClientAppUsed, AppDisplayName<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz8.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Here we see that we have a lot of Windows Sign in events. Next lets drill into the details to identify the device.<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">AADNonInteractiveUserSignInLogs<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| where UserPrincipalName == &#8220;john.doe@foocorp.com&#8221;<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| where AppDisplayName == &#8220;Windows Sign In&#8221;<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| extend DeviceName = tostring(parse_json(DeviceDetail).displayName)<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| extend trustType = tostring(parse_json(DeviceDetail).trustType)<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| extend deviceId_ = tostring(parse_json(DeviceDetail).deviceId)<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">| extend operatingSystem = tostring(parse_json(DeviceDetail).operatingSystem)<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz9.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Next let&#8217;s see how many devices are involved and add the following KQL line.<br />
</span></p>
<p><span style="color: #172b4d; font-family: Ubuntu Mono; font-size: 10pt; background-color: #f4f5f7;">| summarize count() by DeviceName<br />
</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2022/05/052022_2013_Howtoanalyz10.png?w=540&#038;ssl=1" alt="" /><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">That&#8217;s it for today, I hope you found this useful. I&#8217;m currently working on an early detection when logs start to unusually grow, this so that IT operations or Security teams can take an immediate action and prevent the daily cap being reached.<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Bye<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;">Alex<br />
</span></p>
<p><span style="color: #172b4d; font-family: Segoe UI; background-color: white;"><br />
</span></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&amp;linkname=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&amp;linkname=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&amp;linkname=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&amp;linkname=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&amp;linkname=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&amp;linkname=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2022%2F05%2Fhow-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs%2F&#038;title=How%20to%20analyze%20Microsoft%20Sentinel%20Daily%20Cap%20Alerts%20%E2%80%93%20AADNonInteractiveUserSignInLogs" data-a2a-url="https://www.verboon.info/2022/05/how-to-analyze-microsoft-sentinel-daily-cap-alerts-aadnoninteractiveusersigninlogs/" data-a2a-title="How to analyze Microsoft Sentinel Daily Cap Alerts – AADNonInteractiveUserSignInLogs"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8923</id>
    <title type="html"><![CDATA[How To Detect the Log4Shell Vulnerability (CVE-2021-44228) with Microsoft Endpoint Configuration Manager]]></title>
    <updated>2021-12-14T21:25:14Z</updated>
    <published>2021-12-14T21:25:13Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/12/how-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/12/how-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager/" />
    <category scheme="https://www.verboon.info" term="ConfigMgr" />
    <category scheme="https://www.verboon.info" term="Java" />
    <category scheme="https://www.verboon.info" term="PowerShell" />
    <summary type="html"><![CDATA[Hello there, These days everyone is trying to identify devices that are vulnerable to the Log4Shell Vulnerability (CVE-2021-44228). If your only systems management tool is Microsoft Endpoint Configuration Manager this blog is for you. You can of course create device <a class="more-link" href="https://www.verboon.info/2021/12/how-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/" rel="bookmark" title="Use Microsoft Endpoint Configuration Manager to Configure the Windows Print Spooler Service">Use Microsoft Endpoint Configuration Manager to Configure the Windows Print Spooler Service</a></li>
<li><a href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/" rel="bookmark" title="Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service">Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service</a></li>
<li><a href="https://www.verboon.info/2015/06/the-system-center-configuration-manager-cmdlet-library/" rel="bookmark" title="The System Center Configuration Manager Cmdlet Library">The System Center Configuration Manager Cmdlet Library</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/12/how-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager/"><![CDATA[<p>Hello there,</p>
<p>These days everyone is trying to identify devices that are vulnerable to the Log4Shell Vulnerability (CVE-2021-44228). If your only systems management tool is Microsoft Endpoint Configuration Manager this blog is for you.</p>
<p>You can of course create device collections based on installed programs, however log4j-core.jar files can be found in several locations in and outside the Program files folder. So in order to identify these files, we have to search for them on the entire disk. Here&#8217;s the script I prepared for that.</p>
<p><em>Note that I have intentionally limited the drive letters to a-e, adjust this if you know of systems with more drive letters.<br />
</em></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect1.png?w=540&#038;ssl=1" alt=""></p>
<p>You can find the script here: <a href="https://gist.github.com/alexverboon/0a7a32b8f1267f4a9ac34b5e1c5b1ba5">https://gist.github.com/alexverboon/0a7a32b8f1267f4a9ac34b5e1c5b1ba5</a></p>
<p>The script produces the following output.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect2.png?w=540&#038;ssl=1" alt=""></p>
<p>Next, import the script into the Microsoft Endpoint Configuration Manager Script library. Then select a device collection and run the script.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect3.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect4.png?w=540&#038;ssl=1" alt=""></p>
<p>Next, we are going to extract the Run Script results with PowerShell. I wrote about this method earlier in this blog post <a href="https://www.verboon.info/2019/09/extract-configmgr-script-status-results-with-powershell/">Extract ConfigMgr Script Status Results with PowerShell – Anything about IT (verboon.info)</a></p>
<p>Open PowerShell from the ConfigMgr console and then load the <strong>Export-CMScriptResults</strong> function that you copied from the blog post mentioned above or from here: <a href="https://gist.github.com/alexverboon/e67fc2ecde3c2fbe44f6413cf20e00d9">Export-CMScriptResults (github.com)</a></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect5.png?w=540&#038;ssl=1" alt=""></p>
<p>We now have all the results in our PowerShell variable $log4 so we can further review the data</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect6.png?w=540&#038;ssl=1" alt=""></p>
<p>And as a little bonus, let&#8217;s compare the identified files with some log4j-core.jar file hash references available on GitHub</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect7.png?w=540&#038;ssl=1" alt=""></p>
<p>The above code snippets can be found here: <a href="https://gist.github.com/alexverboon/13a5defd8ebfac491ab9313491d995a4">https://gist.github.com/alexverboon/13a5defd8ebfac491ab9313491d995a4</a></p>
<p>If you have a match, it will show the output as following:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/121421_2120_HowToDetect8.png?w=540&#038;ssl=1" alt=""></p>
<p>I hope you enjoyed this blog post, have a great day and good luck with identifying vulnerable devices.</p>
<p>Credits / References</p>
<p><a href="https://www.reddit.com/r/SCCM/comments/rdl6mo/sccm_scan_for_log4j/?utm_source=share&amp;utm_medium=ios_app&amp;utm_name=iossmf">SCCM scan for Log4J : SCCM (reddit.com)</a></p>
<p><a href="https://www.lunasec.io/docs/blog/log4j-zero-day/">Log4Shell: RCE 0-day exploit found in log4j 2, a popular Java logging package | LunaSec</a></p>
<p><a href="https://github.com/mubix/CVE-2021-44228-Log4Shell-Hashes">mubix/CVE-2021-44228-Log4Shell-Hashes: Hashes for vulnerable LOG4J versions (github.com)</a></p>
<p><a href="https://gist.github.com/spasam/7b2b2e03c6dd7bd6f1029e88c7cc82ad">log4j2 core jar versions and checksums (github.com)</a></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&amp;linkname=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&amp;linkname=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&amp;linkname=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&amp;linkname=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&amp;linkname=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&amp;linkname=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fhow-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager%2F&#038;title=How%20To%20Detect%20the%20Log4Shell%20Vulnerability%20%28CVE-2021-44228%29%20with%20Microsoft%20Endpoint%20Configuration%20Manager" data-a2a-url="https://www.verboon.info/2021/12/how-to-detect-the-log4shell-vulnerability-cve-2021-44228-with-microsoft-endpoint-configuration-manager/" data-a2a-title="How To Detect the Log4Shell Vulnerability (CVE-2021-44228) with Microsoft Endpoint Configuration Manager"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8905</id>
    <title type="html"><![CDATA[Defender for Endpoint – unified solution for Windows Server 2012 R2 and 2016 (Part2)]]></title>
    <updated>2021-12-06T20:29:27Z</updated>
    <published>2021-12-06T20:28:53Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/12/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/12/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2/" />
    <category scheme="https://www.verboon.info" term="Defender for Endpoint" />
    <category scheme="https://www.verboon.info" term="Windows Server 2016" />
    <summary type="html"><![CDATA[Hello everyone, In my previous post (Part1) I provided an overview of the new Microsoft Defender for endpoint unified solution for Windows Server 2012-R2 and 2016 and how to deploy the solution manually to a new provisioned server. In this <a class="more-link" href="https://www.verboon.info/2021/12/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/" rel="bookmark" title="Defender for Endpoint &#8211; unified solution for Windows Server 2012 R2 and 2016 (Part1)">Defender for Endpoint &#8211; unified solution for Windows Server 2012 R2 and 2016 (Part1)</a></li>
<li><a href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/" rel="bookmark" title="How to remediate Defender for Endpoint onboarding with ConfigMgr">How to remediate Defender for Endpoint onboarding with ConfigMgr</a></li>
<li><a href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/" rel="bookmark" title="Use Microsoft Endpoint Configuration Manager to Configure the Windows Print Spooler Service">Use Microsoft Endpoint Configuration Manager to Configure the Windows Print Spooler Service</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/12/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2/"><![CDATA[<p>Hello everyone,</p>
<p>In my previous post (<a href="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/">Part1</a>) I provided an overview of the new Microsoft Defender for endpoint unified solution for Windows Server 2012-R2 and 2016 and how to deploy the solution manually to a new provisioned server. In this blog post I would like to walk you through the process of migrating a Windows 2016 server to the new unified solution using Microsoft Endpoint Configuration manager.</p>
<p>For this we will be using the <a href="https://github.com/microsoft/mdefordownlevelserver">upgrade script</a> that Microsoft provides. But let&#8217;s go through this step by step.</p>
<h2>Preparing the package content</h2>
<p>Within Microsoft Endpoint Configuration Manager we need a package or application that deploys the new universal solution to servers. In my lab I created a package. The package content is as following:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor1.png?w=540&#038;ssl=1" alt=""></p>
<p><strong>Install.ps1</strong> – The script provided by Microsoft hosted here on GitHub <a href="https://github.com/microsoft/mdefordownlevelserver/blob/main/Install.ps1">https://github.com/microsoft/mdefordownlevelserver/blob/main/Install.ps1</a> The script can be used for various scenarios, but in our case it will do the following:</p>
<ol>
<li>It removes the OMS workspace when the workspace ID is provided with the parameter RemoveMMA. **NOTE: this step is for cleanup purposes only. **.</li>
<li>The next step uninstalls SCEP &#8211; if it is present. (On a Windows Server 2016 there will be no SCEP agent so this step is skipped)</li>
<li>Then, it checks for prerequisites and downloads and installs two hotfixes on Windows Server 2012 R2 if the prerequisites have not been met, and updates to the latest platform version on Windows Server 2016 if required (currently installed platform version must already be 4.18.2001.10 or higher). Note that on machines that have received recent monthly update rollup packages, the prerequisites will have been met and this step is NOT needed. The installer script also checks for, downloads and installs the latest Defender Antivirus platform update on Windows Server 2016 to ensure the prerequisite is met.</li>
<li>Next, it installs the Microsoft Defender for Downlevel Servers MSI (md4ws.msi downloaded from the onboarding page for Windows Server 2012 R2 and 2016). If the file is in the same directory as the script, no input is required. If the product was already installed, it will perform a reinstallation with the provided MSI.</li>
<li>Finally, it runs the onboarding script, if provided using the parameter OnboardingScript.</li>
</ol>
<p>You can find more details about the installer script here: <a href="https://github.com/microsoft/mdefordownlevelserver">https://github.com/microsoft/mdefordownlevelserver</a></p>
<p><strong>Md4ws.msi</strong> and <strong>WindowsDefenderATPOnboardingScript.cmd</strong> – Both files can be downloaded from the Microsoft 365 Security portal.</p>
<p>Within the Microsoft 365 Security portal, select Settings / Endpoints / Device Management / Onboarding, then select Windows Server 2012 R2 and 2016 Preview and for the deployment method select Microsoft Endpoint Configuration Manager.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor2.png?w=540&#038;ssl=1" alt=""></p>
<p>Next, leave the Operating system, but now select the deployment option that mentions &#8216;using Microsoft Monitoring Agent).</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor3.png?w=540&#038;ssl=1" alt=""></p>
<p>Then note down the workspace ID , we&#8217;re going to use this later.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor4.png?w=540&#038;ssl=1" alt=""></p>
<h1>Creating the package in Microsoft Endpoint Configuration Manager</h1>
<p>Here&#8217;s the configuration of my MDE upgrade package in Microsoft Endpoint Configuration Manager.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor5.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor6.png?w=540&#038;ssl=1" alt=""></p>
<p>Next let&#8217;s look at the Program properties of the package.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor7.png?w=540&#038;ssl=1" alt=""></p>
<p>The command line is as following, please replace &lt;ADD YOUR WORKSPACE ID HERE&gt; with the workspace ID that you noted down previously.</p>
<p>&#8220;%Windir%\sysnative\WindowsPowerShell\v1.0\powershell.exe&#8221; -ExecutionPolicy Bypass -Command .\Install.ps1 -RemoveMMA <span style="color:red"><strong>&lt;ADD YOUR WORKSPACE ID HERE&gt;</strong></span> -log -etl -OnboardingScript &#8220;.\WindowsDefenderATPOnboardingScript.CMD&#8221;</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor8.png?w=540&#038;ssl=1" alt=""></p>
<p>Great now that you have prepared the package, let&#8217;s deploy it. …<strong>but do not forget to distribute the content </strong>of the package to your distribution points (back in the days when I used to support ConfigMgr that would have been my first question I asked people when calling about a package not installing).</p>
<h1>Deploying the Upgrade package</h1>
<p>Now where to deploy? I guess for your initial deployment you know exactly what system you want to upgrade. But before moving on with the deployment let me know you a handy tip how you can identify systems that have the MMA Agent deployed with the Endpoint Manager workspace ID configured.</p>
<p>Run CMPrivot on a device collection that includes your existing MDE onboarded servers and then add the Workspace ID to the query as shown below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor9.png?w=540&#038;ssl=1" alt=""></p>
<p>In this example, Server2016-03 was identified to have the MMA Agent pointing to the MDE workspace. This is important to know, because the MMA Agent can point to multiple workspaces, as for example you might also be using the agent to collect Windows security event logs or performance data. Knowing your current MMA configuration will help you to identify the systems where you can completely remove the MMA agent later or leave it running.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor10.png?w=540&#038;ssl=1" alt=""></p>
<p>Okay, now let&#8217;s deploy the upgrade package. For this I created a collection within Microsoft Endpoint Configuration manager and added the server to the collection.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor11.png?w=540&#038;ssl=1" alt=""></p>
<p>Note that I have set the Deployment to &#8216;Available&#8217; for demo purposes, to run this automatically in production, set this to &#8216;Required&#8217;.</p>
<p>Here&#8217;s our system before the upgrade.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor12.png?w=540&#038;ssl=1" alt=""></p>
<p>Open the Microsoft Endpoint Configuration Manager Software Center and install the package.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor13.png?w=540&#038;ssl=1" alt=""></p>
<p>Remember we added the -log and -etl command line options to the install.ps1 script? You will find the log files within the ccmcache folder where the package was downloaded.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor14.png?w=540&#038;ssl=1" alt=""></p>
<p>Here&#8217;s our system after the upgrade</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor15.png?w=540&#038;ssl=1" alt=""></p>
<ul>
<li>The Microsoft Defender for Endpoint component is installed</li>
<li>The workspace configuration is removed from the MMA Agent</li>
<li>The Microsoft Defender for Endpoint &#8216;Sense&#8217; service is running</li>
<li>The system  was successfully re-onboarded.</li>
</ul>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/12/120621_2024_Defenderfor16.png?w=540&#038;ssl=1" alt=""></p>
<p>That&#8217;s it for today, thanks for reading my blog</p>
<p>Alex</p>
<h1>References</h1>
<p><a href="https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-server-endpoints?view=o365-worldwide">Onboard Windows servers to the Microsoft Defender for Endpoint service | Microsoft Docs</a></p>
<p><a href="https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/server-migration?view=o365-worldwide">Server migration scenarios for the new version of Microsoft Defender for Endpoint | Microsoft Docs</a></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F12%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2%2F&#038;title=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part2%29" data-a2a-url="https://www.verboon.info/2021/12/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part2/" data-a2a-title="Defender for Endpoint – unified solution for Windows Server 2012 R2 and 2016 (Part2)"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8874</id>
    <title type="html"><![CDATA[Defender for Endpoint &#8211; unified solution for Windows Server 2012 R2 and 2016 (Part1)]]></title>
    <updated>2021-10-24T16:21:00Z</updated>
    <published>2021-10-24T16:20:59Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/" />
    <category scheme="https://www.verboon.info" term="defender" />
    <category scheme="https://www.verboon.info" term="Defender for Endpoint" />
    <category scheme="https://www.verboon.info" term="Microsoft Defender" />
    <category scheme="https://www.verboon.info" term="Windows Server 2008 R2" />
    <category scheme="https://www.verboon.info" term="Windows Server 2016" />
    <summary type="html"><![CDATA[Hello everyone, Just in case you missed this, earlier in October, Microsoft announced the public preview for the Microsoft Defender for endpoint, unified solution for Windows Server 2012 R2 and 2016 that enables additional protection features and brings a high <a class="more-link" href="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/" rel="bookmark" title="How to remediate Defender for Endpoint onboarding with ConfigMgr">How to remediate Defender for Endpoint onboarding with ConfigMgr</a></li>
<li><a href="https://www.verboon.info/2019/07/testing-windows-defender-maps-connectivity-with-powershell/" rel="bookmark" title="Testing Windows Defender MAPS Connectivity with PowerShell">Testing Windows Defender MAPS Connectivity with PowerShell</a></li>
<li><a href="https://www.verboon.info/2019/07/monitoring-windows-defender-cloud-protection-service-connectivity-with-configmgr/" rel="bookmark" title="Monitoring Windows Defender Cloud Protection Service connectivity with ConfigMgr">Monitoring Windows Defender Cloud Protection Service connectivity with ConfigMgr</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/"><![CDATA[<p>Hello everyone,</p>
<p>Just in case you missed this, earlier in October, Microsoft <a href="https://techcommunity.microsoft.com/t5/microsoft-defender-for-endpoint/defending-windows-server-2012-r2-and-2016/ba-p/2783292">announced</a> the public preview for the Microsoft Defender for endpoint, unified solution for Windows Server 2012 R2 and 2016 that enables additional protection features and brings a high level of parity with Microsoft Defender for endpoint on Windows Server 2019. The unified solution also provides a much simpler onboarding experience.</p>
<p>Before taking a closer look at the new unified solution, let&#8217;s briefly look at how things worked until now. Onboarding Windows 10 and Windows Server 2019 is simple, all you need to do is run an onboarding script that basically enables the Microsoft Defender for Endpoint component that is already built-in the operating system, i.e. there&#8217;s no need to deploy and install any additional software. Things are different with Windows Server 2012-R2 and Windows Server 2016 though.</p>
<ul>
<li>Windows Server 2012-R2 that was released on November 25<sup>th</sup> in 2013 does not have Windows Defender built in so to onboard these servers into Microsoft Defender for endpoint, we first need to enable Windows Defender that is done by installing the SCEP (System Center Endpoint Protection) Agent and then we need the Log Analytics Agent that is used to download and run the Microsoft Defender for Endpoint components. When you use Group Policy to configure Windows Defender Antivirus you also need to use separate administrative templates, meaning that you have to maintain settings in two different locations.</li>
<li>On Windows Server 2016 that was released on October 15<sup>th</sup> in 2016, Windows Defender is already shipped as part of the operating system, so there&#8217;s no need for deploying the SCEP agent, but we still need the Log Analytics agent for the Microsoft Defender for endpoint components.</li>
</ul>
<p>As you can see, the onboarding experience for  Server 2012-R2 and Server 2016 was a bit complex but with the new unified solution this complexity is removed. Let&#8217;s try this out.</p>
<p>When you select the onboarding options for Servers within the Microsoft Defender for Endpoint portal, you will now see two options.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor1.png?w=540&#038;ssl=1" alt=""></p>
<p>Today we will look at the local script option (other options will be discussed in a future post).</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor2.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor3.png?w=540&#038;ssl=1" alt=""></p>
<p>The md4ws.msi installation package includes all the components you need to run Microsoft Defender for Endpoint on Server 2012-R2 and Server 2016. Now let&#8217;s install this on a Windows Server 2012-R2 device.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor4.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor5.png?w=540&#038;ssl=1" alt=""></p>
<p>Once completed, Windows Defender and Defender for endpoint is installed.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor6.png?w=540&#038;ssl=1" alt=""></p>
<p>Now that we have &#8216;component&#8217; parity with Windows 10 and Windows Server 2019, all we need to do for activating Microsoft Defender for endpoint is to run the onboarding script.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor7.png?w=540&#038;ssl=1" alt=""></p>
<p>While when using the Log Analytics agent to deliver defender for endpoint the &#8216;Process&#8217; mssense.exe was running, we now have it running as a Service.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor8.png?w=540&#038;ssl=1" alt=""></p>
<p>The new unified solution also enables the following protection capabilities for Server 2012-R2 and Server 2016.</p>
<ul>
<li>Microsoft Defender Antivirus with Next-generation protection for Windows Server 2012 R2</li>
<li>Attack Surface Reduction (ASR) rules</li>
<li>Network Protection</li>
<li>Controlled Folder Access</li>
<li>Potentially Unwanted Application (PUA) blocking</li>
<li>Improved detection capabilities</li>
<li>Expanded response capabilities on devices and files</li>
<li>EDR in Block Mode</li>
<li>Live Response</li>
<li>Automated Investigation and Response (AIR)</li>
<li>Tamper Protection</li>
</ul>
<p>Source: <a href="https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-server-endpoints?view=o365-worldwide#new-functionality-in-the-modern-unified-solution-for-windows-server-2012-r2-and-2016-preview">https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/configure-server-endpoints?view=o365-worldwide#new-functionality-in-the-modern-unified-solution-for-windows-server-2012-r2-and-2016-preview</a></p>
<p>When looking at the device actions , you will notice that the unified solution now enables additional capabilities.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/10/102421_1548_Defenderfor9.png?w=540&#038;ssl=1" alt=""></p>
<p>That&#8217;s it for today, in the next blog post we will look at migrating servers currently running the SCEP/Log Analytics agent to use the new unified solution.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&amp;linkname=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F10%2Fdefender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1%2F&#038;title=Defender%20for%20Endpoint%20%E2%80%93%20unified%20solution%20for%20Windows%20Server%202012%20R2%20and%202016%20%28Part1%29" data-a2a-url="https://www.verboon.info/2021/10/defender-for-endpoint-unified-solution-for-windows-server-2012-r2-and-2016-part1/" data-a2a-title="Defender for Endpoint – unified solution for Windows Server 2012 R2 and 2016 (Part1)"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8852</id>
    <title type="html"><![CDATA[Detect  Audit Policy Modifications with Microsoft 365 Defender]]></title>
    <updated>2021-09-26T20:15:07Z</updated>
    <published>2021-09-26T20:15:06Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/09/detect-audit-policy-modifications-with-microsoft-365-defender/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/09/detect-audit-policy-modifications-with-microsoft-365-defender/" />
    <category scheme="https://www.verboon.info" term="Defender for Endpoint" />
    <category scheme="https://www.verboon.info" term="Group Policy" />
    <category scheme="https://www.verboon.info" term="KQL" />
    <category scheme="https://www.verboon.info" term="Microsoft Defender" />
    <summary type="html"><![CDATA[Hello there, In today&#8217;s blog post I want to share with you an advanced hunting query to detect audit policy modifications using Microsoft Defender 365 advanced hunting. Following the MITRE ATT&#38;CK framework this would be T1484.001 Domain Policy Modification: Group <a class="more-link" href="https://www.verboon.info/2021/09/detect-audit-policy-modifications-with-microsoft-365-defender/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/" rel="bookmark" title="Use advanced hunting to Identify Defender clients with outdated definitions">Use advanced hunting to Identify Defender clients with outdated definitions</a></li>
<li><a href="https://www.verboon.info/2019/11/how-to-generate-a-monthly-defender-atp-threat-and-vulnerability-report/" rel="bookmark" title="How to generate a monthly Defender ATP Threat and Vulnerability Report">How to generate a monthly Defender ATP Threat and Vulnerability Report</a></li>
<li><a href="https://www.verboon.info/2020/06/defender-atp-advanced-hunting-with-ti-from-urlhaus/" rel="bookmark" title="Defender ATP Advanced hunting with TI from URLhaus">Defender ATP Advanced hunting with TI from URLhaus</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/09/detect-audit-policy-modifications-with-microsoft-365-defender/"><![CDATA[<p>Hello there,</p>
<p>In today&#8217;s blog post I want to share with you an advanced hunting query to detect audit policy modifications using Microsoft Defender 365 advanced hunting. Following the MITRE ATT&amp;CK framework this would be <a href="https://attack.mitre.org/techniques/T1484/001/">T1484.001 Domain Policy Modification: Group Policy Modification</a>.</p>
<p>Microsoft Defender for Endpoint can help us detect audit policy modifications by running the following query:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit1.png?w=540&#038;ssl=1" alt=""></p>
<p>Detailed information about the audit policy changes is displayed in the AdditionalFields data. Now all we need to do is to translate these values into human readable data.</p>
<p><strong>AuditPolicyChanges</strong> – This field describes the changes that were made. Within the query I first removed the % and blanks, then used the following case statements to translate the values.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit2.png?w=540&#038;ssl=1" alt=""></p>
<p>These relate to when you configure auditing settings as shown in the example below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit3.png?w=540&#038;ssl=1" alt=""></p>
<p><strong>CategoryId</strong> – is the ID of the auditing Category which subcategory was changed. The values are translated as following:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit4.png?w=540&#038;ssl=1" alt=""></p>
<p><strong>SubcategoryGuid</strong> &#8211; the unique subcategory GUID. A complete list of the GUIDs can be found here: <a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-gpac/77878370-0712-47cd-997d-b07053429f6d">https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-gpac/77878370-0712-47cd-997d-b07053429f6d</a> or you can also run the following command:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit5.png?w=540&#038;ssl=1" alt=""></p>
<p>Within the query , the values are translated as following:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit6.png?w=540&#038;ssl=1" alt=""></p>
<p>Great, so now that we have done all the translation work, let&#8217;s run the query:</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit7.png?w=540&#038;ssl=1" alt=""></p>
<p>Now this query by itself will return a lot of results, what you want to look for are audit policy changes where Success and/or failure is Removed.</p>
<p>Here&#8217;s another query, assuming that you have also onboarded your domain controllers into Defender for Endpoint, you can use the following advanced hunting query to find audit policy changes, by searching for the audit.csv file where the audit policy settings are stored.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit8.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit9.png?w=540&#038;ssl=1" alt=""></p>
<p>And lastly when can use the following query to look for any changes of the audit.csv file on clients.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/09/092621_1955_DetectAudit10.png?w=540&#038;ssl=1" alt=""></p>
<p>I hope you enjoyed this blog post, you can find all the advanced hunting queries here on my GitHub</p>
<p><a href="https://github.com/alexverboon/MDATP/blob/master/AdvancedHunting/T1484.001%20Group%20Policy%20Modification.md">https://github.com/alexverboon/MDATP/blob/master/AdvancedHunting/T1484.001%20Group%20Policy%20Modification.md</a></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&amp;linkname=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&amp;linkname=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&amp;linkname=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&amp;linkname=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&amp;linkname=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&amp;linkname=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F09%2Fdetect-audit-policy-modifications-with-microsoft-365-defender%2F&#038;title=Detect%20%20Audit%20Policy%20Modifications%20with%20Microsoft%20365%20Defender" data-a2a-url="https://www.verboon.info/2021/09/detect-audit-policy-modifications-with-microsoft-365-defender/" data-a2a-title="Detect  Audit Policy Modifications with Microsoft 365 Defender"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8805</id>
    <title type="html"><![CDATA[Deploying Windows 11 in minutes with AutomatedLab]]></title>
    <updated>2021-08-26T19:01:11Z</updated>
    <published>2021-08-26T19:01:10Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/08/deploying-windows-11-in-minutes-with-automatedlab/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/08/deploying-windows-11-in-minutes-with-automatedlab/" />
    <category scheme="https://www.verboon.info" term="Automation" />
    <category scheme="https://www.verboon.info" term="Deployment" />
    <category scheme="https://www.verboon.info" term="PowerShell" />
    <category scheme="https://www.verboon.info" term="Windows11" />
    <summary type="html"><![CDATA[\ In this blog post I am going to show you how you can quickly (in 5 mintes) deploy Windows 11 in Hyper-V using the AutomatedLab PowerShell module. In fact the process is no different than when deploying other Windows <a class="more-link" href="https://www.verboon.info/2021/08/deploying-windows-11-in-minutes-with-automatedlab/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2010/09/a-quick-look-at-the-windows-powershell-module-for-intel-vpro/" rel="bookmark" title="A quick look at the Windows PowerShell Module for Intel vPro">A quick look at the Windows PowerShell Module for Intel vPro</a></li>
<li><a href="https://www.verboon.info/2016/09/powershell-script-to-run-the-windows-app-certification-kit/" rel="bookmark" title="PowerShell script to run the Windows App Certification Kit">PowerShell script to run the Windows App Certification Kit</a></li>
<li><a href="https://www.verboon.info/2017/02/download-and-install-the-windows-assessment-and-deployment-kit-with-powershell/" rel="bookmark" title="Download and Install the Windows Assessment and Deployment Kit with PowerShell">Download and Install the Windows Assessment and Deployment Kit with PowerShell</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/08/deploying-windows-11-in-minutes-with-automatedlab/"><![CDATA[<p><span style="font-size:1pt">\<br />
</span></p>
<p>In this blog post I am going to show you how you can quickly (in 5 mintes) deploy Windows 11 in Hyper-V using the AutomatedLab PowerShell module. In fact the process is no different than when deploying other Windows operating systems, but just in case you haven&#8217;t heard of the AutomatedLab yet and plan to install Windows 11 in a VM,  this might be a good opportunity to get familiar with it.</p>
<p>I am just going to assume that you have the Hyper-V role already enabled on your Windows 10 device. Follow the next steps to install the AutomatedLab PowerShell module, download the ISO and deploy your first VM.</p>
<p>Open Windows PowerShell as Administrator and run the following command to install the Automated lab.</p>
<p><span style="color:black; font-family:Consolas; font-size:9pt; background-color:#f8f8f8">Install-Module AutomatedLab -AllowClobber</span></p>
<p>Next run the following command to create the Lab sources folder</p>
<p><span style="color:black; font-family:Consolas; font-size:9pt; background-color:#f8f8f8">New-LabSourcesFolder -Drive C<br />
</span></p>
<p>Now we have to <a href="https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewiso?wa=wsignin1.0">download</a> the Windows 11 ISO file and save it in the lab sources \ ISO folder as shown below. Note to access the Windows Insider download page, you must be a member of the Windows Insider program.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi1.png?w=540&#038;ssl=1" alt=""></p>
<p>Now because the generic Product key isn&#8217;t known yet and the Automated lab looks for product keys here &#8220;C:\ProgramData\AutomatedLab\Assets\ProductKeys.xml&#8221; we have to tweak one script within the AutomatedLab module to skip the product key check. Depending on when you read this blog post, this step might no longer be necessary.</p>
<p>&#8220;C:\Program Files\WindowsPowerShell\Modules\AutomatedLab\5.39.0\AutomatedLabDisks.psm1&#8221;</p>
<p>And comment out line 28 – 34 as shown below</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi2.png?w=540&#038;ssl=1" alt=""></p>
<p>Okay, now we&#8217;re good to go. Here&#8217;s the Windows 11 Installation script that I created from the sample script: &#8220;C:\LabSources\SampleScripts\HyperV\Single 10 Client.ps1&#8221;. Note the value for the  &#8211;<strong>OperatingSystem</strong> parameter.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi3.png?w=540&#038;ssl=1" alt=""></p>
<p>To check what operating systems you can deploy, simply run the following command which will list all the OS versions and editions available in the AutomatedLab ISO source folder.</p>
<p><strong>Get-LabAvailableOperatingSystem<br />
</strong></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi4.png?w=540&#038;ssl=1" alt=""></p>
<p>Now let&#8217;s run our script and the deployment of Windows 11 starts</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi5.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi6.png?w=540&#038;ssl=1" alt=""></p>
<p>Note when you run <strong>AutomatedLab</strong> for the first time you will see some prompts related to PowerShell remoting.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi7.png?w=540&#038;ssl=1" alt=""></p>
<p>Also the very first time you install a certain version of Windows, AutomatedLab will create a base Image, this can take a while but speeds up future installations. See below, the second deployment only took 5 minutes and 10 seconds.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi8.png?w=540&#038;ssl=1" alt=""></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi9.png?w=540&#038;ssl=1" alt=""></p>
<p>Next connect to the VM, you&#8217;ll notice that the user Install is already logged on.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi10.png?w=540&#038;ssl=1" alt=""></p>
<p>Before we can use the client for further testing we have to configure a few settings that were used for the AutomatedLab deployment.</p>
<ul>
<li>Remove the Autologon of user Install<br />
Set the autologon count to 1 and remove the password.<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi11.png?w=540&#038;ssl=1" alt=""></li>
<li>Enable Windows Firewall<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi12.png?w=540&#038;ssl=1" alt=""></li>
<li>Enable UAC<br />
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082621_1859_DeployingWi13.png?w=540&#038;ssl=1" alt=""></li>
</ul>
<p>Reboot the device and continue using Windows 11 as you like. I hope I could demonstrate how easy it is to deploy Windows 11 or any other Windows OS into a VM within just a few minutes.</p>
<p>If you want to learn more about the AutomatedLab I suggest to check out the following sites:</p>
<p><a href="https://automatedlab.org/en/latest/">https://automatedlab.org/en/latest/</a></p>
<p><a href="https://github.com/AutomatedLab/AutomatedLab">https://github.com/AutomatedLab/AutomatedLab</a></p>
<p><a href="https://sysmansquad.com/2020/06/15/getting-started-with-automatedlab/">https://sysmansquad.com/2020/06/15/getting-started-with-automatedlab/</a></p>
<p>Enjoy Windows 11!</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&amp;linkname=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&amp;linkname=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&amp;linkname=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&amp;linkname=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&amp;linkname=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&amp;linkname=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fdeploying-windows-11-in-minutes-with-automatedlab%2F&#038;title=Deploying%20Windows%2011%20in%20minutes%20with%20AutomatedLab" data-a2a-url="https://www.verboon.info/2021/08/deploying-windows-11-in-minutes-with-automatedlab/" data-a2a-title="Deploying Windows 11 in minutes with AutomatedLab"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8789</id>
    <title type="html"><![CDATA[Use advanced hunting to Identify Defender clients with outdated definitions]]></title>
    <updated>2021-08-25T15:21:28Z</updated>
    <published>2021-08-25T15:21:28Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/" />
    <category scheme="https://www.verboon.info" term="defender" />
    <category scheme="https://www.verboon.info" term="Defender for Endpoint" />
    <category scheme="https://www.verboon.info" term="KQL" />
    <summary type="html"><![CDATA[In an ideal world all of our devices are fully patched and the Microsoft Defender antivirus agent has the latest definition updates installed. Unfortunately reality is often different. When using Microsoft Endpoint Manager we can find devices with outdated definition <a class="more-link" href="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2020/06/defender-atp-advanced-hunting-with-ti-from-urlhaus/" rel="bookmark" title="Defender ATP Advanced hunting with TI from URLhaus">Defender ATP Advanced hunting with TI from URLhaus</a></li>
<li><a href="https://www.verboon.info/2020/07/generating-advanced-hunting-queries-with-powershell/" rel="bookmark" title="Generating Advanced hunting queries with PowerShell">Generating Advanced hunting queries with PowerShell</a></li>
<li><a href="https://www.verboon.info/2019/11/how-to-generate-a-monthly-defender-atp-threat-and-vulnerability-report/" rel="bookmark" title="How to generate a monthly Defender ATP Threat and Vulnerability Report">How to generate a monthly Defender ATP Threat and Vulnerability Report</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/"><![CDATA[<p>In an ideal world all of our devices are fully patched and the Microsoft Defender antivirus agent has the latest definition updates installed. Unfortunately reality is often different. When using Microsoft Endpoint Manager we can find devices with outdated definition updates through the Microsoft Endpoint Manager portal as shown in the example below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082521_1519_Useadvanced1.png?w=540&#038;ssl=1" alt=""></p>
<p>Now in my opinion it must be the IT infrastructure operations team&#8217;s responsibility to ensure that devices get their patches installed and defender gets its platform and definition updates. But sometimes the reason for devices not getting updates is because the platform used to manage the deployment of these updates might have an issue, be on the backend or client side.</p>
<p>The good news is that if you have  Microsoft Defender for Endpoint deployed we can monitor the health of Microsoft Defender (and more) also through the information collected by Microsoft Defender for Endpoint. We can easily identify devices with outdated defender definition updates by using the Threat and Vulnerability portal or by using advanced hunting.</p>
<p>When opening the Threat and Vulnerability portal within Microsoft Defender for endpoint, select the recommendations blade and search for &#8216;Update Microsoft Defender&#8217;. You will see the recommendation as shown in the example below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082521_1519_Useadvanced2.png?w=540&#038;ssl=1" alt=""></p>
<p>When selecting the <strong>exposed devices</strong> tab, you get a list of all the devices where definitions are outdated.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082521_1519_Useadvanced3.png?w=540&#038;ssl=1" alt=""></p>
<p>Now while you can see the devices, we do not see the date of the currently installed definition update. Are the definitions 2 weeks old, 4 weeks or did the system never install definition updates at all?</p>
<p>KQL to the rescue ! Through advanced hunting we can gather additional information. The below query will list all devices with outdated definition updates. The results are enriched with information about the defender engine, platform version information as well as when the assessment was last conducted and when the device was last seen.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082521_1519_Useadvanced4.png?w=540&#038;ssl=1" alt=""></p>
<p>The following query allows you to search for devices where the last signature updated happened within a certain time period. <img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/08/082521_1519_Useadvanced5.png?w=540&#038;ssl=1" alt=""></p>
<p>You can find both advanced hunting queries in my GitHub repository here: <a href="https://github.com/alexverboon/MDATP/blob/master/AdvancedHunting/MDE%20-%20Outdated%20Defender%20Signatures.md">https://github.com/alexverboon/MDATP/blob/master/AdvancedHunting/MDE%20-%20Outdated%20Defender%20Signatures.md</a></p>
<p><strong>Credits!</strong> I would like to thank Jan Geisbauer @janvonkirchheim for the inspiration, Jan shared the <a href="https://github.com/jangeisbauer/AdvancedHunting/blob/master/AntiVirusReporting">initial KQL query</a> that served as the basis for the further development on this topic.</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&amp;linkname=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&amp;linkname=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&amp;linkname=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&amp;linkname=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&amp;linkname=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&amp;linkname=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F08%2Fuse-advanced-hunting-to-identify-defender-clients-with-outdated-definitions%2F&#038;title=Use%20advanced%20hunting%20to%20Identify%20Defender%20clients%20with%20outdated%20definitions" data-a2a-url="https://www.verboon.info/2021/08/use-advanced-hunting-to-identify-defender-clients-with-outdated-definitions/" data-a2a-title="Use advanced hunting to Identify Defender clients with outdated definitions"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8765</id>
    <title type="html"><![CDATA[Use Microsoft Endpoint Configuration Manager to Configure the Windows Print Spooler Service]]></title>
    <updated>2021-07-10T15:12:40Z</updated>
    <published>2021-07-10T15:07:17Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/" />
    <category scheme="https://www.verboon.info" term="Security" />
    <summary type="html"><![CDATA[Hello there, In my earlier post Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service – Anything about IT (verboon.info) I explained how to stop the Print Spooler service using Microsoft Endpoint Configuration Manager leveraging CMPivot to <a class="more-link" href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/" rel="bookmark" title="Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service">Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service</a></li>
<li><a href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/" rel="bookmark" title="How to remediate Defender for Endpoint onboarding with ConfigMgr">How to remediate Defender for Endpoint onboarding with ConfigMgr</a></li>
<li><a href="https://www.verboon.info/2015/06/the-system-center-configuration-manager-cmdlet-library/" rel="bookmark" title="The System Center Configuration Manager Cmdlet Library">The System Center Configuration Manager Cmdlet Library</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/"><![CDATA[<p>Hello there,</p>
<p>In <a href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/">my earlier post </a><a href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/">Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service – Anything about IT (verboon.info)</a><br />
I explained how to stop the Print Spooler service using Microsoft Endpoint Configuration Manager leveraging CMPivot to identify servers where the Print Spooler is running and the Run Script function to stop and disable the service. This method was intended as a first response action, however as new servers get deployed, we want to make sure the print spooler remains disabled, so we need a more permanent solution.</p>
<p>In this blog post I will explain how we can use Microsoft Endpoint Configuration Manager and a Configuration Baseline to ensure the Print Spooler is stopped and disabled. And yes, this blog post is intended for those who for whatever reason cannot or do not want to use AD Group Policy.</p>
<p>First download the scripts from my GitHub repo <a href="https://github.com/alexverboon/PowerShellCode/tree/main/PrintSpooler/MEMCMBaseLine">https://github.com/alexverboon/PowerShellCode/tree/main/PrintSpooler/MEMCMBaseLine</a> and save the locally as shown in the example below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof1.png?w=540&#038;ssl=1" alt=""></p>
<p>Next open the Microsoft Endpoint Configuration Manager and then Launch PowerShell ISE from the Console.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof2.png?w=540&#038;ssl=1" alt=""></p>
<p>Next load the function that is included in New-CMCIPrintSpoolerService.ps1 and then run the function that creates the Configuration Item in Microsoft Endpoint Configuration Manager.</p>
<p>. .\New-CMCIPrintSpoolerService.ps1</p>
<p>New-CMCIPrintSpoolerService -SiteCode P01 -SiteServer cm01.corp.net -Verbose</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof3.png?w=540&#038;ssl=1" alt=""></p>
<p>When all goes well , you now have a new Configuration Item.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof4.png?w=540&#038;ssl=1" alt=""></p>
<p>The CI has both the discovery script and remediation script embedded.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof5.png?w=540&#038;ssl=1" alt=""></p>
<p>Next create a configuration baseline and include the newly created configuration item.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof6.png?w=540&#038;ssl=1" alt=""></p>
<p>And finally deploy the configuration baseline to a device collection that includes all servers where the print spooler must be disabled. As soon as the device picks up the configuration baseline, you can verify the status on the device.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof7.png?w=540&#038;ssl=1" alt=""></p>
<p>Test the configuration baseline by setting the print spooler to automatic and/or start it, and then run the evaluation again.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof8.png?w=540&#038;ssl=1" alt=""></p>
<p>If all works as expected, the service is stopped and set to disabled.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/071021_1503_UseMicrosof9.png?w=540&#038;ssl=1" alt=""></p>
<p>You can find the scripts mentioned in this blog post here on GitHub: <a href="https://github.com/alexverboon/PowerShellCode/tree/main/PrintSpooler/MEMCMBaseLine">https://github.com/alexverboon/PowerShellCode/tree/main/PrintSpooler/MEMCMBaseLine</a></p>
<p>I would also like to refer to another <a href="https://thecollective.eu/blog/implement-workarounds-for-pinter-nightmare-with-mem/">blog post from Thijs Lecomte</a>, where he describes how to use MEM to deploy Print Spooler patches and configuration through Microsoft Intune.</p>
<p>Have a great day</p>
<p>Alex</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service%2F&#038;title=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20Configure%20the%20Windows%20Print%20Spooler%20Service" data-a2a-url="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-configure-the-windows-print-spooler-service/" data-a2a-title="Use Microsoft Endpoint Configuration Manager to Configure the Windows Print Spooler Service"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8739</id>
    <title type="html"><![CDATA[Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service]]></title>
    <updated>2021-07-05T08:32:29Z</updated>
    <published>2021-07-03T13:23:55Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/" />
    <category scheme="https://www.verboon.info" term="ConfigMgr" />
    <category scheme="https://www.verboon.info" term="Security" />
    <summary type="html"><![CDATA[Hello there, I guess by now, everyone has heard of the Windows Print Spooler Remote Code Execution Vulnerability (CVE-2021-34527). At this time Microsoft recommends disabling the Print Spooler service on domain controllers and on servers where it is not needed <a class="more-link" href="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2013/06/new-integration-service-guest-service-in-windows-8-1-hyper-v/" rel="bookmark" title="New Integration Service &ldquo;Guest Service&rdquo; in Windows 8.1 Hyper-V">New Integration Service &ldquo;Guest Service&rdquo; in Windows 8.1 Hyper-V</a></li>
<li><a href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/" rel="bookmark" title="How to remediate Defender for Endpoint onboarding with ConfigMgr">How to remediate Defender for Endpoint onboarding with ConfigMgr</a></li>
<li><a href="https://www.verboon.info/2010/03/windows-7-service-triggers/" rel="bookmark" title="Windows 7 Service Triggers">Windows 7 Service Triggers</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/"><![CDATA[<p>Hello there,</p>
<p>I guess by now, everyone has heard of the Windows Print Spooler Remote Code Execution Vulnerability (<a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527">CVE-2021-34527</a>). At this time Microsoft recommends disabling the Print Spooler service on domain controllers and on servers where it is not needed or to Disable inbound remote printing through Group Policy. In this short blog post I will demonstrate how you can use Microsoft Endpoint Configuration Manager to identify systems where the print spooler service is running and how to stop and disable the service.</p>
<p><strong>Disclaimer</strong>! I have only tested this in my lab so far.</p>
<h2>Identify Systems with the Print Spooler Service Running</h2>
<p>We can leverage CMPIvot to find systems where the print spooler service is running and configured to start automatically by running the following query:</p>
<pre class="lang:default decode:true">Services
| where Name == 'spooler'
| project Device,Startmode,State,Name 
</pre>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-8752" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?resize=540%2C271&#038;ssl=1" alt="" width="540" height="271" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?w=1760&amp;ssl=1 1760w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?resize=300%2C151&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?resize=1024%2C514&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?resize=768%2C386&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?resize=1536%2C771&amp;ssl=1 1536w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?w=1080&amp;ssl=1 1080w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/print_runs.png?w=1620&amp;ssl=1 1620w" sizes="auto, (max-width: 540px) 100vw, 540px" /></p>
<h2>Use Scripts to Stop and Disable the Print Spooler</h2>
<p>Import the following script into the Script library</p>
<pre class="lang:ps decode:true ">&lt;#
.Synopsis
  Disable Print Spooler Service
.DESCRIPTION
   Disable Print Spooler Service to mitigate the Windows Print Spooler Remote Code Execution Vulnerability
   https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527
.NOTES
  03.07.2021, v1.0.0, alex verboon
#&gt;
Begin{
    $PrintSpoolerState   = (Get-Service -Name Spooler).Status
    $PrintSpoolStartMode =  (Get-Service -Name Spooler).StartType
}
Process{
    If ($PrintSpoolerState -ne "Stopped"){
        Write-host "Print Spooler is not stopped, stopping it now"    
        Stop-Service -Name Spooler -Force
    }

    If ($PrintSpoolStartMode -ne "Disabled"){
        Write-host "Print Spooler is not disabled, disabling it now"    
        Set-Service -Name Spooler -StartupType Disabled
    }
}
End{}
</pre>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/070321_1315_UseMicrosof2.png?w=540&#038;ssl=1" alt="" /></p>
<h2>Disabling and Stopping the Print Spooler Service</h2>
<p>Now that we have our script within the script library, we can execute it on the device.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/070321_1315_UseMicrosof3.png?w=540&#038;ssl=1" alt="" /></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/070321_1315_UseMicrosof4.png?w=540&#038;ssl=1" alt="" /></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/070321_1315_UseMicrosof5.png?w=540&#038;ssl=1" alt="" /></p>
<p>Once executed when we run the query in CMPIvot again, we see that the Print Spooler service is now stopped and startup is disabled.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/07/070321_1315_UseMicrosof6.png?w=540&#038;ssl=1" alt="" /></p>
<h2>Enabling Print spooler startup</h2>
<p>Okay, we always need a rollback plan, so just in case something stops working and you need to revert the change, here’s how to set the start mode back to automatic and start the print spool service. You might want to import this script as well into the script library.</p>
<pre class="lang:ps decode:true">&lt;#
.Synopsis
  Enable Print Spooler Service
.DESCRIPTION
   Enable Print Spooler Service 
.NOTES
  03.07.2021, v1.0.0, alex verboon
#&gt;
Begin{
    $PrintSpoolerState   = (Get-Service -Name Spooler).Status
    $PrintSpoolStartMode =  (Get-Service -Name Spooler).StartType
}
Process{

    If ($PrintSpoolStartMode -ne "Automatic"){
        Write-host "Print Spooler is not set to autostart, configuring that now"    
        Set-Service -Name Spooler -StartupType Automatic
    }

    If ($PrintSpoolerState -ne "Running"){
        Write-host "Print Spooler is stopped, starting it now"    
        Start-Service -Name Spooler 
    }
}
End{}</pre>
<p>Hope this helps you with your mitigation actions.</p>
<p>Alex</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&amp;linkname=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F07%2Fuse-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service%2F&#038;title=Use%20Microsoft%20Endpoint%20Configuration%20Manager%20to%20stop%20the%20Windows%20Print%20Spooler%20Service" data-a2a-url="https://www.verboon.info/2021/07/use-microsoft-endpoint-configuration-manager-to-stop-the-windows-print-spooler-service/" data-a2a-title="Use Microsoft Endpoint Configuration Manager to stop the Windows Print Spooler Service"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8708</id>
    <title type="html"><![CDATA[How to remediate Defender for Endpoint onboarding with ConfigMgr]]></title>
    <updated>2021-02-25T19:06:31Z</updated>
    <published>2021-02-25T18:57:49Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/" />
    <category scheme="https://www.verboon.info" term="ConfigMgr" />
    <category scheme="https://www.verboon.info" term="Defender ATP" />
    <category scheme="https://www.verboon.info" term="Defender for Endpoint" />
    <category scheme="https://www.verboon.info" term="Deployment" />
    <category scheme="https://www.verboon.info" term="Microsoft Defender" />
    <summary type="html"><![CDATA[During the past 5 years I have onboarded a couple of thousand devices into Microsoft Defender for Endpoint and can say that, provided that you done your homework with regards to network connectivity, onboarding devices into Defender for Endpoint usually <a class="more-link" href="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2019/07/monitoring-windows-defender-cloud-protection-service-connectivity-with-configmgr/" rel="bookmark" title="Monitoring Windows Defender Cloud Protection Service connectivity with ConfigMgr">Monitoring Windows Defender Cloud Protection Service connectivity with ConfigMgr</a></li>
<li><a href="https://www.verboon.info/2020/10/deploying-defender-asr-block-persistence-through-wmi-event-subscription/" rel="bookmark" title="Deploying Defender ASR &#8211; Block persistence through WMI event subscription">Deploying Defender ASR &#8211; Block persistence through WMI event subscription</a></li>
<li><a href="https://www.verboon.info/2019/03/configuring-windows-defender-credential-guard-with-configmgr/" rel="bookmark" title="Configuring Windows Defender Credential Guard with ConfigMgr">Configuring Windows Defender Credential Guard with ConfigMgr</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/"><![CDATA[<p>During the past 5 years I have onboarded a couple of thousand devices into Microsoft Defender for Endpoint and can say that, provided that you done your homework with regards to network connectivity, onboarding devices into Defender for Endpoint usually just works. But as always in IT, there are exceptions.</p>
<p>Should you ever run into an issue with onboarding devices, I recommend checking the guidance provided here: <a href="https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-atp/troubleshoot-onboarding">Troubleshoot Microsoft Defender for Endpoint onboarding issues.</a> Now if you have just a couple of devices to manage you will most likely spot any missing device within the Defender for Endpoint management portal, but what If you have several hundred or even thousands of devices, how would you find out that that particular device Computer0073 in Building D1 on the 6<sup>th</sup> floor isn&#8217;t correctly onboarded?</p>
<p>If we take security seriously and apply good IT infrastructure hygiene, we must ensure that every managed device on the network is properly onboarded in Defender for Endpoint.</p>
<p>In this blogpost I will share a solution that we have put together recently to remediate onboarding devices that are managed by Microsoft Endpoint Configuration manager.</p>
<p>When managing devices with Microsoft Endpoint Configuration you are most likely using a Microsoft Defender for Endpoint policy to onboard devices into Microsoft Defender for Endpoint.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi1.png?w=540&#038;ssl=1" alt="" /></p>
<p>Microsoft Endpoint Configuration Manager the pushes down the onboarding policy just like any other configuration baseline and when executed the device is onboarded into Defender for Endpoint. You can verify the state on a client as shown in the example below.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi2.png?w=540&#038;ssl=1" alt="" /></p>
<p>Another way to check the onboarding state is to use CMPivot, run the following query to retrieve the MDE onboarding state.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi3.png?w=540&#038;ssl=1" alt="" /></p>
<p>You also want to check the sate of the services</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi4.png?w=540&#038;ssl=1" alt="" /></p>
<p>Now when it comes to onboarding issues, I have seen a couple of situations:</p>
<ul>
<li>The Sense service is not running because it is not set to start automatically</li>
<li>The Sense service is not running, although the service is set to start automatically</li>
</ul>
<p>On the troubleshooting page mentioned previously, Microsoft describes that this can happen when:</p>
<ul>
<li>Onboarding package is deployed to newly built devices</li>
<li>Sensor does not start because the Out-of-box experience (OOBE) or first user logon has not been completed</li>
<li>Device is turned off or restarted before the end user performs a first logon</li>
<li>In this scenario, the SENSE service will not start automatically even though onboarding package was deployed</li>
</ul>
<p>Sometimes just restarting the service works, another option is to just rerun the ConfigMgr compliance evaluation on the client either locally or by invoking the compliance evaluation remotely. But I have also seen devices where the onboarding policy on the device was broken.</p>
<p>When all of the above does not work, the final action that in most cases will always solve these issues is to re-run the onboarding script manually. But again, with hundreds or thousands of clients to manage you do not want to rely on a manual task, what we need is automation.</p>
<p>With Microsoft Endpoint Configuration manager, you have several options to identify systems that are not onboarded in Defender for Endpoint. When using manually created collections you will need to create two collections, one that has all the devices where the onboarding state value is set to 1 and another collection that excludes the collection with onboarding devices. This is because when the device is not onboarded there is no onboarding state attribute in the device&#8217;s inventory.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi5.png?w=540&#038;ssl=1" alt="" /></p>
<p>Below is the collection query for devices that are onboarded</p>
<p><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-8714" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/mde_query.png?resize=540%2C285&#038;ssl=1" alt="" width="540" height="285" srcset="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/mde_query.png?w=1242&amp;ssl=1 1242w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/mde_query.png?resize=300%2C158&amp;ssl=1 300w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/mde_query.png?resize=1024%2C541&amp;ssl=1 1024w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/mde_query.png?resize=768%2C406&amp;ssl=1 768w, https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/mde_query.png?w=1080&amp;ssl=1 1080w" sizes="auto, (max-width: 540px) 100vw, 540px" /></p>
<p>Great we now have visibility on devices that are not onboarded into defender for endpoint, so let us move on. To re-run the onboarding script on devices that have onboarding issues, we leverage the capability of the Microsoft Endpoint Configuration Manager compliance baselines.</p>
<p>My first idea was to simply embed the onboarding file , which is a batch script into a configuration item, but that turned out to be a cumbersome approach , so my colleague Athi (@AKugaseelan) came up with the idea to convert the onboarding script into a base64 string that we then embed into the remediation script.</p>
<p>To convert the onboarding file into the base64 string, download the onboarding file form the Defender for Endpoint portal. Here make sure to select the Group Policy version , because that script does not have a prompt to confirm the script execution. Once downloaded extract the script from the     ZIP file.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi7.png?w=540&#038;ssl=1" alt="" /></p>
<p>Next adjust the helper script <strong>$onbaordingScript</strong> variable and then run it.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi8.png?w=540&#038;ssl=1" alt="" /></p>
<p>Open the generated mdeonboardbase64.txt and copy the content into the clipboard</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi9.png?w=540&#038;ssl=1" alt="" /></p>
<p>Next, open the script CI_DefenderOnboarding_Remediation.ps1</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi10.png?w=540&#038;ssl=1" alt="" /></p>
<p>And then copy the previously generated base64 string into the script.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi11.png?w=540&#038;ssl=1" alt="" /></p>
<p>Now that we have the remediation script ready for our configuration item, we need to get it into Microsoft Endpoint Configuration Manager. You can create the CI manually and import the script or use the New-CMCIDefenderOnboarding_Remediation.ps1 script that I include in the source code that will create the CI for you.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi12.png?w=540&#038;ssl=1" alt="" /></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi13.png?w=540&#038;ssl=1" alt="" /></p>
<p>The CI has two scripts embedded.</p>
<ul>
<li>CI_DefenderOnboarding_Discovery.ps1</li>
<li>CI_DefenderOnboarding_Remediation.ps1</li>
</ul>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi14.png?w=540&#038;ssl=1" alt="" /></p>
<p>The CI_DefenderOnboarding_Discovery.ps1 script simply checks the onboarding status by querying the appropriate registry key.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi15.png?w=540&#038;ssl=1" alt="" /></p>
<p>The CI_DefenderOnboarding_Remediation.ps1 script does the following:</p>
<ol>
<li>Write the base64 encoded string that contains the content of the DefenderATPOnboardingscript.cmd to a temporary location</li>
<li>Executes the script</li>
<li>Removes the temporary script</li>
<li>Checks the onboarding state by querying the appropriate registry key</li>
</ol>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi16.png?w=540&#038;ssl=1" alt="" /></p>
<p>The CI is now in the Console so we can continue creating the configuration baseline.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi17.png?w=540&#038;ssl=1" alt="" /></p>
<p>When created, we deploy the configuration baseline to our collection that contains devices &#8216;not onboarded&#8217; into defender for endpoint.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi18.png?w=540&#038;ssl=1" alt="" /></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi19.png?w=540&#038;ssl=1" alt="" /></p>
<p>On the client we see that the device is not onboarded and the configuration baseline hasn&#8217;t run yet.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi20.png?w=540&#038;ssl=1" alt="" /></p>
<p>And as soon as the CI is triggered the device is successfully onboarded.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi21.png?w=540&#038;ssl=1" alt="" /></p>
<p>And after a while we have our client back under control.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/022521_1851_Howtoremedi22.png?w=540&#038;ssl=1" alt="" /></p>
<p>That is it for today, hope you found this useful and will help you with getting devices successfully onboarded into Defender for Endpoint. You find all the scripts referenced I this blog post in my GitHub repository here: <a href="https://github.com/alexverboon/PowerShellCode/tree/main/DefenderforEndpoint/Onboarding">https://github.com/alexverboon/PowerShellCode/tree/main/DefenderforEndpoint/Onboarding</a></p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&amp;linkname=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&amp;linkname=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&amp;linkname=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&amp;linkname=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&amp;linkname=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&amp;linkname=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fhow-to-remediate-defender-for-endpoint-onboarding-with-configmgr%2F&#038;title=How%20to%20remediate%20Defender%20for%20Endpoint%20onboarding%20with%20ConfigMgr" data-a2a-url="https://www.verboon.info/2021/02/how-to-remediate-defender-for-endpoint-onboarding-with-configmgr/" data-a2a-title="How to remediate Defender for Endpoint onboarding with ConfigMgr"></a></p>]]></content>
        </entry>
    <entry>
    <id>https://www.verboon.info/?p=8674</id>
    <title type="html"><![CDATA[Collecting AzureAD User Authentication Method Information]]></title>
    <updated>2021-02-07T13:31:42Z</updated>
    <published>2021-02-07T13:28:44Z</published>
    <author>
      <name>Alex Verboon</name>
      <email>alex@verboon.info</email>
<uri>http://www.verboon.info</uri>    </author>
    <link rel="replies" type="application/atom+xml" href="https://www.verboon.info/2021/02/collecting-azuread-user-authentication-method-information/feed/" thr:count="0"  />
    <link rel="alternate" href="https://www.verboon.info/2021/02/collecting-azuread-user-authentication-method-information/" />
    <category scheme="https://www.verboon.info" term="AzureAD" />
    <category scheme="https://www.verboon.info" term="MFA" />
    <category scheme="https://www.verboon.info" term="PowerShell" />
    <summary type="html"><![CDATA[Hello everyone, last Friday I received an e-mail from one of my customers, asking how to identify users in AzureAD that have enabled passwordless sign-in with the Microsoft Authenticator app. Previously I usually made use of the Script for Azure <a class="more-link" href="https://www.verboon.info/2021/02/collecting-azuread-user-authentication-method-information/">Read More ...</a><div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.verboon.info/2019/02/retrieving-azure-mfa-registration-status-with-powershell/" rel="bookmark" title="Retrieving Azure MFA registration status with PowerShell">Retrieving Azure MFA registration status with PowerShell</a></li>
<li><a href="https://www.verboon.info/2018/01/retrieving-windows-defender-atp-query-api-data-with-powershell/" rel="bookmark" title="Retrieving Windows Defender ATP query API data with PowerShell">Retrieving Windows Defender ATP query API data with PowerShell</a></li>
<li><a href="https://www.verboon.info/2018/02/collecting-nettcpconnection-and-process-information-with-powershell/" rel="bookmark" title="Collecting NetTcpConnection and Process information with PowerShell">Collecting NetTcpConnection and Process information with PowerShell</a></li>
</ol>
</div>
]]></summary>
      <content type="html" xml:base="https://www.verboon.info/2021/02/collecting-azuread-user-authentication-method-information/"><![CDATA[<p>Hello everyone, last Friday I received an e-mail from one of my customers, asking how to identify users in AzureAD that have enabled <a href="https://docs.microsoft.com/en-us/azure/active-directory/authentication/howto-authentication-passwordless-phone">passwordless sign-in with the Microsoft Authenticator app</a>. Previously I usually made use of the <a href="https://docs.microsoft.com/en-us/samples/azure-samples/azure-mfa-authentication-method-analysis/azure-mfa-authentication-method-analysis/">Script for Azure MFA authentication method analysis</a> but that script uses the MSOnline PowerShell mode where the Get-Msoluser cmdlet doesn&#8217;t expose the information about these newer Authentication Methods.</p>
<p>So heading over to Microsoft Graph and there we can grab all the Authentication Methods for users as shown in the example below</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/020721_1322_CollectingA1.png?w=540&#038;ssl=1" alt=""></p>
<p>So, I created <a href="https://github.com/alexverboon/PowerShellCode/tree/main/AzureAD/MFA/MfaAuthMethodsAnalysisV2"><strong>Get-AzureADUserAuthMethodInventory.ps1</strong></a><strong>, </strong>the script first retrieves all users in AzureAD and then retrieves the registered authentication methods for each user.</p>
<p>If you have not done so yet, install the Microsoft Graph PowerShell modules</p>
<p><span style="color: #000080;">find-module -name &#8220;Microsoft.graph&#8221; | Install-module -Scope CurrentUser</span></p>
<p><span style="color: #000080;">find-module -name Microsoft.Graph.Identity.AuthenticationMethods | install-module -Scope CurrentUser</span></p>
<p>Then run the following command</p>
<p><span style="color: #000080;">Connect-Graph -Scopes @(&#8220;UserAuthenticationMethod.Read.All&#8221;, &#8220;User.Read.All&#8221; )</span></p>
<p>Follow the instructions and grant consent</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/020721_1322_CollectingA2.png?w=540&#038;ssl=1" alt=""></p>
<p>And finally run the script</p>
<p><span style="color: #000080;">$AuthInfo = .\Get-AzureADUserAuthMethodInventory.ps1</span></p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/020721_1322_CollectingA3.png?w=540&#038;ssl=1" alt=""></p>
<p>For each user found in AzureAD the following information is collected</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/020721_1322_CollectingA4.png?w=540&#038;ssl=1" alt=""></p>
<p>Filter the results as needed.</p>
<p><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.verboon.info/wp-content/uploads/2021/02/020721_1322_CollectingA5.png?w=540&#038;ssl=1" alt=""></p>
<p>The script and instructions can be found on GitHub here: <a href="https://github.com/alexverboon/PowerShellCode/tree/main/AzureAD/MFA/MfaAuthMethodsAnalysisV2">https://github.com/alexverboon/PowerShellCode/tree/main/AzureAD/MFA/MfaAuthMethodsAnalysisV2</a></p>
<p>Hope you liked this blog post, as always feedback is welcome</p>
<p>Alex</p>
<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&amp;linkname=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_email" href="https://www.addtoany.com/add_to/email?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&amp;linkname=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" title="Email" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&amp;linkname=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&amp;linkname=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&amp;linkname=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&amp;linkname=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd a2a_counter addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.verboon.info%2F2021%2F02%2Fcollecting-azuread-user-authentication-method-information%2F&#038;title=Collecting%20AzureAD%20User%20Authentication%20Method%20Information" data-a2a-url="https://www.verboon.info/2021/02/collecting-azuread-user-authentication-method-information/" data-a2a-title="Collecting AzureAD User Authentication Method Information"></a></p>]]></content>
        </entry>
  </feed>
