Alert when a group is added to a sensitive Active Directory group

Published Jun 07 2022 09:00 AM 5,865 Views
Contributor

Hi everyone, it’s Gershon, back again with a follow up to my last blog where we were able to track changes to sensitive groups with Advanced Hunting in Microsoft 365 Defender.  One of the questions I had from a customer after they read through the blog was “how can we be alerted directly when a group has been added to a sensitive group?”. This is a great question to focus on, as this scenario should not be commonplace in an established environment, as nested group memberships in sensitive groups should not be something that changes after initial set up. Additionally, adding a group to another group is a quick and easy way to add users to a sensitive group and making sure it’s highlighted quickly could stop an attacker from gaining persistence.  

 

We will start by assuming that all the steps from my previous blog have been completed, where we can see all the changes to the groups we defined as sensitive.

 

In this blog, we will take things further by:

  • Updating the advanced hunting query to focus on groups that are added to a sensitive group.
  • Validating that the query works as expected.
  • Creating a custom detection policy based on the advanced query.
  • Testing out the custom detection policy.

 

Updating the advanced hunting query to show additions of a group to a sensitive group.

 

Starting with the query from the last blog as a starting point, we will make a few changes that focuses on activities that occur when adding a group to a sensitive group.

 

In the last line, we will also add the “AccountSid” column as this can be used in the custom detection policy, covered later in this entry.

 

 

let SensitiveGroupName = pack_array(  // Declare Sensitive Group names. Add any groups that you manually tagged as sensitive
    'Account Operators',
    'Administrators',
    'Domain Admins', 
    'Backup Operators',
    'Domain Controllers',
    'Enterprise Admins',
    'Enterprise Read-only Domain Controllers',
    'Group Policy Creator Owners',
    'Incoming Forest Trust Builders',
    'Microsoft Exchange Servers',
    'Network Configuration Operators',
    'Print Operators',
    'Read-only Domain Controllers',
    'Replicator',
    'Schema Admins',
    'Server Operators'
);
IdentityDirectoryEvents
| where Application == "Active Directory"
| where ActionType == "Group Membership changed"
| where DestinationDeviceName != "" // Exclude activities coming from AD Sync changes
| extend GroupModified = tostring(parse_json(AdditionalFields).["TO.GROUP"]) // Extracts the group name if action is add enity to a group.
| where GroupModified in~ (SensitiveGroupName)
| extend GroupAdded = tostring(parse_json(AdditionalFields).["TARGET_OBJECT.GROUP"])
| where GroupAdded  != "" // only show activites that are group being added to another group
| project Timestamp, GroupModified, GroupAdded, Actor=AccountName, Actor_UPN=AccountUpn, ActorSid=AccountSid, AccountSid, ActorDomain=AccountDomain, DC=DestinationDeviceName, ReportId, AdditionalFields
| sort by Timestamp desc 

 

 

 

GersonLevitz_5-1654243502720.png

 

 As you can see here, the results only show groups that have been added to a sensitive group.

 

If you don’t see any results when you run your query, you can either change the time range or add a group to one of the sensitive groups listed in the array at the beginning of the query.

 

Create a custom detection policy

 

After you are comfortable with the query, we can now create the custom detection rule.

  1. Click “Create detection rule” on the top right corner.

GersonLevitz_3-1654505100399.png

 

GersonLevitz_4-1654243438408.png

 

 

  1. On the alert details page enter the required information and click Next. See the screenshot below.

The customer I was working with selected High for Severity as this is not something that should happen often, if at all, in their environment.

For the MITRE techniques the customer chose:

  • T1078 Valid Accounts
  • T1078:002 Domain Accounts
  • T1548 Abuse Elevation Control Mechanism

GersonLevitz_0-1654504769536.png

 

  1. On the Impacted entities page, select User and AccountSid and then click Next. This is the reason we needed to add the AccountSid column in the project line in the query earlier.                                                                                                     GersonLevitz_1-1654504800484.png

     

  2. On the Actions page expand Users. If you have configured an action account in the Defender for Identity settings page, you will have the option to select Disable user and Force password reset actions. If you select one of these actions, Microsoft Defender 365 will attempt to disable the user or reset the user’s password in Active Directory. Click Next to move to the Summary page.GersonLevitz_2-1654504832995.png
  3. On the Summary page, review the rule you’ve created and click Submit.
  4. You will now see the custom detection listed on the Detection rules page

GersonLevitz_4-1654505109829.png

 

Test new custom detection rule

 

Now we want to test that the new rule is working as expected.

 

In Active Directory, create a new group and add this group to a sensitive group. In my lab I created a group named “TestGroupforBlog” and added it as a member of “Domain Admins.”

 

There are different ways that we can search for the alert. Here is one way:

  1. In the Microsoft 365 Defender portal, click on Alerts and then click on Filters.
  2. In the filter pane, click Clear filters, and under Service Sources expand Microsoft 365 Defender and select Custom Detection.GersonLevitz_0-1654500463942.png

     

  3. Click Apply.
  4. Find the alert with title given when you created the custom detection policy earlier and click on the alert to see the details.GersonLevitz_1-1654500507736.png

     

  5. To see the activities that triggered this alert click Query results (1). You can see the sensitive group that was modified (2), the group that was added to the sensitive group (3) and the user who made this change (4).

     

    GersonLevitz_2-1654500718984.png

 

If this is an approved legitimate change, we would want to update the Advanced Hunting query to include this group in the list of sensitive group list for this query and for the query from the previous blog.

 

If this was an unauthorized change, we should continue to investigate the user to see:

  • additional activities they have performed
  • additional alerts open for the user
  • devices the user has logged in to

We can do this using data from all the products in Microsoft 365 Defender.

For more information on investigating threats see, https://docs.microsoft.com/en-us/microsoft-365/security/defender/incidents-overview?view=o365-worldw....

 

So to recap, you just created a query to show activities when a group is added to a sensitive group and then you created a custom detection policy. Congratulations! Feel free to save this query, then customize it further to suit your organization’s needs.

 

If you find the query and custom detection policy helpful, please leave a comment, or use the comment space to tell us what you’ve done to make this query even more powerful in your organization. Please let us know what areas you want to see us tackle next in Advanced Hunting. We can’t wait to hear your ideas. Happy hunting!

%3CLINGO-SUB%20id%3D%22lingo-sub-3436868%22%20slang%3D%22en-US%22%3EAlert%20when%20a%20group%20is%20added%20to%20a%20sensitive%20Active%20Directory%20group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3436868%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%20it%E2%80%99s%20Gershon%2C%20back%20again%20with%20a%20follow%20up%20to%20my%20last%20blog%20where%20we%20were%20able%20to%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fmdi%2Fblogs%2Ftrackgroupchanges%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Etrack%20changes%20to%20sensitive%20groups%20with%20Advanced%20Hunting%20in%20Microsoft%20365%20Defender%3C%2FA%3E.%20%26nbsp%3BOne%20of%20the%20questions%20I%20had%20from%20a%20customer%20after%20they%20read%20through%20the%20blog%20was%20%E2%80%9Chow%20can%20we%20be%20alerted%20directly%20when%20a%20%3CSTRONG%3Egroup%3C%2FSTRONG%3E%20has%20been%20added%20to%20a%20sensitive%20group%3F%E2%80%9D.%20This%20is%20a%20great%20question%20to%20focus%20on%2C%20as%20this%20scenario%20should%20not%20be%20commonplace%20in%20an%20established%20environment%2C%20as%20nested%20group%20memberships%20in%20sensitive%20groups%20should%20not%20be%20something%20that%20changes%20after%20initial%20set%20up.%20Additionally%2C%20adding%20a%20group%20to%20another%20group%20is%20a%20quick%20and%20easy%20way%20to%20add%20users%20to%20a%20sensitive%20group%20and%20making%20sure%20it%E2%80%99s%20highlighted%20quickly%20could%20stop%20an%20attacker%20from%20gaining%20persistence.%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20will%20start%20by%20assuming%20that%20all%20the%20steps%20from%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fmdi%2Fblogs%2Ftrackgroupchanges%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Emy%20previous%20blog%3C%2FA%3E%3CSPAN%3E%20have%20been%20completed%3C%2FSPAN%3E%2C%20where%20we%20can%20see%20all%20the%20changes%20to%20the%20groups%20we%20defined%20as%20sensitive.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20blog%2C%20we%20will%20take%20things%20further%20by%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EUpdating%20the%20advanced%20hunting%20query%20to%20focus%20on%20groups%20that%20are%20added%20to%20a%20sensitive%20group.%3C%2FLI%3E%0A%3CLI%3EValidating%20that%20the%20query%20works%20as%20expected.%3C%2FLI%3E%0A%3CLI%3ECreating%20a%20custom%20detection%20policy%20based%20on%20the%20advanced%20query.%3C%2FLI%3E%0A%3CLI%3ETesting%20out%20the%20custom%20detection%20policy.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-447385622%22%20id%3D%22toc-hId-451131412%22%3EUpdating%20the%20advanced%20hunting%20query%20to%20show%20additions%20of%20a%20group%20to%20a%20sensitive%20group.%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EStarting%20with%20the%20query%20from%20the%20last%20blog%20as%20a%20starting%20point%2C%20we%20will%20make%20a%20few%20changes%20that%20focuses%20on%20activities%20that%20occur%20when%20adding%20a%20group%20to%20a%20sensitive%20group.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20last%20line%2C%20we%20will%20also%20add%20the%20%E2%80%9CAccountSid%E2%80%9D%20column%20as%20this%20can%20be%20used%20in%20the%20custom%20detection%20policy%2C%20covered%20later%20in%20this%20entry.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powerquery%22%3E%3CCODE%3Elet%20SensitiveGroupName%20%3D%20pack_array(%20%20%2F%2F%20Declare%20Sensitive%20Group%20names.%20Add%20any%20groups%20that%20you%20manually%20tagged%20as%20sensitive%0A%20%20%20%20'Account%20Operators'%2C%0A%20%20%20%20'Administrators'%2C%0A%20%20%20%20'Domain%20Admins'%2C%20%0A%20%20%20%20'Backup%20Operators'%2C%0A%20%20%20%20'Domain%20Controllers'%2C%0A%20%20%20%20'Enterprise%20Admins'%2C%0A%20%20%20%20'Enterprise%20Read-only%20Domain%20Controllers'%2C%0A%20%20%20%20'Group%20Policy%20Creator%20Owners'%2C%0A%20%20%20%20'Incoming%20Forest%20Trust%20Builders'%2C%0A%20%20%20%20'Microsoft%20Exchange%20Servers'%2C%0A%20%20%20%20'Network%20Configuration%20Operators'%2C%0A%20%20%20%20'Print%20Operators'%2C%0A%20%20%20%20'Read-only%20Domain%20Controllers'%2C%0A%20%20%20%20'Replicator'%2C%0A%20%20%20%20'Schema%20Admins'%2C%0A%20%20%20%20'Server%20Operators'%0A)%3B%0AIdentityDirectoryEvents%0A%7C%20where%20Application%20%3D%3D%20%22Active%20Directory%22%0A%7C%20where%20ActionType%20%3D%3D%20%22Group%20Membership%20changed%22%0A%7C%20where%20DestinationDeviceName%20!%3D%20%22%22%20%2F%2F%20Exclude%20activities%20coming%20from%20AD%20Sync%20changes%0A%7C%20extend%20GroupModified%20%3D%20tostring(parse_json(AdditionalFields).%5B%22TO.GROUP%22%5D)%20%2F%2F%20Extracts%20the%20group%20name%20if%20action%20is%20add%20enity%20to%20a%20group.%0A%7C%20where%20GroupModified%20in~%20(SensitiveGroupName)%0A%7C%20extend%20GroupAdded%20%3D%20tostring(parse_json(AdditionalFields).%5B%22TARGET_OBJECT.GROUP%22%5D)%0A%7C%20where%20GroupAdded%20%20!%3D%20%22%22%20%2F%2F%20only%20show%20activites%20that%20are%20group%20being%20added%20to%20another%20group%0A%7C%20project%20Timestamp%2C%20GroupModified%2C%20GroupAdded%2C%20Actor%3DAccountName%2C%20Actor_UPN%3DAccountUpn%2C%20ActorSid%3DAccountSid%2C%20AccountSid%2C%20ActorDomain%3DAccountDomain%2C%20DC%3DDestinationDeviceName%2C%20ReportId%2C%20AdditionalFields%0A%7C%20sort%20by%20Timestamp%20desc%20%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_5-1654243502720.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_5-1654243502720.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377365i5C2CF001EA5C8B25%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22GersonLevitz_5-1654243502720.png%22%20alt%3D%22GersonLevitz_5-1654243502720.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3BAs%20you%20can%20see%20here%2C%20the%20results%20only%20show%20groups%20that%20have%20been%20added%20to%20a%20sensitive%20group.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20don%E2%80%99t%20see%20any%20results%20when%20you%20run%20your%20query%2C%20you%20can%20either%20change%20the%20time%20range%20or%20add%20a%20group%20to%20one%20of%20the%20sensitive%20groups%20listed%20in%20the%20array%20at%20the%20beginning%20of%20the%20query.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1360068841%22%20id%3D%22toc-hId--1356323051%22%3ECreate%20a%20custom%20detection%20policy%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20you%20are%20comfortable%20with%20the%20query%2C%20we%20can%20now%20create%20the%20custom%20detection%20rule.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EClick%20%E2%80%9CCreate%20detection%20rule%E2%80%9D%20on%20the%20top%20right%20corner.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_3-1654505100399.png%22%20style%3D%22width%3A%20659px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_3-1654505100399.png%22%20style%3D%22width%3A%20659px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377768i25C2C7404DAB2B4F%2Fimage-dimensions%2F659x78%3Fv%3Dv2%22%20width%3D%22659%22%20height%3D%2278%22%20role%3D%22button%22%20title%3D%22GersonLevitz_3-1654505100399.png%22%20alt%3D%22GersonLevitz_3-1654505100399.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_4-1654243438408.png%22%20style%3D%22width%3A%20672px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_4-1654243438408.png%22%20style%3D%22width%3A%20672px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377364iAB6BED4214216AAF%2Fimage-dimensions%2F672x331%3Fv%3Dv2%22%20width%3D%22672%22%20height%3D%22331%22%20role%3D%22button%22%20title%3D%22GersonLevitz_4-1654243438408.png%22%20alt%3D%22GersonLevitz_4-1654243438408.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EOn%20the%20alert%20details%20page%20enter%20the%20required%20information%20and%20click%20%3CSTRONG%3ENext%3C%2FSTRONG%3E.%20See%20the%20screenshot%20below.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EThe%20customer%20I%20was%20working%20with%20selected%20%3CSTRONG%3EHigh%3C%2FSTRONG%3E%20for%20%3CSTRONG%3ESeverity%3C%2FSTRONG%3E%20as%20this%20is%20not%20something%20that%20should%20happen%20often%2C%20if%20at%20all%2C%20in%20their%20environment.%3C%2FP%3E%0A%3CP%20style%3D%22%20padding-left%20%3A%2030px%3B%20%22%3EFor%20the%20MITRE%20techniques%20the%20customer%20chose%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ET1078%20Valid%20Accounts%3C%2FLI%3E%0A%3CLI%3ET1078%3A002%20Domain%20Accounts%3C%2FLI%3E%0A%3CLI%3ET1548%20Abuse%20Elevation%20Control%20Mechanism%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_0-1654504769536.png%22%20style%3D%22width%3A%20683px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_0-1654504769536.png%22%20style%3D%22width%3A%20683px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377765i6F335BDAC67FC8D0%2Fimage-dimensions%2F683x596%3Fv%3Dv2%22%20width%3D%22683%22%20height%3D%22596%22%20role%3D%22button%22%20title%3D%22GersonLevitz_0-1654504769536.png%22%20alt%3D%22GersonLevitz_0-1654504769536.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EOn%20the%20%3CSTRONG%3EImpacted%20entities%3C%2FSTRONG%3E%20page%2C%20select%20%3CSTRONG%3EUser%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EAccountSid%3C%2FSTRONG%3E%20and%20then%20click%20%3CSTRONG%3ENext%3C%2FSTRONG%3E.%20This%20is%20the%20reason%20we%20needed%20to%20add%20the%20AccountSid%20column%20in%20the%20project%20line%20in%20the%20query%20earlier.%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_1-1654504800484.png%22%20style%3D%22width%3A%20712px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_1-1654504800484.png%22%20style%3D%22width%3A%20712px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377766i484B324984116DCB%2Fimage-dimensions%2F712x707%3Fv%3Dv2%22%20width%3D%22712%22%20height%3D%22707%22%20role%3D%22button%22%20title%3D%22GersonLevitz_1-1654504800484.png%22%20alt%3D%22GersonLevitz_1-1654504800484.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EOn%20the%20%3CSTRONG%3EActions%3C%2FSTRONG%3E%20page%20expand%20%3CSTRONG%3EUsers%3C%2FSTRONG%3E.%20If%20you%20have%20configured%20an%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsecurity-compliance-and-identity%2Fmicrosoft-defender-for-identity-response-actions%2Fba-p%2F3271716%22%20target%3D%22_blank%22%3Eaction%20account%3C%2FA%3E%20in%20the%20Defender%20for%20Identity%20settings%20page%2C%20you%20will%20have%20the%20option%20to%20select%20%3CSTRONG%3EDisable%20user%20%3C%2FSTRONG%3Eand%20%3CSTRONG%3EForce%20password%20reset%3C%2FSTRONG%3E%20actions.%20If%20you%20select%20one%20of%20these%20actions%2C%20Microsoft%20Defender%20365%20will%20attempt%20to%20disable%20the%20user%20or%20reset%20the%20user%E2%80%99s%20password%20in%20Active%20Directory.%20Click%20%3CSTRONG%3ENext%3C%2FSTRONG%3E%20to%20move%20to%20the%20%3CSTRONG%3ESummary%3C%2FSTRONG%3E%20page.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_2-1654504832995.png%22%20style%3D%22width%3A%20665px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_2-1654504832995.png%22%20style%3D%22width%3A%20665px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377767i6E7C4005AD39963E%2Fimage-dimensions%2F665x616%3Fv%3Dv2%22%20width%3D%22665%22%20height%3D%22616%22%20role%3D%22button%22%20title%3D%22GersonLevitz_2-1654504832995.png%22%20alt%3D%22GersonLevitz_2-1654504832995.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3EOn%20the%20Summary%20page%2C%20review%20the%20rule%20you%E2%80%99ve%20created%20and%20click%20%3CSTRONG%3ESubmit.%20%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EYou%20will%20now%20see%20the%20custom%20detection%20listed%20on%20the%20%3CSTRONG%3EDetection%20rules%3C%2FSTRONG%3E%20page%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_4-1654505109829.png%22%20style%3D%22width%3A%20797px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_4-1654505109829.png%22%20style%3D%22width%3A%20797px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377769i7C29803E0F648CDD%2Fimage-dimensions%2F797x95%3Fv%3Dv2%22%20width%3D%22797%22%20height%3D%2295%22%20role%3D%22button%22%20title%3D%22GersonLevitz_4-1654505109829.png%22%20alt%3D%22GersonLevitz_4-1654505109829.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1127443992%22%20id%3D%22toc-hId-1131189782%22%3ETest%20new%20custom%20detection%20rule%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20we%20want%20to%20test%20that%20the%20new%20rule%20is%20working%20as%20expected.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20Active%20Directory%2C%20create%20a%20new%20group%20and%20add%20this%20group%20to%20a%20sensitive%20group.%20In%20my%20lab%20I%20created%20a%20group%20named%20%E2%80%9CTestGroupforBlog%E2%80%9D%20and%20added%20it%20as%20a%20member%20of%20%E2%80%9CDomain%20Admins.%E2%80%9D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20different%20ways%20that%20we%20can%20search%20for%20the%20alert.%20Here%20is%20one%20way%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EIn%20the%20Microsoft%20365%20Defender%20portal%2C%20click%20on%20%3CSTRONG%3EAlerts%3C%2FSTRONG%3E%20and%20then%20click%20on%20%3CSTRONG%3EFilters%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3EIn%20the%20filter%20pane%2C%20click%20%3CSTRONG%3EClear%20filters%3C%2FSTRONG%3E%2C%20and%20under%20%3CSTRONG%3EService%20Sources%3C%2FSTRONG%3E%20expand%20%3CSTRONG%3EMicrosoft%20365%20Defender%3C%2FSTRONG%3E%20and%20select%20%3CSTRONG%3ECustom%20Detection%3C%2FSTRONG%3E.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_0-1654500463942.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_0-1654500463942.png%22%20style%3D%22width%3A%20693px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377757i9C2878977EE6FD1B%2Fimage-dimensions%2F693x1315%3Fv%3Dv2%22%20width%3D%22693%22%20height%3D%221315%22%20role%3D%22button%22%20title%3D%22GersonLevitz_0-1654500463942.png%22%20alt%3D%22GersonLevitz_0-1654500463942.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3EClick%20%3CSTRONG%3EApply%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3EFind%20the%20alert%20with%20title%20given%20when%20you%20created%20the%20custom%20detection%20policy%20earlier%20and%20click%20on%20the%20alert%20to%20see%20the%20details.%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_1-1654500507736.png%22%20style%3D%22width%3A%20756px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_1-1654500507736.png%22%20style%3D%22width%3A%20756px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377758i9D5279A0C35A1A6A%2Fimage-dimensions%2F756x132%3Fv%3Dv2%22%20width%3D%22756%22%20height%3D%22132%22%20role%3D%22button%22%20title%3D%22GersonLevitz_1-1654500507736.png%22%20alt%3D%22GersonLevitz_1-1654500507736.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3ETo%20see%20the%20activities%20that%20triggered%20this%20alert%20click%20%3CSTRONG%3EQuery%20results%3C%2FSTRONG%3E%20(1).%20You%20can%20see%20the%20sensitive%20group%20that%20was%20modified%20(2)%2C%20the%20group%20that%20was%20added%20to%20the%20sensitive%20group%20(3)%20and%20the%20user%20who%20made%20this%20change%20(4).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GersonLevitz_2-1654500718984.png%22%20style%3D%22width%3A%20746px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GersonLevitz_2-1654500718984.png%22%20style%3D%22width%3A%20746px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377759iC18066CE77805128%2Fimage-dimensions%2F746x402%3Fv%3Dv2%22%20width%3D%22746%22%20height%3D%22402%22%20role%3D%22button%22%20title%3D%22GersonLevitz_2-1654500718984.png%22%20alt%3D%22GersonLevitz_2-1654500718984.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20this%20is%20an%20approved%20legitimate%20change%2C%20we%20would%20want%20to%20update%20the%20Advanced%20Hunting%20query%20to%20include%20this%20group%20in%20the%20list%20of%20sensitive%20group%20list%20for%20this%20query%20and%20for%20the%20query%20from%20the%20previous%20blog.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20this%20was%20an%20unauthorized%20change%2C%20we%20should%20continue%20to%20investigate%20the%20user%20to%20see%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3Eadditional%20activities%20they%20have%20performed%3C%2FLI%3E%0A%3CLI%3Eadditional%20alerts%20open%20for%20the%20user%3C%2FLI%3E%0A%3CLI%3Edevices%20the%20user%20has%20logged%20in%20to%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWe%20can%20do%20this%20using%20data%20from%20all%20the%20products%20in%20Microsoft%20365%20Defender.%3C%2FP%3E%0A%3CP%3EFor%20more%20information%20on%20investigating%20threats%20see%2C%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fsecurity%2Fdefender%2Fincidents-overview%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fsecurity%2Fdefender%2Fincidents-overview%3Fview%3Do365-worldwide%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20to%20recap%2C%20you%20just%20created%20a%20query%20to%20show%20activities%20when%20a%20group%20is%20added%20to%20a%20sensitive%20group%20and%20then%20you%20created%20a%20custom%20detection%20policy.%20Congratulations!%20Feel%20free%20to%20save%20this%20query%2C%20then%20customize%20it%20further%20to%20suit%20your%20organization%E2%80%99s%20needs.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20find%20the%20query%20and%20custom%20detection%20policy%20helpful%2C%20please%20leave%20a%20comment%2C%20or%20use%20the%20comment%20space%20to%20tell%20us%20what%20you%E2%80%99ve%20done%20to%20make%20this%20query%20even%20more%20powerful%20in%20your%20organization.%20Please%20let%20us%20know%20what%20areas%20you%20want%20to%20see%20us%20tackle%20next%20in%20Advanced%20Hunting.%20We%20can%E2%80%99t%20wait%20to%20hear%20your%20ideas.%20Happy%20hunting!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-3436868%22%20slang%3D%22en-US%22%3E%3CP%3EUpdating%20the%20advanced%20hunting%20query%20to%20show%20additions%20of%20a%20group%20to%20a%20sensitive%20group%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MSFT_SCI_Secure_Identity_02.jpg%22%20style%3D%22width%3A%20539px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22MSFT_SCI_Secure_Identity_02.jpg%22%20style%3D%22width%3A%20539px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F377869i0E1EEA347D43550D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22MSFT_SCI_Secure_Identity_02.jpg%22%20alt%3D%22MSFT_SCI_Secure_Identity_02.jpg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3436868%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20365%20Defender%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Defender%20for%20Identity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jun 06 2022 10:53 AM
Updated by: