Chapter 1

Mitigate threats using Microsoft 365 Defender

In recent years, the proliferation of endpoint protection, detection, and response technologies enabled security operations teams to gain better visibility into attacks that target endpoints. This is one reason that dwell time—the measurement of time between the start of an incident and when a security operations team detects the intrusion—has decreased from a 78-day median in 2019 to 56 days in 2020 (Source: FireEye 2020 M-Trends). Unfortunately, this trend also encouraged malicious actors to increase their use of other attack vectors, such as email, cloud applications, and identities. These additional attack vectors pressure security teams to cover more ground in these additional domains, making it increasingly difficult for incident responders to effectively protect, detect, and respond to these threats.

Microsoft 365 Defender helps security operations teams respond to threats across these domains by providing the following features:

  • Consolidated incident model

  • Consolidated portal

  • Automated self-healing

  • Cross-product hunting

Skills covered in this chapter:

Skill 1-1: Detect, investigate, respond, and remediate threats to the productivity environment using Microsoft Defender for Office 365

Attackers use email and Microsoft Office documents to gain initial entry into targeted systems. Microsoft Defender for Office 365 can identify, alert, block, and remediate these attacks. If an attacker is successful gaining a foothold in the targeted system, sensitive data could be at risk to theft. Configuring data loss prevention policies, sensitivity labels, and insider risk policies can protect this data, and alert security and compliance teams of the attempted exfiltration.

Examine a malicious spear phishing email

One popular attack vector is credential harvesting via spear phishing coupled with a forged login page. MITRE ATT&CK defines spear phishing as “an attempt to trick targets into divulging information, frequently credentials, or other actionable information.” The spear phishing email in Figure 1-1 appears to be from Bob Smith, the Contoso Corporation CEO. The email was sent to Paul DePaul, CFO of Contoso Corporation, and asks him to click a link and use his email account to log in.

This is a screenshot showing a spear phishing email with a spoofed sender address and a phishing link in the body.

FIGURE 1-1 Spear phishing email

There are two suspicious properties in this email:

  • The email is marked as having been sent with High Importance. This is a method to encourage the user to read and respond to the email right away. Creating a sense of urgency is commonly seen in social engineering–based attacks.

  • The sender name is spoofed. The email appears to be from Contoso CEO Bob Smith, though the sender address ends in gmail.com.

When the user clicks the link in the email, they are presented with the web page shown in Figure 1-2.

This is a screenshot showing a credential harvesting web site with a username and password prompt.

FIGURE 1-2 Credential harvesting website

This website is intended to look real enough so the user will type in their Office 365 username and password. Once the user types in their credentials and clicks Sign In, the credentials are sent to the attacker so they can log in to Office 365 as that user.

To protect users from links in spear phishing emails, you need a technology that will scan links in emails when the email is delivered and when a user clicks the link. This ensures the links are safe to click, which takes the decision out of the user’s hands. Safe Links is a feature in Defender for Office 365 that provides the best protection against these types of spear phishing attacks with malicious links.

The Safe Links feature in Microsoft Defender for Office 365 protects user email in two ways:

  • Links that are sent in email are scanned before they are delivered to the user’s mailbox.

  • Links are scanned again when a user clicks the link. Scanning the link upon click is critical because a common attack technique to evade email protection is to activate the malicious content on the hosting site after the email passes through a company’s email security layer.

These protections can be configured for emails sent to the company from outside email systems (inter-organization) as well as emails sent within the company (intra-organization).

Configuring a Safe Links policy

To configure a Safe Links policy, you must be a member of the Organization Management or the Security Administrator role groups configured in the Permissions & Roles section of the Microsoft 365 Security Portal (https://security.microsoft.com). For read-only access to Safe Link policies, you must be a member of either the Global Reader or Security Reader role groups. Note these are role groups in Office 365 and are separate from Azure Active Directory roles. However, the Global Admin and Security Administrator roles in Azure Active Directory are members of the Organization Management and Security Administrator role groups by default, respectively.

More Info Custom Roles in the Role-Based Access Control for Microsoft 365 Defender

For more information on Office 365 roles, please see the information at https://docs.microsoft.com/en-us/microsoft-365/security/defender/custom-roles?view=o365-worldwide.

Use the following steps to configure a Safe Links policy:

  1. Log in to https://security.microsoft.com with the required permissions.

  2. Under Email & Collaboration, click Policies & Rules > Threat Policies.

  3. In Threat Policies, under Policies, click the Safe Links icon.

  4. Click Create to start the Create A New Safe Links Policy wizard, as shown in Figure 1-3.

    This is a screenshot showing the Name Your Policy step in the Create Safe Links Policy wizard. After entering a Name and Description, click Next.

    FIGURE 1-3 Name Your Policy

  5. Provide a Name and Description for your Safe Links policy. You can have more than one policy that targets specific users in your organization, so keep this in mind when choosing your naming scheme. Click Next to move to the Settings page, as shown in Figure 1-4.

    This is a screenshot showing the Create Safe Links Policy wizard’s Settings page. Here, you configure the options for the Safe Links policy.

    FIGURE 1-4 Create Safe Links Policy wizard’s Settings page

  6. On the Settings page, set the Select The Action For Unknown Potentially Malicious URLs in Messages option to On. This allows the policy to check for malicious links.

  7. Set the Select The Action For Unknown Or Potentially Malicious URLs Within Microsoft Teams setting to On. This setting will allow Safe Links to protect links shared in Microsoft Teams.

  8. To allow Safe Links to protect clicks on URLs that point to files, select the Apply Real-Time URL Scanning For Suspicious Links And Links That Point To Files option.

  9. Waiting for URL scanning to complete before delivering the message will reduce the chances for false negatives because it will allow Safe Links to scan the link completely before delivering the email to the user. False negatives occur when a malicious link is delivered because it was scanned and found not to be malicious (sometimes referred to as a miss). We strongly recommend that you enable Apply Real-Time URL Scanning For Suspicious Links And Links That Point To Files.

  10. Select the Apply Safe Links To Email Messages Sent Within The Organization option to prevent malicious links from being sent between mailboxes in the same company. Once they have breached one mailbox, it is common for attackers to start to phish other mailboxes in the same company. Users are very likely to click malicious links in emails, especially when they are sent from a coworker!

  11. The Do Not Track User Clicks option should be left unchecked to ensure you know what links users are clicking.

  12. Select the Do Not Allow Users To Click Through To Original URL option, which prevents users from bypassing the Safe Links block page, thereby accepting the risk of visiting a website believed to be malicious. This typically results in undesirable consequences.

  13. The Display The Organization Branding On Notification And Warning Pages option allows you to customize the block page branding with a company logo. Scrolling down the Settings page exposes the Do Not Rewrite The Following URLs option shown in Figure 1-5.

    This is a screenshot showing the Do Not Rewrite The Following URLs option for the Safe Links policy.

    FIGURE 1-5 Do Not Rewrite The Following URLs

    The Do Not Rewrite The Following URLs option allows you to add URLs that should not be rewritten to interact with Safe Links. Typically, this setting is used to allow access to third-party phishing test sites.

  14. Once you have the Settings page options set as needed, click Next to display the Notification page shown in Figure 1-6.

    This is a screenshot showing the Safe Links wizard to configure Custom Notification Text.

    FIGURE 1-6 Safe Links Notification settings

  15. On the Notification page, there are two options: Use The Default Notification Text or Use Custom Notification Text. The Custom Notification Text box allows you to enter the custom text you want to be displayed to users when they interact with a link that is blocked by Safe Links. Select the Use Microsoft Translator For Automatic Localization option to allow your custom notification text to be translated to the user’s locale. Click Next to advance to the Applied To page shown in Figure 1-7.

    This is a screenshot showing the Safe Links wizard to configure who the Safe Links policy will apply to.

    FIGURE 1-7 Safe Links Applied To page

  16. On the Applied To page, you configure which groups, users, or domains this Safe Links policy will apply to. In this example, the policy will apply to all users who have email addresses with these domains: fespiresec.mail.onmicrosoft.com and fespiresec.onmicrosoft.com. Combinations of conditions can be used to include specific users and groups of users. Exceptions can be used to exclude specific users, groups, or domains from this Safe Links policy. Click Next.

  17. The Review Your Settings page lists all the configuration settings made so far in the Safe Links configuration wizard. You can edit any of the settings from this screen. When the settings are configured as desired, click Finish to create the Safe Links policy.

Multiple Safe Link policies can be created, as shown in Figure 1-8.

This is a screenshot showing two Safe Link policies, their priorities, and their statuses.

FIGURE 1-8 Safe Link policy view

Safe Link policies can be enabled or disabled using the Status slider. The Priority determines in what order the policies are applied. The policy with Priority 0 is applied first, followed by the policy with Priority 1, and so on. Once a policy’s Applied To condition is met, no additional policies are processed.

More Info Set Up Safe Links Policies in Microsoft Defender for Office 365

You can learn more about setting up Safe Links policies at https://aka.ms/sc200_setupsafelinks.

Click Global Settings to open a side menu, as shown in Figure 1-9.

This is a screenshot showing the Safe Links Global settings for email and Office 365 documents.

FIGURE 1-9 Safe Links Global Settings

Under the Global Settings For Users Included In Active Safe Links Policies setting, you can configure URLs that will always be blocked in emails and Office 365 Apps. A possible use case for this feature is that if a false negative (miss) occurs, you can add the URL to this list, and it will be blocked, regardless of the verdict from Safe Links.

The Settings That Apply To Content In Supported Office 365 Apps options control whether links inside Office 365 Apps are protected by Safe Links. For example, if a PowerPoint presentation contains a slide with a link to a malicious site, these settings will control whether Safe Links will protect the link.

More Info Configure Global Settings for Safe Links in Microsoft Defender for Office 365

You can learn more about these global settings at https://aka.ms/sc200_SLglobalsettings.

Malicious attachments

Attackers sometimes use malicious files attached to emails to gain unauthorized access into a system. This type of attack entry is beneficial because it establishes a foothold for the attacker to carry out additional attacks on other connected systems to the compromised system. Signature-based detections are often not enough to catch these malicious files. Fortunately, the Safe Attachments feature in Defender for Office 365 provides additional protection against this type of attack.

Safe Attachments uses dynamic analysis coupled with Machine Learning to detect threats in files and prevent the files from landing in a user’s inbox. Since this is a resource-intensive operation, the Safe Attachments analysis occurs only on files that do not already have an anti-malware signature. Files that do have an anti-malware signature are blocked by Exchange Online Protection before they reach Safe Attachments.

Configuring a Safe Attachments policy

To configure a Safe Attachments policy, you must be a member of the Organization Management or the Security Administrator role groups configured in the Permissions & Roles section of the Microsoft 365 Security Portal (https://security.microsoft.com).

Note Role Group Memberships

For read-only access to Safe Attachment policies, you must be a member of either the Global Reader or Security Reader role groups. Note these are role groups in Office 365 and are separate from Azure Active Directory roles.

Use the following steps to configure a Safe Attachment policy:

  1. Log in to https://security.microsoft.com with the required permissions.

  2. Under Email & Collaboration, click Policies & Rules > Threat Policies.

  3. In Threat Policies, under Policies, click the Safe Attachments icon.

  4. Click Create to start the Create A New Safe Attachments Policy wizard shown in Figure 1-10.

    This is a screenshot showing the Name Your Policy page, which prompts you to add a Name and Description for the Safe Attachment policy.

    FIGURE 1-10 Name your Safe Attachments policy

  5. On the Name Your Policy screen, enter a Name for the policy and add a Description. You can have more than one policy that targets specific users in your organization, so keep this in mind when choosing your naming scheme. Click Next to advance to the Settings page shown in Figure 1-11.

    This is a screenshot showing the options for how Safe Attachments will interact with attached files in emails.

    FIGURE 1-11 Safe Attachments Settings page

  6. The Safe Attachments Unknown Malware Response setting controls how the Safe Attachments feature will interact with an email containing a file attachment.

    • Off—Attachment Will Not Be Scanned For Malware This setting essentially disables Safe Attachments.

    • Monitor—Continue Delivering The Message After Malware Is Detected; Track Scan Results This setting is an “audit mode” that allows you to do a what-if analysis of attachments that would be blocked without actually blocking the attachments.

    • Block—Block The Current And Future Email And Attachments With Detected Malware This is the most intrusive Safe Attachments mode. If an email contains an attachment that is found to be malicious by Safe Attachments, the email and the attachment will not be delivered to the recipient(s). This is the default and recommended setting.

    • Replace—Block The Attachments With Detected Malware, Continue To Deliver The Message In this mode, Safe Attachments will deliver the email, but the attachment will be replaced with a text file indicating the file was infected and was removed.

    • Dynamic Delivery (Preview Feature)—Deliver The Message Without Attachments Immediately And Reattach Once Scan Is Complete This setting delivers the email body while the attachment is scanned. A preview of the attachment is provided until the Safe Attachments analysis is complete. If the attachment is found to be malicious, a text file will instead be placed in the message indicating the file was infected and removed.

  7. The last few options on the settings page are seen in Figure 1-12.

    This is a screenshot showing the options for redirection if a document is detected by Safe Attachments.

    FIGURE 1-12 Redirect Attachment On Detection

  8. If the Redirect Attachment On Detection option is selected, the detected malicious files will be sent to a mailbox that you configure, so you can collect these samples for further analysis.

  9. Selecting the Apply The Above Selection If Malware Scanning For Attachment Times Out Or Errors Occur option ensures that files that time out or error out during scanning are treated the same as what you configured in the policy. Be sure to select the Redirect Attachment On Detection if a file is not malicious so that you can recover the file for the user.

  10. Once you have the options configured to meet your needs, click Next to show the Applied To page shown in Figure 1-13.

    This is a screenshot showing the Safe Attachments wizard’s Applied To page, where you can configure who the Safe Attachments policy will apply to.

    FIGURE 1-13 Applied To page

  11. The Applied To page is where you configure which groups, users, or domains this Safe Attachments policy will apply to. In this example, the policy will apply to all users with email addresses with the domains fespiresec.mail.onmicrosoft.com and fespiresec.onmicrosoft.com. Combinations of conditions can be used to include specific users and groups of users. Exceptions can be used to exclude specific users, groups, or domains from this Safe Attachments policy. Click Next.

  12. The Review Your Settings page lists all the configuration settings made so far in the Safe Attachments configuration wizard. You can edit any of the settings from this screen. When the settings are configured as desired, click Finish to create the Safe Attachments policy.

Multiple Safe Attachments policies can be created, as shown in Figure 1-14.

This is a screenshot showing two Safe Attachments policies, their Priority settings, and the Status toggle.

FIGURE 1-14 Safe Attachments policy view

More Info Set Up Safe Attachments Policies in Microsoft Defender for Office 365

You can learn more about setting up Safe Attachments policies at https://aka.ms/sc200_setupsafeattach.

Safe Attachments policies can be enabled or disabled using the slider under Status. The Priority determines the order in which the policies are applied. The policy with Priority 0 is applied first, followed by the policy with Priority 1, and so on. Once a policy’s Applied To condition is met, no additional policies are processed.

Clicking Global Settings opens a side menu, as shown in Figure 1-15.

This is a screenshot showing the Safe Attachments Global Settings for email and Office 365 documents.

FIGURE 1-15 Safe Attachments Global settings

These Global settings apply to files stored on SharePoint, OneDrive, and Microsoft Teams and prevent users from accessing malicious files in these locations tenant wide. The key difference between these settings and Safe Attachments policies are that these setting focus on files outside of emails. Here are the protections you can enable in Global Settings:

  • Turn On Defender For Office 365 For Sharepoint, OneDrive, And Microsoft Teams applies Safe Attachments’ malicious file-detection capabilities for files stored in these locations. With this option enabled, if a malicious file is stored in these locations, the user would be unable to open the file. This option should be set to Enabled.

  • Turn On Safe Documents For Office Clients enables the files opened by Office 365 apps to be scanned by Cloud Protection, a component of Microsoft Defender for Endpoint that provides an added layer of protection on top of Safe Attachments protection. This option should be set to Enabled.

  • Allow People To Click Through Protected View Even If Safe Documents Identified The File As Malicious would allow users to override Safe Documents’ verdict of a file. We recommend that you do not enable this option.

More Info Turn On Safe Attachments for Sharepoint, Onedrive, and Microsoft Teams

You can learn more about setting up Safe Attachments policies for these products at https://aka.ms/sc200_safeattach4sps.

More Info Safe Documents in Microsoft 365 E5

You can learn more about setting up Safe Documents at https://aka.ms/sc200_safedocs.

Anti-phishing policies

Exchange Online Protection (EOP), which is included with the Office 365 Exchange Online service, provides a moderate amount of protection against phishing. Microsoft Defender for Office 365 takes anti-phishing protection to the next level by adding the following features:

  • Impersonation protection

  • Configurable advanced phishing thresholds

Impersonation protection

Impersonation protection applies to two types of impersonation: user impersonation and domain impersonation. User impersonation occurs when an attacker sends an email where the user portion of an email address mimics a user who is credible to the recipient. In the previous spear phishing example, the attacker used Bob Smith as the sender’s name to mimic the Contoso CEO. The attacker could have further impersonated Bob Smith by creating the email account [email protected] to increase the chances of the recipient responding to the message.

With domain impersonation, an attacker registers a domain that closely resembles a legitimate domain. For example, instead of contoso.com, the attacker could register consoto.com, which means at first glance, the recipient would recognize the Contoso name and interact with the message. Combinations of symbols and numbers are also used in this technique, such as [email protected]. (A zero is used instead of the first letter ‘O’ in CONTOSO.)

Configurable advanced phishing thresholds

Advanced phishing thresholds allow you to define how aggressive the machine learning models should be when determining if an email is a phish. The machine learning models driving the phishing detection in Defender for Office 365 have the ability score on a scale of low, medium, high, or very-high confidence levels. The more aggressive you configure this setting, the higher the chances of false positives. False positives occur when a legitimate email is falsely determined to be a phishing email and is kept out of the recipient’s inbox. False negatives can occur if the setting is not aggressive enough, so this setting is a double-edged sword. Each organization is different in terms of how much risk they are willing to accept, which will drive the decision when setting this threshold.

Below are the advanced phishing thresholds available:

  • 1—Standard The machine learning model will treat phish based on the determined confidence level. This is the default setting.

  • 2—Aggressive High-confidence phish and above will be treated like very high–confidence phish.

  • 3—More aggressive Medium-confidence phish and above will be treated like very high–confidence phish.

  • 4—Most aggressive All emails determined to be any level of phish will be treated like very-high-confidence phish.

More Info Recommended Settings for Configuring EOP and Defender for Office 365

The Microsoft recommended settings for anti-phishing can be found at https://aka.ms/sc200_antiphishrecommended.

Configuring an anti-phishing policy

To configure a Safe Links policy, you must be a member of the Organization Management or the Security Administrator role groups configured in the Permissions & Roles section of the Microsoft 365 Security Portal (https://security.microsoft.com). For read-only access to Safe Link policies, you must be a member of either the Global Reader or Security Reader role groups.

Use the following steps to configure an anti-phishing policy:

  1. Log in to https://security.microsoft.com.

  2. Under Email & Collaboration, click Policies & Rules > Threat Policies.

  3. In Threat Policies, under Policies, click the Anti-Phishing icon.

  4. Click Create to start the Create A New Anti-phishing Policy wizard and display the Name Your Policy screen, as shown in Figure 1-16.

    This is a screenshot showing the Name Your Policy page for a new anti-phishing policy, where you are prompted for a Name and Description for the policy.

    FIGURE 1-16 Name your anti-phishing policy.

  5. Type in a Name and a Description for the policy. You can have more than one policy that targets specific users in your organization, so keep this in mind when choosing your naming scheme. Click Next to advance to the Applied To page shown in Figure 1-17.

    This is a screenshot of the anti-phishing wizard’s Applied To page, where you configure who the anti-phishing policy will apply to.

    FIGURE 1-17 Applied To page

  6. The Applied To page is where you configure which groups, users, or domains this anti-phishing policy will apply to. The policy will apply to all users with email addresses with the domains fespiresec.mail.onmicrosoft.com and fespiresec.onmicrosoft.com. Combinations of conditions can be used to include specific users and groups of users. Exceptions can be used to exclude specific users, groups, or domains from this anti-phishing policy. Click Next.

  7. The Review Your Settings page lists the configurations made so far in the anti-phishing configuration wizard. You can edit any of the settings from this screen. When the settings are configured as desired, click Create This Policy, which will create the policy with default settings.

  8. On the Anti-Phishing Policy screen, click the anti-phishing policy you just created. This will open a fly-out menu where you configure the Impersonation settings and Advanced Settings, as shown in Figure 1-18.

    This is a screenshot of the Edit Your Policy Standard Anti-Phishing page, where you configure the Impersonation settings for the policy.

    FIGURE 1-18 Edit page for an anti-phishing policy

  9. Click Edit next to the Impersonation settings to open the Edit Impersonation Policy wizard; the wizard starts with the Editing Add Users To Protect page shown in Figure 1-19.

    This is a screenshot showing the Editing Add Users To Protect page, which prompts you to add users to protect with the impersonation policy.

    FIGURE 1-19 Editing Add users to protect in the anti-phishing impersonation policy

  10. Click the toggle button to On. This will expose a section where you can add users who you want to protect from user impersonation. You can add up to 60 email accounts to this list. Typically, you want to add users with high public visibility, such as the CEO, as well as external users associated with your company, such as board members. Bob Smith was added because he is the Contoso CEO. When finished adding email accounts, click Add Domains To Protect, shown in Figure 1-20.

    This is a screenshot of the Add Domains To Protect page of the Edit Impersonation Policy.

    FIGURE 1-20 Editing Add Domains To Protect in the anti-phishing impersonation policy

  11. On the Add Domains To Protect page of the wizard, enter the domains you want to protect from domain impersonation. You can add up to 50 domains to protect. To add the domains configured in your Office 365 tenant, click the toggle switch under Automatically Include The Domains I Own to On. To enter email domains that are external to your company that you normally do business with, click the toggle switch under the Include Custom Domains to On. Tailspintoys.com was entered under Add Domains because they are a major supplier to Contoso. When you are finished adding domains, click the Actions option on the left, as shown in Figure 1-21.

    This is a screenshot of the Editing Actions page of the Edit Impersonation Policy blade where you can configure how the policy will handle impersonated emails.

    FIGURE 1-21 Editing Actions in the anti-phishing impersonation policy

  12. The Actions wizard page is where you configure what action you want performed when an email is believed to be impersonating a user or domain. Both cases are set to Move Message To The Recipients’ Junk Email Folders. You can set the same action on both user and domain impersonation, or you can set a different action for each. The choices for Actions include:

    • Redirect Message To Other Email Addresses

    • Move Message To The Recipients’ Junk Email Folders

    • Quarantine The Message

    • Deliver The Message And Add Other Addresses To The BCC Line

    • Delete The Message Before It’s Delivered

    • Don’t Apply Any Action

    The Turn On Impersonation Safety Tips text is a clickable link that when clicked opens the Safety Tips configuration window shown in Figure 1-22.

    This is a screenshot of the Safety Tips page of the Edit Impersonation Policy.

    FIGURE 1-22 Editing Safety tips in the anti-phishing impersonation policy

    These options allow a banner to be added to emails when a user or domain is impersonated or when unusual characters are present in the sender email address, such as [email protected] (where a zero is used instead of the first O in CONTOSO). Set the toggle switch to On for each of these settings and click Save when you are finished. This will return you to the Actions wizard page.

    When you have the options set on the Actions wizard page, click the Mailbox Intelligence option on the left, as shown in Figure 1-23.

    This is a screenshot of the Editing Mailbox Intelligence blade of the Edit Impersonation policy.

    FIGURE 1-23 Editing the Mailbox Intelligence

  13. Mailbox Intelligence is an additional layer of artificial intelligence–driven protection that learns the sending and receiving patterns of the users configured to be protected by the impersonation policy. This pattern learning improves the efficacy of the impersonation policy and should be turned on. If Mailbox Intelligence is what catches the impersonation, the action configured under If Email Is Sent By An Impersonated User is taken. The actions are configurable as follows:

    • Redirect Message To Other Email Addresses

    • Move Message To The Recipients’ Junk Email Folders

    • Quarantine The Message

    • Deliver The Message And Add Other Addresses To The Bcc Line

    • Delete The Message Before It’s Delivered

    • Don’t Apply Any Action

    Once you have the action configured, click the Add Trusted Senders And Domains option on the left, as shown in Figure 1-24.

    This is a screenshot of the Add Trusted Senders And Domains blade of the Edit Impersonation Policy.

    FIGURE 1-24 Add Trusted Senders And Domains

  14. Adding sender email addresses and domains to exempt them from the impersonation policy should only be used for reoccurring false positives. Exempting too many domains increases your exposure to impersonation. It is best to start out with no exceptions if possible. Click the Review Your Settings text on the left.

  15. The Review Your Settings page lists all the configuration settings made so far in the Edit Impersonation Policy Configuration wizard. You can edit any of the settings from this screen. When the settings are configured as desired, click Save to apply the impersonation settings to the anti-phishing policy and return you to the Edit Your Policy Standard Anti-Phishing page shown in Figure 1-25.

    This is a screenshot showing the Edit Your Policy Standard Anti-Phishing page to configure the Advanced Settings for the policy. The Edit option is selected.

    FIGURE 1-25 Edit Your Policy Standard Anti-Phishing page

  16. Lastly, you need to configure the Advanced Settings of the Anti-Phishing Policy. Click Edit next to Advanced Settings to open the Editing Advanced Phishing Thresholds window shown in Figure 1-26.

    This is a screenshot of the Editing Advanced Phishing Thresholds slider in the Advanced Phishing Thresholds blade.

    FIGURE 1-26 Editing Advanced Phishing Thresholds

  17. Depending on the tolerance for false positives (in other words, emails not reaching the attended recipients), set this policy to the appropriate aggressiveness. One approach is to leave the settings at the default setting—1-Standard—and increase aggressiveness if there are false negatives. Repeat this process until the efficacy is acceptable. After setting the aggressiveness, click the Review Your Settings option on the left.

  18. The Review Your Settings page lists all the configuration settings made so far in the Advanced Settings wizard. You can edit any of the settings from this screen. When the settings are configured as desired, click Save to apply the Advanced Settings to the anti-phishing policy.

  19. Click Close to complete the configuration of the anti-phishing policy.

  20. Multiple anti-phishing policies can be created, as shown in Figure 1-27.

    This is a screenshot showing two anti-phishing policies, their Priority, Status, and Last Modified information.

    FIGURE 1-27 Anti-phishing policies

  21. Anti-phishing policies can be enabled or disabled using the slider under Status. The Priority determines in what order the policies are applied. The policy with priority 0 is applied first, followed by the policy with priority 1, and so on. Once a policy’s Applied To condition is met, no additional policies are processed.

More Info Anti-Phishing Policies in Microsoft 365

Full documentation for the anti-phishing policies in Microsoft 365 can be found at https://aka.ms/sc200_antiphishpol.

Attack Simulation Training

Having a cybersecurity awareness program is an essential part to your overall plan to combat email-based attacks. Earlier in this chapter, we covered ways to prevent malicious emails from reaching users. But a good cybersecurity defensive posture demands that you examine every layer of your defenses and come up with a plan for how you will mitigate a threat that makes it through each layer. This raises the question, “How can I help end users not click everything that is delivered to their Inbox?” While this is a frustrating and constant battle, it is important to keep in mind that users do not have years of cybersecurity knowledge (which tends to result in having lots of skepticism). They need help separating good emails from an email that just does not seem right. This is the reason the Attack Simulation Training feature in Microsoft Defender for Office 365 was created. You can use this tool to send benign emails with suspicious qualities to train your users to look for signs that an email should be reported rather than interacted with (for example, clicking the link, opening the attachment, or gladly typing their corporate credentials into every web-based credential page). The Attack Simulation Training feature is an impressive improvement to the initial Attack Simulator that was released in 2019.

Launching a simulation

To create a new attack training simulation, you must be a member of one of the following roles:

  • Organization Management

  • Security Administrator

  • Attack Simulator Administrators

Note Separate Role Groups

These are role groups in Office 365 and are separate from Azure Active Directory roles.

Follow these steps to create a new simulation:

  1. Log in to https://security.microsoft.com.

  2. Under Email & Collaboration, click Attack Simulation Training, as shown in Figure 1-28.

    This is a screenshot of the Attack Simulation Training window, where you can create a new attack simulation.

    FIGURE 1-28 Create an attack simulation.

  3. Click Simulations > Launch A Simulation, which brings up the Select Technique step in the attack simulation creation wizard shown in Figure 1-29.

    This is a screenshot of the Select Technique page in the attack simulation creation wizard.

    FIGURE 1-29 Creating an attack simulation

  4. Under Select Technique, choose the simulation technique you want to run against your users. For this simulation, choose Credential Harvest and click Next to bring up the Name Simulation page shown in Figure 1-30.

    This is a screenshot of the Name Simulation page, which prompts you to enter a Simulation Name and Description for the simulation.

    FIGURE 1-30 Add a Simulation Name and Description for the simulation.

  5. Enter a name for the simulation under Simulation Name and enter a Description. Click Next to advance to the Select Payload page shown in Figure 1-31.

    This is a screenshot of the Select Payload page containing payloads you can choose from for the simulation in the Simulation creation wizard.

    FIGURE 1-31 Select a payload for the simulation.

  6. Select a payload for the simulation. This is what will be used to bait the user for the Credential Harvest technique. You can sort the payloads by the Predicted Compromise Rate (%) column, which is calculated based on the compromised percentage of all Microsoft Defender for Office 365 customers. You can click Send A Test to the currently logged-in user to see the payload sample before you commit. Based on the 42 percent predicted compromise rate, select Payroll Work File Sharing and then click Next.

  7. In the Target Users page, you can choose to Include All Users In My Organization or Include Only Specific Users And Groups. In this case, select Include Only Specific Users And Groups and click Add Users to open the Add Users fly-out pane, as shown in Figure 1-32.

    This is a screenshot of the Add Users fly-out window.

    FIGURE 1-32 Target users for the simulation.

  8. In the Add Users fly-out pane, there are some thoughtful suggestions on which users to target. For example, you can target Users Not Targeted By A Simulation In The Last Three Months or Repeat Offenders, which are users who continue to fall for the simulations. In this case, there is a user group created in Azure Active Directory to run the first simulation on pilot users. Once the desired user group is selected, click Add User(s) and then click Next to advance to the Assign Training page as shown in Figure 1-33.

    This is a screenshot showing the Assign Training page in the Simulation creation wizard to control the behavior of how training will be assigned to users.

    FIGURE 1-33 Assign Training

  9. Assign Training is a welcome addition to the Attack Simulation Training feature. You can assign training to users who fall for the simulations by interacting with the email and/or payload. You can choose to use the Microsoft Training Experience, Redirect To A Custom URL (handy if you have a Learning Management System, or LMS), or No Training. For the Microsoft Training Experience option, you can then choose to allow the system to Assign Training For Me based on the technique and payload used or Select Training Courses And Modules Myself. A Due Date can also be set for when the training must be completed by the user. Click Next.

  10. On the Training Landing Page, you can see the text the user will see if they fall for the simulation. You can customize the Header and Body of the page and view a preview. Type the text you want the user to see and click Next.

  11. The last options to configure are the Launch Details for when you want the simulation to launch and when you want it to end. You can also select the option to Enable Region Aware Timezone Delivery so the simulation does not deliver to users outside your time zone during off-work hours, which might cause them to miss the email. Click Next to advance to the Review Simulation page, as seen in Figure 1-34.

    This is a screenshot showing the Review Simulation page in the Simulation creation wizard confirming the settings.

    FIGURE 1-34 Review Simulation

  12. Review Simulation allows you to edit the settings you have configured thus far in the simulation. You can also choose Send A Test to ensure the simulation operates as you expect before unleashing it on your users. Once you are satisfied with the configuration, click Submit to finalize the simulation.

Reviewing the Attack Simulation Training results

You can track how the simulation is playing out by clicking the simulation name on the main page of the Attack Simulation Training dashboard. Figure 1-35 shows one user who was tricked into interacting with the payload by clicking the link and supplying their credentials.

This is a screenshot of the attack simulation results from a simulation run against users.

FIGURE 1-35 Attack simulation results

Attack Simulation Training settings

The Attack Simulation Training feature settings are largely configured as part of the simulations, however there are some overall settings that are important to mention.

In the Attack Simulation Training section, clicking Settings shows the following options, which are also shown in Figure 1-36.

This is a screenshot of the Simulations tab on the Attack Simulation Training page for repeat offenders and training reminders.

FIGURE 1-36 Attack Simulation Training settings

  • Repeat Offender Threshold is the number of consecutive simulations a user must fall for to be classified as a repeat offender. These users can be specifically targeted for simulations as mentioned previously.

  • Enable User Training Reminders periodically emails users who have training due because they fell for a simulation and interacted with the simulation payload.

  • Because you cannot delete simulations, Simulations Excluded From Reporting comes in handy if you have a simulation that is tainted for some reason (such as the URL was blocked by proxy) and you do not want this simulation to skew the reporting.

More Info Get Started Using Attack Simulation Training

Full documentation for the Attack Simulation Training feature can be found at https://aka.ms/sc200_attacksimtraining.

Data protection, labeling, and insider risk

Data and intellectual property are among the most valuable assets in a company. With data being accessed from virtually anywhere on any device, protecting these assets is key. Microsoft 365 Compliance features allow you to scan for sensitive data types, apply sensitivity labels to the data, and protect the data so that only authorized users have access. These steps help protect honest users from accidentally oversharing data.

Sensitivity labels

Sensitivity labels allow for users to label their data according to company data handling policies. You can also auto label documents with a sensitivity label if they match your defined criteria.

Follow these steps to create a sensitivity label:

  1. Log in to https://compliance.microsoft.com as a member of the Global Administrator role in Azure Active Directory. You can also use an account that is a member of the Compliance Data Administrator, Compliance Administrator, or Security Administrator role groups. Note these are Office 365 role groups, and they are separate from Azure Active Directory roles.

  2. In the menu on the left side of the page, click Show All.

  3. Under Solutions, click Information Protection.

  4. On the Labels page, click Create A Label, which opens the New Sensitivity Label wizard shown in Figure 1-37.

  5. In the New Sensitivity Label wizard, provide a Name, Display Name, Description For Users, and Description For Admins.

  6. Select Files & Emails and click Next.

    This is a screenshot of the Name & description page in the New sensitivity label wizard.

    FIGURE 1-37 Name & Description page in the New Sensitivity Label wizard

  7. Select Mark The Content Of Files and click Next.

  8. Select the content marking options you want to appear on files and emails classified with this sensitivity label and click Next.

  9. When auto-labeling files and emails, you want users to be able to choose their labels at first, so leave the auto-labeling option unselected and click Next.

  10. On the Define Protection Settings For Groups And Sites page, click Next.

  11. On Review Your Settings And Finish page, make sure the options are configured to your specifications, and then click Create Label.

  12. Click Done once the label is created.

Before users can use the labels, you need to publish the label using Label policies.

  1. Select the label you created and click the Publish Labels button shown in Figure 1-38.

    This is a screenshot of the Information Protection page with the Publish Labels button.

    FIGURE 1-38 Publish Labels

  2. On the Choose Sensitivity Labels To Publish page, make sure your label is listed and click Next.

  3. On the Publish To Users And Groups page, leave the default of All Users And groups, and click Next to open the Policy Settings page shown in Figure 1-39.

    This is a screenshot of the Policy Settings page with the options for the policy.

    FIGURE 1-39 Policy Settings

  4. On the Policy Settings page there are three options:

    • Users Must Provide A Justification To Remove A Label Or Lower Its Classification This setting is meant to force the user to type in a justification if they set the classification of the document to a less sensitive label or remove the label entirely.

    • Require Users To Apply A Label To Their Emails And Documents Before users can save documents or send emails, this option forces them to set a label.

    • Provide Users With A Link To A Custom Help Page This setting allows you to set up a help page for users to explain the various sensitivity labels and how to use them.

  5. Once you select the options desired, click Next.

  6. Under Apply This Label As The Default Label To Documents And Emails, choose the label you created. This ensures all emails and documents are labeled.

  7. On the Name Your Policy page, provide a Name and Description for the label policy, and then click Next.

  8. On the Review And Finish page, ensure the settings are as you want them and click Submit to create the label policy.

  9. Once the policy is created, click Done.

Users can now use the sensitivity label you created to label their documents and emails.

More Info Learn About Sensitivity Labels

For additional information about sensitivity labels, see https://aka.ms/sc200_sensitivelabels.

Managing data loss prevention alerts

One of the responsibilities of a data loss prevention administrator is to respond to alerts indicating sensitive data, such as customer credit card numbers, were exposed to parties unintentionally.

Follow these steps to review data loss prevention alerts:

  1. Log in to https://compliance.microsoft.com as a member of the Global Administrator role in Azure Active Directory. You can also use an account that is a member of the Compliance Data Administrator, Compliance Administrator, or Security Administrator role groups. Note these are role groups in Office 365 and are separate from Azure Active Directory roles.

  2. In the menu on the far-left side of the page, under Solutions, click Data Loss Prevention.

  3. At the top of the page, click the Alerts tab (see Figure 1-40).

    This is a screenshot of the Alerts tab on the Data Loss Prevention with four DLP alerts.

    FIGURE 1-40 Data loss prevention alerts

  4. In Figure 1-40, high-severity alerts are shown, indicating a DLP policy match. Click the first alert, and then click View Details to open the alert page shown in Figure 1-41.

    This is a screenshot of the Overview tab of a DLP alert that describes the action and properties that caused the alert.

    FIGURE 1-41 Data loss prevention alert overview

    This alert indicates that Sam Tarley shared a file named Book.xlsx from One Drive for Business. This file contains U.S. financial data in the form of credit card numbers. Under Other Alerts For This User, it appears that Sam has shared several other files with sensitive data in them. Once you have spoken to Sam, you can close this alert out.

  5. Under Manage Alert, set the Status to Resolved, assign the alert to yourself, and provide comments in the Comments text box; click Save.

More Info Create, Test, and Tune A DLP Policy

For additional information about DLP policies and alerts, see https://aka.ms/sc200_dlppol.

Insider risk

Data leakage can also occur because of an insider threat. Insider threats are when a user with access to company data assets purposefully steals these assets for personal gain. The motivations of these individuals vary. Following are some examples:

  • A disgruntled employee looking to embarrass the company publicly

  • An employee who feels they are underpaid and who seeks to make money from selling company intellectual property to the highest bidder

You can use insider risk management policies to generate alerts when activity is detected per the policy settings. Follow these steps to create an insider risk policy:

  1. Log in to https://compliance.microsoft.com as a member of the Global Administrator role in Azure Active Directory. You can also use an account that is a member of the Compliance Data Administrator, Compliance Administrator, or Security Administrator role groups. Note these are role groups in Office 365 and are separate from Azure Active Directory roles.

  2. In the menu on the far-left side of the page, under Solutions, click Insider Risk Management.

  3. Click Policies > Create Policy.

  4. Under Choose A Policy Template, under Categories, select Data Leaks. Under Templates, select General Data Leaks and click Next.

  5. On the Name Your Policy page, provide a Name and Description for your policy, and then click Next.

  6. On the Choose Users And Groups page, select Include All Users And Groups and click Next.

  7. On the Specify Content To Prioritize page, leave the I Want To Specify Sharepoint Sites, Sensitivity Lables, And/Or Sensitive Info Types As Priority Content option at its default setting and click Next.

  8. On the SharePoint Sites To Prioritize (Optional) page, click Next.

  9. On the Sensitive Info Types To Prioritize (Optional) page, click Next.

  10. On the Sensitivity Labels To Prioritize (Optional) page, click Add Or Edit Sensitivity Label. Select the sensitivity label you created earlier and click Next.

  11. On the Indicators And Triggering Event For This Policy page, under Choose Triggering Event, select User Performs An Exfiltration Activity. Under Policy Indicators, select all the indicators in each section and click Next.

  12. On the Decide Whether To Use Default Or Custom Indicator Thresholds page, select Use Default Thresholds For All Indicators, click Next.

  13. On the Review Settings And Finish page, ensure the selections made are as you need them and then click Submit.

This policy will begin to assess the indicators configured in the policy and raise an alert if a user performs an exfiltration activity, such as downloading files from SharePoint or emailing a significant number of attachments outside the organization.

More Info Insider Risk Management in Microsoft 365

For additional information about insider risk management, see https://aka.ms/sc200_insiderisk.

Investigate and remediate an alert raised by Microsoft Defender for Office 365

Alerts raised from Microsoft Defender for Office 365 are viewed in the Microsoft 365 Defender Security portal at https://security.microsoft.com. They are aggregated into incidents and investigated by the built-in Automated Investigation and Response technology.

Following the steps below, you will triage and resolve an email security incident:

  1. Log in to https://security.microsoft.com as a member of the Organization Management or the Security Administrator role groups.

  2. In the menu on the far left, expand Incidents & Alerts and click Incidents to open the incidents page shown in Figure 1-42.

    This is a screenshot of the page that lists incidents; a single incident is listed.

    FIGURE 1-42 Incident list view

  3. On the Incidents page, note one of the detection sources is Office 365. Click the incident named Multi-Stage Incident On One Endpoint Reported By Multiple Sources to open the incident view, as shown in Figure 1-43.

    This is a screenshot of the incident details page showing the involved alerts and impacted entities.

    FIGURE 1-43 Incident details page

  4. This view tells you there are nine alerts in this incident, all falling into the Initial Access Stage of the MITRE ATT&CK Framework. Below the framework bar chart is a timeline of the alerts, starting with the alert that occurred first. The Scope shows the impacted assets are one device, one user, and two mailboxes. Click the Manage Incident link at the top-right of the page.

  5. The Manage Incident fly-out window allows you to assign the incident to yourself. This lets other incident responders know you are working on this incident. You can also change the name of the incident. Click the Assign To Me slider and click Save to assign the incident to yourself.

  6. Back on the incident page, click the Alerts section near the top of the page to view the alerts in this incident, as shown in Figure 1-44.

    This is a screenshot of the incidents alert view showing multiple alerts. Alerts of the same title are grouped.

    FIGURE 1-44 Incident alerts view

  7. Alerts with the same title are grouped. Looking at the alert titles, it appears that an email with a malicious attachment was delivered to user mailboxes, and at least one of the users opened the attachment. Defender for Office 365 learned the attachment was malicious but only after this occurred.

    At this point, you would typically begin searching mailboxes for this email and remove the messages. Thankfully, the Automated Investigation and Response feature in Defender for Office 365 has already found the messages and is waiting for your approval to remove them.

  8. Click the Investigations section to view the investigations for the incident shown in Figure 1-45.

    This is a screenshot of the incident investigations view with three investigations pending approval.

    FIGURE 1-45 Incident investigations view

  9. There are three investigations with the Microsoft Defender for Office 365 service source, and all are pending approval. Click the first investigation in the list to open the Investigation Summary shown in Figure 1-46.

    This is a screenshot of an Investigation Graph tab for one of the investigations. Investigation details and pending actions are shown.

    FIGURE 1-46 Investigation Graph tab

  10. The investigation graph walks you through the steps taken by Automated Investigation to ensure that all the malicious emails were located and evaluated for malicious content. If malicious emails (including attachments) are found, they are marked Pending Action. Pending actions allow you to either approve or reject the recommended action for each artifact. Click the Pending Actions section and then click the first pending action, as shown in Figure 1-47.

    This is a screenshot of the Pending Actions in an investigation, where you can approve or reject actions.

    FIGURE 1-47 Pending Actions

  11. You can review each action that Automated Investigation wants to take to clean up this incident. In this example, this email was found to be malicious, and the pending action is to soft delete the email. It was originally delivered to the inbox, though the Zero-Hour Auto Purge (ZAP) action removed it post-delivery from the user’s inbox and placed it in quarantine. You can click each of the Pending Action items and approve them manually, or you can click the Select All check box and approve them all as one object, as shown in Figure 1-48.

    This is a screenshot showing the approval of all pending actions.

    FIGURE 1-48 Approve all actions

  12. Choose Select All > Approve.

  13. In the menu on the far left, click Action Center.

  14. The Action Center allows you to approve all pending actions and view the history of actions already approved or rejected, as shown in Figure 1-49.

    This is a screenshot of approving all pending actions in the Action Center.

    FIGURE 1-49 Approve all actions in the Action Center.

  15. Click Select All, and then click Approve.

  16. Now that you have approved all the pending actions for this incident, the incident is ready to be marked as Resolved. Click back to the Incident.

  17. On the incident view, click Manage Incident to open the Manage Incident fly-out window, as shown in Figure 1-50.

  18. Click the Resolve Incident slider. Set the Classification to True Alert and select Malware under Determination. Provide Comments if necessary and click Save.

More Info Remediation Actions in Microsoft Defender for Office 365

For additional information about remediation actions in Defender for Office 365, see https://aka.ms/sc200_mdoremediate.

This is a screenshot of the Manage Incident fly-out window, where you can assign the incident to yourself and close the incident.

FIGURE 1-50 Manage Incident

Skill 1-2: Detect, investigate, respond, and remediate endpoint threats using Microsoft Defender for Endpoint

Threats to endpoints have continued to become more sophisticated and harder to detect. Techniques like “living off the land,” which involves built-in operating system utilities to avoid detection, are increasingly being used. To meet this challenge, security teams invest millions of dollars in endpoint detection capabilities leading to multiple security agents running on endpoints. The increasing number of agents results in the negative effect of poor performance and patching troubles.

Microsoft Defender for Endpoint provides not only next-generation anti-virus (NGAV) and endpoint detection and response (EDR) but also additional capabilities, including:

  • 180 days of data retention stored in trusted Azure data centers

  • Antimalware coverage far beyond signature detections, powered by cloud protection and attack surface reduction

  • Tamper protection and detection

  • Manual response and AI-driven self-healing

  • Fast querying via advanced hunting

  • Threat and vulnerability management

  • Rich APIs and a partner ecosystem

  • Next-level threat Intelligence via threat analytics

  • Multi-platform coverage, including Mac, Linux, iOS, Android, and Windows

  • Opt-in targeted attack notifications through Microsoft Threat Experts

  • Integration with Intune and conditional access

This list is not exhaustive and continues to grow as Microsoft Defender for Endpoint continues to release features at a blistering pace.

More Info Microsoft Defender for Endpoint and Other Microsoft Solutions

For additional information about integration with other Microsoft solutions, see https://aka.ms/sc200_mdeintegrations.

Configuring Microsoft Defender for Endpoint

There are two main areas of Microsoft Defender for Endpoint that require configuration:

  • Configuration in the Microsoft 365 Security portal

  • Settings on the monitored endpoints

The focus of this chapter will be on configuring Microsoft Defender for Endpoint in the Microsoft 365 Security portal.

Setting up the Microsoft Defender for Endpoint subscription

There are two critical settings to take note of when performing the initial subscription configuration of Microsoft Defender for Endpoint. These settings include:

  • Data location

  • Data retention period

Data location is selected during the initial subscription configuration and cannot be changed without offboarding all your endpoints and losing all your data. At the time of this writing the regions available are:

  • United States

  • European Union

  • United Kingdom

You should check with your privacy officer to ensure you select the correct region to store your data. This list is for commercial offerings and does not include government offerings.

Important Region Cannot Be Changed!

You cannot change the region your data is stored in once you configure your subscription without offboarding all endpoints and losing all data in the subscription!

More Info Microsoft Defender for Endpoint Data Storage and Privacy

More details on Microsoft Defender for Endpoint data storage and privacy can be found at https://aka.ms/sc200_mdeprivacy.

The data retention period is also selected during initial subscription configuration. Unlike the data location, the retention period can be changed at any time, even after completing the subscription configuration wizard. The default retention period is 180 days (6 months) and can be changed to 30, 60, 90, 120, or 150 days.

Once the subscription configuration wizard is complete, you can change the data retention period by performing the following steps:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles.

  2. In the menu on the left, click Settings > Endpoints.

  3. Under General, click Data Retention, as shown in Figure 1-51.

  4. Note that you cannot change the Data Storage location as previously mentioned (selections are unavailable). To change the Data Retention period, click the drop-down menu and select the number of days that is appropriate to your environment.

  5. When you are finished, click Save Preferences.

More Info Set Up Microsoft Defender for Endpoint Deployment

Full details of the Microsoft Defender for Endpoint subscription configuration wizard can be found at https://aka.ms/sc200_mdeconfigwiz.

This is a screenshot of the Data Retention settings page for Microsoft Defender for Endpoint general settings.

FIGURE 1-51 Data Retention selection for Microsoft Defender for Endpoint

Role-Based Access Control

Like all Microsoft enterprise Software as a Service (SaaS) offerings, Microsoft Defender for Endpoint uses Azure Active Directory for authentication and authorization. Initial configuration provides the following Azure Active Directory built-in roles access to the endpoint-specific data and settings in the Microsoft 365 Security portal:

  • The Global Administrators and Security Administrators roles have full access.

  • The Security Reader role has read-only access.

Typically, this model is too rigid for larger companies, especially those with multi-tiered security operations teams. In these companies, each tier has set responsibilities and needs to have the least amount of privilege to carry out those responsibilities. Thankfully, Microsoft Defender for Endpoint’s role-based security model was designed for various sizes of security teams.

Roles in Microsoft Defender for Endpoint consist of two major parts:

  • Roles that provide Azure Active Directory groups with specific rights to Microsoft Defender for Endpoint data and settings.

  • Device Groups are used to segment enrolled devices so they can have Azure Active Directory groups and their roles assigned to them.

This model allows for least privilege access to only the devices that the security analyst should possess.

Important Access Loss

Enabling roles will cause users with the Security Reader Azure Active Directory role to lose access to Microsoft Defender for Endpoint data and settings in the Microsoft 365 Security portal.

To enable roles, follow these steps:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles.

  2. In the menu on the left, click Settings > Endpoints.

  3. Under Permissions, click Roles, as shown in Figure 1-52.

    This is a screenshot showing the Endpoints blade. In the left menu, Roles has been selected. On the right, under Start Using Roles? is the Turn On Roles button, which enables roles in the Microsoft Defender for Endpoint Permissions settings.

    FIGURE 1-52 Enabling roles for Microsoft Defender for Endpoint

  4. Note the Users With Read-Only Permissions Will Lose Access To The Portal Until They Are Assigned One Of The New Roles Through Their Azure AD Groups warning. These are users who gained access via the Azure Active Directory Security Readers role. If you have users in this situation, you should create an Azure Active Directory group for these read-only users before you enable roles to get them back to being operational as quickly as possible. When you are ready, click Turn On Roles.

Now that roles are enabled, the Microsoft Defender For Endpoint Administrator (Default) role is automatically created, which provides full rights to the endpoint data and settings (see Figure 1-53).

This role can be used instead of the built-in Azure Active Directory Global Administrator or Security Administrator roles, which is ideal because these Azure Active Directory roles provide access beyond endpoint data and should be used sparingly. If a user needs full permissions to manage the endpoint data and related settings, they can be placed in this role.

This is a screenshot of the Endpoints blade. The Roles tab has been selected, and the default role is shown.

FIGURE 1-53 Default role for Microsoft Defender for Endpoint

To provide read-only rights to the endpoint data, create a role with read-only access using the following steps:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles.

  2. In the menu on the left, click Settings > Endpoints.

  3. Under Permissions, click Roles.

  4. Click the Add Item button and the fly-out menu will appear, as shown in Figure 1-54.

    This is a screenshot of the Add Role fly-out menu with a permissions list in the Microsoft Defender for Endpoint Roles settings.

    FIGURE 1-54 Add Role fly-out window with permission list

  5. Provide a Role Name and Description.

  6. For Permissions, notice you can provide the View Data permission for either Security Operations data, Threat And Vulnerability Management data, or both. This is important if your security operations team is separate from your threat and vulnerability management team. In this case, you want to allow both types of data, so leave them both selected.

  7. Click Assigned User Groups, as shown in Figure 1-55.

    This is a screenshot of the Add Role fly-out menu with the Assigned User Groups tab selected.

    FIGURE 1-55 Assigned User Groups tab

  8. Because you likely have many security groups, you can type the partial name of the group in the text field, which will filter the list below. Secops was entered into this text box to filter the list for all groups containing “Secops” in the group title. Once you find the group or groups you need, select the box next to the Azure Active Directory group you want to assign the role to and then click the Add Selected Groups button. When you are finished, click the Save button.

Secops-Tier1 user named Ryker now has read-only access to the endpoint data in the Microsoft 365 Security portal. Note in Figure 1-56, Ryker can view data for the computer win10-1 but cannot perform any actions.

This is a screenshot of an endpoint to which the user only has read access.

FIGURE 1-56 Read-only access to the win10-1 endpoint

More Info Create and Manage Roles for Role-Based Access Control

Full details of each permission can be found at https://aka.ms/sc200_mderbac.

Under Device Groups, notice there are no groups currently, as shown in Figure 1-57.

This is a screenshot of the Device Groups menu option under Permissions. No groups are shown.

FIGURE 1-57 Device Groups

This is because no device groups have been created yet. Once we create a device group, a default group will be created in addition to the group we create.

Without device groups, everyone who has permissions via a role will have those permissions over all onboarded devices. This may not be desirable, especially with sensitive devices, such as devices operated by executives of the company. Contoso has an executive support staff consisting of Mikey, Zach, and Dylan. They require access to the executive machines and should be the only ones with access. Because of this, you need to keep Ryker in Tier 1 from having access to these endpoints. You have already created the Executive Support role for the three executive support staff members and added the Azure Active Directory group. Now you need to create a device group for these executive devices.

To create a device group, follow these steps:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles.

  2. In the menu on the left, click Settings > Endpoints.

  3. Under Permissions, click Device Group, and then click Add Device Group to open the fly-out menu shown in Figure 1-58.

    This is a screenshot of the Add Device Group fly-out menu.

    FIGURE 1-58 Add device group fly-out menu

  4. In the Add Device Group fly-out menu, type a Device Group Name, choose an Automation Level, and type a Description.

  5. In the Members section, devices can automatically be placed in this device group based on these values:

    • Name Name of the device

    • Domain Active Directory domain name the device is a member of

    • Tag A label that is assigned to the device

    • OS Operating system that runs on the device

    The Name, Domain, and Tag values support Starts With, Ends With, Equals, and Contains operators. Note these conditions are Boolean AND conditions. For the device to be placed in this Device group, it must meet all the conditions you specify in the Value text box. You can use the Executive value for Tag.

  6. Preview Of Members allows you to see up to 10 devices that will be placed in this device group based on the Members logic.

  7. Click the User Access tab at the top of the Add Device Group fly-out menu, as shown in Figure 1-59.

    This is a screenshot of the Add Device Group fly-out menu with the User Access tab selected.

    FIGURE 1-59 User Access tab

  8. Click the check box next to Executive Support, click the Add Selected Groups button, and then click Done.

  9. You should now be on the Device Groups page shown in Figure 1-60.

    This is a screenshot of Device Groups page. From here, you can choose either Apply Changes or Discard Changes.

    FIGURE 1-60 Applying or discarding changes

  10. You will see a warning at the top of the page indicating that you need to Apply Changes or Discard Changes. Click Apply Changes.

Once you click Apply Changes, a message with a green background appears where the warning was once located indicating that it will take a bit of time to apply the changes; once the changes are complete, the message disappears. You should now see two device groups—the one you created for Executive Machines and one you did not create called Ungrouped Devices (Default). They are ranked 1 and Last, respectively, as seen in Figure 1-61.

This is a screenshot of device groups that have been ranked as 1 and Last in the Rank column.

FIGURE 1-61 Device Groups list

Devices are placed in device groups starting with groups with the lowest rank then working their way down. Once the device meets the criteria for a device group per its criteria, the device becomes a member of that group, and processing for that device stops. Therefore, it is important to put the most specific device group (such as those that match tags) at the top and place less-specific device groups (such as those that match domains) toward the bottom. The Ungrouped Devices (Default) is the “catch-all” device group that is created by default once you create a device group. This device group contains all devices that do not match a criterion in the device groups you create. You can change the rank of the device groups by selecting the device group you want to change and clicking either the Promote Rank or Demote Rank buttons shown in Figure 1-62.

This is a screenshot of the Promote Rank and Demote Rank buttons that are used to promote and demote device groups.

FIGURE 1-62 Promote Rank or Demote Rank buttons

With the changes complete, Mikey, Zach, and Dylan on the executive support staff are the only users with access to the executive devices.

More Info Advanced Rbac Example

See the following blog for an advanced RBAC use case: https://aka.ms/sc200_mderbacadv.

Alert notifications

It is assumed that the security operations team has better things to do than to stare at a dashboard all day, waiting for something to happen. So how will they know when alerts are triggered in Microsoft Defender for Endpoint that need their attention? The Email notifications feature in Microsoft Defender for Endpoint can send emails based on alerts that are generated. These notifications are created through rules which can be customized to send alerts to different email addresses based on their severity and Device group affected.

To receive Alert notifications, follow these steps:

  1. Log in to https://security.microsoft.com as a member of the Azure Active Directory Global Administrator or Security Administrator roles or as a member of an Endpoint role with the Manage Security Settings permission.

  2. In the menu on the left, click Settings > Endpoints.

  3. Under General, click Email Notifications.

  4. On the Alerts page, click Add Item to bring up the New Notification Rule fly-out menu shown in Figure 1-63.

    This is a screenshot showing the New Notification Rule fly-out menu, where you can create a new notification rule.

    FIGURE 1-63 New Notification Rule

  5. In the Rule Name field, type Tier 1 Alerts.

  6. Options for Include Organization Name, Include Organization-Specific Portal Link, and Include Device Information allow you to choose what items you want to appear in the email body. While you might wonder why you wouldn’t include this information by default, you might want to limit this information for privacy reasons given that emails can be forwarded.

  7. Under Devices, select Notify For Alerts On All Devices, though if you plan to notify different email addresses based on different device groups, choose Notify For Alerts On Selected Device Group and choose the device group(s) to use for this notification rule. Also, select Notify For Alerts On All Devices since this is going to the Tier 1 security operators.

  8. Alert Severity allows you to choose what severity the alert must be to trigger this rule. Click Check/Uncheck All to select all severities and click Next to advance to the Recipients settings shown in Figure 1-64.

    This is a screenshot showing the New Notification Rule page with the Recipients tab selected. From here, you can add or remove Recipient Email Address(es), and you can click the Send Test Email button to send a test email.

    FIGURE 1-64 Recipients tab

  9. On the Recipients tab, in the Recipient Email Address field, type in the email addresses that you want to be emailed with this alert notification rule is matched and click Add. Also, you can also click Send Test Email to preview your settings for the rule.

  10. When you are finished, click Save. This returns you to the Email Notifications page. Note there is also a Vulnerabilities page where you can add notification rules when new vulnerabilities are found in the endpoint environment.

More Info Configure Alert Notifications

See the following article for more information on configuring notifications: https://aka.ms/sc200_mdenotify.

Advanced settings

Microsoft Defender for Endpoint’s sensor is used for more than just Endpoint Detection and Response (EDR). Features are being added constantly, and they can be enabled or disabled based on your needs. To enable or disable the advanced capabilities, follow these steps:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles or as a member of a Microsoft Defender for Endpoint role with the Manage Security Settings permission.

  2. In the menu on the left, click Settings > Endpoints.

  3. Under General, click Advanced Features.

There are two types of advanced features:

  • Endpoint features Enable or disable Microsoft Defender for Endpoint capabilities.

  • Integration features Allow for data sharing between other Microsoft products, such as Intune, Microsoft Cloud App Security, and the like.

Following are examples of Endpoint features:

  • Automated investigation The auto-remediation capability that responds to alerts and attempts to return the endpoint back to a healthy state.

  • Automatically resolve alerts If automated investigation can return an endpoint to a healthy state, it will automatically mark the alert as being resolved, so incident responders know it was dealt with.

  • EDR in block mode Enables Defender to block attacks even when there is a third-party anti-virus agent installed.

  • Live Response and Live Response for Servers Allows for an incident responder to open a limited interactive shell with an endpoint.

  • Allow or block file Uses cloud Protection to allow or block files on endpoints.

  • Preview features Allows your subscription to receive features before they become generally available.

  • Microsoft threat experts Allows Microsoft human hunters pseudonymized access to your endpoint data, so that in the event of a breach, these hunters can send targeted attack notifications (TANs) alerts into your tenant to draw your security operations team’s attention to the incident.

Examples of integration features include the following:

  • Show user details Allows Microsoft Defender for Endpoint to call into Azure Active Directory to fill out user information such as job title, department, name, and so on.

  • Microsoft Cloud App Security Network data relating to the cloud application access can be shared with Cloud App Security for discovery. Also, it allows for blocking unsanctioned cloud apps.

  • Microsoft Defender for Identity integration Shares Endpoint data with Microsoft Defender for Identity to improve detections, enhance identity pages, and provide additional evidence in incidents.

  • Share Endpoint alerts with Microsoft Compliance Center Allows risk officers to view Endpoint alerts in the Microsoft 365 Compliance portal and enhances insider risk insights.

  • Microsoft Intune Connection This setting shares the onboarding information with Microsoft Intune to onboard devices into Microsoft Defender for Endpoint, as well as shares the device’s risk score. Intune uses this risk score to mark a device as being compliant or not compliant, based on your risk compliance policy settings in Intune.

More Info Configure Advanced Features in Defender for Endpoint

See the following article for more information on configuring advanced features: https://aka.ms/sc200_mdeadvfeatures.

Respond to incidents and alerts

Now that Microsoft Defender for Endpoint is configured, it is time to look at how to investigate endpoint-related alerts and incidents. There are built-in simulations that you can use to generate benign alerts and incidents; just be sure to run the simulation in a test environment, so you can avoid an unpleasant conversation with your company’s security operations team!

You need to train your security operations team on how to triage alerts and incidents using Microsoft Defender for Endpoint. The simulation you can use to practice responding to alerts and incidents can be accessed by following these steps:

$$$$$$$$$$$$$
  1. Log in to https://security.microsoft.com as any user who has at least the View Data permissions for Endpoint data.

  2. Under Endpoints, expand Evaluation & Tutorials and click Tutorials & Simulations to bring up the Simulations & Tutorials page shown in Figure 1-65.

    This is a screenshot of the Simulations and Tutorials page. The Simulations tab has been clicked, and at the bottom-right, the Get Simulation File button is shown.

    FIGURE 1-65 Simulations & Tutorials

  3. Click the Get Simulation File button under the Automated Investigation (Backdoor) Simulation in the Microsoft section.

  4. Once the file downloads, click the Learn More button to open the guide for this simulation.

  5. Follow the guide for how to run the simulation, it includes the password necessary to open the file and instructions for how to enable the macro that carries out the benign attack. It will take a few minutes for the alerts to populate and for the automated investigation to complete.

  6. To investigate the incident, select Incidents & Alerts in the menu on the left, and then click Incidents.

  7. You will see an incident titled Multi-Stage Incident Involving Initial Access & Persistence On One Endpoint, as shown in Figure 1-66.

    This is a screenshot of the Multi-Stage Incident Involving Initial Access & Persistence On One Endpoint incident page in the Microsoft 365 Security portal.

    FIGURE 1-66 Incidents view in Microsoft 365 Security portal

  8. Expand the incident by clicking the icon next to the Incident Name. Note that there are multiple alerts in this incident. While it is possible to manually associate alerts with incidents, in Microsoft 365 Defender, there are machine-learning models and detection logic running against all alerts that are ingested. Alerts that the machine-learning model believes are related will be grouped into a single incident. This is important because it starts to formulate an attack story for the incident responder, instead of relying on the incident responders to draw this correlation for themselves.

  9. To view more information on this incident, you can click the bubble to the left of the incident noted by the arrow in Figure 1-67 to open the incident fly-out menu.

    This is a screenshot of selecting an incident in the Microsoft 365 Security portal.

    FIGURE 1-67 Selecting an incident

  10. Click Assign To Me. A pop-up window will appear indicating that the incident and all alerts in the incident will be assigned to you. Click Assign To Me in that pop-up. This is a quick way to take ownership of an incident and all linked alerts, which lets your fellow security operators know that you are working this incident.

  11. From the fly-out page, click Open Incident.

  12. You are now viewing the incident with all the associated alerts, starting with the Summary view. The goal of this view is to ensure the incident responder has as much information as needed to determine if the incident can be resolved or if it requires more investigation. If it requires more investigation, additional details are all available in this view as shown in Figure 1-68 to assist in formulating the incident response plan.

    This is a screenshot of an incident on the summary view in the Microsoft 365 Security portal.

    FIGURE 1-68 Viewing the incident summary

  13. First, look at the Alerts And Categories section shown in Figure 1-69.

    This is a screenshot of attack timeline and MITRE ATT&CK mapping for each alert in the Microsoft 365 Security portal.

    FIGURE 1-69 Alert timeline and MITRE ATT&CK mapping

  14. Alerts And Categories is a vertical list of alerts in chronological order, with the top alert occurring first in the chain of alerts. Above the vertical list are the alerts mapped to the MITRE ATT&CK framework showing what stages of the framework the alerts in this incident apply to. The bars signify each stage of the framework; hovering over the bars will show you what stage has alerts and how many alerts are in that stage.

    More Info Mitre ATT&CK Framework

    More information on the MITRE ATT&CK Framework can be found at https://attack.mitre.org/.

  15. Next on the summary screen you see the Scope and Evidence that are involved in this incident. Under Scope, the individual devices and users can also be seen by clicking the applicable Devices and Users sections, as indicated by the arrows in Figure 1-70. Under Evidence, you can click the View All Entities link to see the files, processes, IP addresses, and other evidence related to this incident.

    This is a screenshot of attack timeline and MITRE ATT and CK mapping for each alert in the Microsoft 365 Security portal.

    FIGURE 1-70 Alert timeline and MITRE ATT&CK mapping

  16. Click the Alerts section.

  17. In the Alerts section, you can see a list of alerts that make up this incident. Note how the first alert—Suspicious PowerShell Command Line—has several entries, and they are grouped under a single entry. This is so you can manage alerts resulting from the same detector logic as a single entity or as separate artifacts.

  18. Select the bubble next to the first Suspicious PowerShell Command Line alert. A fly-out page showing additional information about this alert appears, as shown in Figure 1-71.

    This is a screenshot of a selected alert and its fly-out page in the Microsoft 365 Security portal.

    FIGURE 1-71 Selected alert fly-out page

  19. You can classify the alert as a True Alert or False Alert (or in other words, “true-positive” or “false-positive”), which you can use for reporting. This also feeds back into the detector logic in Microsoft Defender for Endpoint and helps Microsoft determine the signal-to-noise ratio of each detector, which is used to measure how effective it is and whether it should be optimized.

    Status allows you to set the alert to In Progress or Resolved, which can also be used for reporting and to let other incident responders know the status of the alert.

    Tip Set Classification and Status On An Incident

    When possible, set the Classification and Status on an incident versus the individual alerts in the incident. Once an incident is classified and the status is set, all alerts in the incident will adopt those settings. This will minimize the amount of overhead when managing incidents and alerts.

  20. On the fly-out page, click Open Alert Page.

  21. The alert page shows you all the information available for the alert, as shown in Figure 1-72.

    This is a screenshot of an alert page in the Microsoft 365 Security portal.

    FIGURE 1-72 Alert page

  22. At the top of the page, there is a breadcrumb trail of where you were before you clicked this alert. This is consistent in the Microsoft 365 Security portal to ensure you keep your place in your investigation and can quickly backtrack if necessary. There is also a View Incident Page link that will return you to the incident that alert is part of. In the Alert Story, you can see the process tree as well as the alert and which event in the process tree triggered the alert. In this case, the Suspicious PowerShell Command Line alert was triggered because of the partially obfuscated command line.

  23. Click the Suspicious PowerShell Command Line item and notice how the pane on the right changes. As you click each entity, the pane on the right shows additional information about the entity you have selected in the Alert Story.

  24. With the Suspicious PowerShell Command Line item selected, click the ellipsis () indicated by the arrow in Figure 1-73.

  25. Clicking See In Timeline allows you to pivot from this alert to the device timeline for when this event occurred, triggering the alert. This is helpful when you want to see what events happened around the time the alert occurred. Clicking Consult A Threat Expert sends this alert to a Microsoft Threat Expert to ask a question, though it is important to note this is an additional service you must pay for on top of your license cost.

    This is a screenshot of an alert page with the ellipsis clicked showing a menu in the Microsoft 365 Security portal.

    FIGURE 1-73 Alert page

  26. Click Create Suppression Rule when there is an EDR sourced alert that is a benign true positive in your environment. A benign true positive is an alert that is a true alert, though it is a normal operation in your environment and can safely be ignored. A theoretical example of this would be a medical application that uses PowerShell to download its application updates encoded in Base64. More than likely, this will raise an alert, and while this is certainly not the best way to do software updates, it is normal operation for the application, so the resulting alert is a benign true positive.

  27. Click Create Suppression Rule, which opens the menu shown in Figure 1-74.

    This is a screenshot of the Create Suppression Rule menu in the Microsoft 365 Security portal

    FIGURE 1-74 Create Suppression Rule for an alert

  28. Great care must be taken when creating suppression rules because they are effectively muting detections in your environment. Like exclusions in an anti-virus program, suppression rules should be created with criteria that is as specific as possible. To illustrate this point, you are creating a suppression rule that involves powershell.exe. It is possible to suppress all alerts related to powershell.exe, though this would be a very bad idea because it would create a major blind spot in your detections!

  29. Suppression conditions can be used to increase the specificity on the suppression rule. In this case, coupling the command line with the file name and folder path should provide criteria that are specific enough to make this suppression rule as safe as possible. Note that SHA1 is not selected because the SHA1 of Powershell.exe will change each time it is patched.

    Note Secure Hash Algorithm 1 (SHA1)

    The SHA1, or Secure Hash Algorithm 1, is a cryptographic hash that is calculated for the file. If two files have the same SHA1, they are considered identical.

  30. Under Action, you can select either to Hide Alert or Resolve Alert. If you do not want to see the alert at all, select Hide Alert. If you want to see the alerts but have them set to be resolved automatically, choose Resolve Alert.

  31. Scope is another great way to limit your exposure in a suppression rule. You can configure the suppression rule to only apply when an endpoint in a device group is the machine the alert involves. If there is only one endpoint that should run this type of command, you can scope the suppression rule to the individual endpoint.

  32. Name and Comment help you document the suppression rule. It is a best practice to add as much information in the Comment text box as possible. In this case, because Contoso uses a change management system to track changes performed in their production environment, the change ID that documents this change was added.

  33. Do not save this suppression rule; instead, click Cancel to return to the alert.

  34. Back on the Alert page, click the ellipsis () menu next to the device object near the top of the page, as shown in Figure 1-75.

    This is a screenshot of the device action menu in the Microsoft 365 Security portal.

    FIGURE 1-75 Device action menu

  35. Below are descriptions for each option:

    • Open Device Page This will pivot the view from the alert page to the device page.

    • Device Value You can set a value on devices as High, Normal, or Low based on the importance of the device. For example, domain controllers could be marked High because they should be one of the most protected assets in your network. Executive officer machines are another example on which you would want to set a value. This setting also affects your organization’s exposure level score based on the findings on these devices. Exposure scores will be covered in the “Managing risk through security recommendations and vulnerability management” section later in this chapter.

    • Manage Tags Allows you to add or remove tags from the device.

    • Run Antivirus Scan Runs either a quick or full scan on the device.

    • Collect Investigation Package Various preprogrammed scripts and commands run on the device that collect items like registry keys, scheduled tasks, DNS cache, and the like. This information is zipped and uploaded to the portal for download by an incident responder.

    • Restrict App Execution Applies a code integrity policy on the device to only allow Microsoft applications to run, which helps stop malicious binaries from running.

    • Initiate Automated Investigation Manually kick off the artificial intelligence–driven Automated Investigation process on the device. Typically, automated investigations are initiated by supported alert types.

    • Initiate Live Response Session Starts a live response session with the device.

    • Isolate Device Instructs the Windows Firewall to block all inbound and outbound traffic to and from the device except for communications with the Defender for Endpoint cloud service.

    • Consult A Threat Expert This option allows you to submit a question about this device to the Microsoft Threat Experts (MTE) service. For example, if you thought this device showed suspicious behavior but were not sure, selecting this option will send a request to an MTE team member.

      Note Microsoft Threat Experts (MTE)

      The Microsoft Threat Experts (MTE) Consult A Threat Expert service is a purchased service and is not covered on the exam.

    • Action Center Review what actions were performed on the device, such as Isolate Device, Collect Investigation Package, and so on.

  36. Click the View Incident Page at the top of the alert page to return to the incident. If needed, you can return to the incident by clicking Incident & Alerts on the left.

  37. Click the Investigations section and then click the bubble next to Powershell Dropped A Suspicious File On The Machine Triggering Alert. Click Open Investigation Page, as shown in Figure 1-76.

    This is a screenshot of the investigation menu in the Microsoft 365 Security portal.

    FIGURE 1-76 Open investigation page

  38. You now see the Investigation Summary page shown in Figure 1-77.

    This is a screenshot of the Investigation Summary page. The Investigation Graph tab has been selected, and the right-hand portion of the window shows an investigation graph.

    FIGURE 1-77 Investigation graph

  39. The Investigation Summary page shows the investigation that was started automatically by the Automated Investigation self-healing technology in Defender for Endpoint. The investigation graph is best read in a counterclockwise direction, starting with the top-most element, Alert Received. The investigation graph shown here tells you the following things:

    • PowerShell Dropped A Suspicious File On The Machine is the alert that triggered the investigation. Also, there is one correlated alert, which you can see by clicking the Alerts section above the investigation graph.

    • One device is involved in the investigation: WIN10-1.

    • To determine how to get the device healthy again, 3,698 Entities were analyzed.

    • Entities analyzed were composed of files, processes, services, drivers, IP addresses, and persistence methods.

    • Based on the entities analyzed, two entities were found to be malicious.

    Clicking each icon in the Investigation graph will take you to the respective sections above the graph.

  40. Click the Evidence icon, which looks like a bug.

  41. In the Evidence list, click the entity named winatp-intro-backdoor.exe. This will open the File fly-out menu shown in Figure 1-78.

    This is a screenshot of the File fly-out menu in the Microsoft 365 Security portal.

    FIGURE 1-78 File menu

  42. This fly-out page provides detailed information about this file, including file hashes, worldwide prevalence, file path, file size, and more. Click Open File Page at the top of the File fly-out menu.

  43. On the File Page, you can see all the information Defender for Endpoint has on this file. You can also take the following actions:

    • Stop And Quarantine File Stops this file if it is running on any endpoint and quarantines the file.

    • Add Indicator Add this file’s SHA2 to the file indicators list. Indicators are files, IP addresses, URLs, or code-signing certificates that you want to block or allow in your environment.

    • Collect File / Download File Allows you to collect the file from an endpoint that has the file and download it from the portal. Either the Collect File or Download File option will be displayed, depending on whether the file is present in your subscription. If Download File is shown, more than likely, the file has been collected in the past and is present in your Defender for Endpoint tenant. If Collect File is shown, the file has not been collected and needs to be retrieved from an endpoint. Once the file is available for download, you can use Download File, which will prompt you for a password. The password will be used for the zip archive that the file is placed in before being downloaded to your machine.

    • Consult a Threat Expert This option allows you to submit a question about this file to the Microsoft Threat Experts (MTE) service. For example, if you thought this file showed suspicious behavior but were not sure, selecting this option would send a request to an MTE team member. This is a service that must be purchased and is not covered on the exam.

    • Action Center Allows you to see what actions have been performed on this file and the status of the action.

  44. Click the PowerShell Dropped A Suspicious File On The Machine text at the top of the screen to return to the investigation shown in Figure 1-79.

    This is a screenshot of the Investigation Summary showing the Investigation Graph in the Microsoft 365 Security portal

    FIGURE 1-79 Investigation Summary

  45. At the left under Investigation Details, you see that the Status is Remediated.

  46. Earlier in this chapter, you learned about remediation levels, which are configurable on device groups. In this example, the device is configured for fully automated remediation, meaning any pending actions resulting from an investigation will automatically be approved. You can see the remediation level by clicking the device icon in the investigation graph, which takes you to the Devices tab shown in Figure 1-80.

    This is a screenshot of the Devices tab . One device is shown— WIN10-1.CONTOSO.COM—and in the Remediation Level column, Fully Automated is shown.

    FIGURE 1-80 Devices tab

  47. In the list of devices, you see that WIN10-1.CONTOSO.COM has a Remediation Level of Fully Automated.

  48. Because Automated Investigation retuned this device back to healthy by removing the threats, you can now close this incident.

  49. Click the incident name Multi-Stage Incident Involving Initial Access & Persistence On One Endpoint at the top of the page. You can also access this incident using the Incident menu item under Incidents & Alerts on the far-left menu.

  50. Once you are on the incident page for this incident, click the Manage Incident option in the upper-right portion of the screen. This will bring up the Manage Incident fly-out menu, as shown in Figure 1-81.

    This is a screenshot of the Manage Incident menu in the Microsoft 365 Security portal. The Assign To Me and Resolve Incident options are toggled to the On position.

    FIGURE 1-81 Manage Incident

  51. Click the toggle switch next to Resolve Incident. This will change the status of the incident and all alerts in the incident to Resolved.

  52. Select True Alert as the Classification.

  53. Under Determination, you have the following options:

    • APT Advanced Persistent Threat indicates this incident is related to an attack by a known actor.

    • Malware Incident was caused by malware.

    • Security Personnel A member of the security team triggered this incident on their own machine.

    • Security Testing Indicates this incident was part of a security simulation. Choose this option.

    • Unwanted Software The incident was caused by software that should not run on the machine.

    • Other Select if this incident does not match any of the previous determination options.

    Important Determination Setting

    The Determination setting will be applied to the incident and any linked alerts to the incident that do not already have a determination set on the individual alert.

  54. Type comments in the Comment text box. Adding comments is optional, but it is helpful to document your findings while investigating the incident. Other security responders can see the findings and add additional information if applicable.

  55. Once you complete your comment entry, click Save.

Congratulations, you have now triaged your first incident in Microsoft Defender for Endpoint!

Creating custom detections

While there are many built-in detections in Microsoft Defender for Endpoint, most security operations teams need the ability to create custom detections. There are three ways to generate custom detections:

  • Generate custom indicators

  • Generate custom detection rules using Advanced Hunting

  • Create an alert API

More Info Creating an Alert API

Typically, custom detection rules and custom indicators are used to create custom detections. Creating an alert API is not covered on the exam, though more information can be found at https://aka.ms/sc200_mdealertapi.

Custom detection rules using Advanced Hunting

Advanced Hunting is one of the most popular features in Microsoft Defender for Endpoint. It provides lightning-fast query response time against up to 30 days of data, even in environments with millions of endpoints onboarded. The query language you use to search your data in Advanced Hunting is called Kusto Query Language, or KQL. If you have used Azure services such as Log Analytics in the past, you already have some exposure to KQL. Advanced Hunting can be used for ad-hoc queries against your data, which is typically how custom detections start out.

More Info Log Analytics Queries

Microsoft hosts a GitHub repository that is filled with great queries to get you started: https://GitHub.com/microsoft/Microsoft-365-Defender-Hunting-Queries.

At this Advanced Hunting GitHub, there is a KQL query we can use to detect WMI deletions of shadow-copy snapshots. This is a technique usually seen in correlation with Ransomware. Shadow-copy snapshots are removed prior to encryption so that recovery using these snapshots is not possible. Here is the KQL query:

DeviceProcessEvents
| where FileName =~ "wmic.exe"
| where ProcessCommandLine has "shadowcopy" and ProcessCommandLine has "delete"
| project DeviceId, Timestamp, InitiatingProcessFileName, FileName,
ProcessCommandLine, InitiatingProcessIntegrityLevel, InitiatingProcessParentFileName

This query is explained by the following pseudocode:

"Check the DeviceProcessEvents table for event entries where the process file name is
like wmic.exe and where the process command line has the strings shadowcopy and delete.
Once this data is found, show the DeviceID, Timestamp, InitiatingProcessFileName,
FileName, ProcessCommandLine, InitiatingProcessIntegrityLevel, and
InitiatingProcessParentFileName."

Now that you understand what this query is doing, you will create a custom detection using this query and by following these steps:

  1. Log in to https://security.microsoft.com as a member of the Azure Active Directory Global Administrator or Security Administrator roles or as a member of an Endpoint role with the Manage Security Settings permission.

  2. In the menu on the left, click Hunting > Advanced Hunting.

  3. By default, the Get Started section is shown on the right. You can go through the exercises or click the Query section to change to the query editor. On the left is the schema for advanced hunting, as shown in Figure 1-82.

    This is a screenshot of the Advanced Hunting schema in the Microsoft 365 Security portal. Arrows identify devices and files, while a bracket identifies tables. Clicking the vertical ellipsis icon next to a table opens the schema reference for that table.

    FIGURE 1-82 Advanced Hunting schema

    The three dots next to each table opens the schema reference for that table. Hovering over the fields pops up a description for the field.

  4. Type the following query into the query window. Note KQL is a case-sensitive language.

    DeviceProcessEvents
    | where FileName =~ "wmic.exe"
    | where ProcessCommandLine has "shadowcopy" and ProcessCommandLine has "delete"
    | project DeviceId, Timestamp, InitiatingProcessFileName, FileName,
    ProcessCommandLine, InitiatingProcessIntegrityLevel,
    InitiatingProcessParentFileName

    Notice when you type, you are assisted by autocomplete.

  5. To make sure the query syntax is error free, click Run Query.

    You probably will not get any results in your environment, which is okay. To create a custom detection, the query does not need to return results initially.

    Tip Don’t Query Too Often

    You do not want a query to return results too often because the custom detection will generate too many alerts.

  6. Click the Create Detection Rule option in the upper-right corner of the query window, which displays the error shown in Figure 1-83.

    This is a screenshot showing the Can’t Save Detection Rule pop-up that appears when you attempt to create a custom detection without all the required fields.

    FIGURE 1-83 Error when creating a custom detection

  7. This happened because we did not add the ReportId field to the project statement in the query, which is required to be in the returned fields for a custom detection. Timestamp, ReportId, and a field that represents a specific device, user, or mailbox are all required for custom detections.

  8. Modify your query to add ReportId to the project line, as shown below:

    DeviceProcessEvents
    | where FileName =~ "wmic.exe"
    | where ProcessCommandLine has "shadowcopy" and ProcessCommandLine has "delete"
    | project ReportId, DeviceId, Timestamp, InitiatingProcessFileName, FileName,
    ProcessCommandLine, InitiatingProcessIntegrityLevel,
    InitiatingProcessParentFileName
  9. Click Run Query to make sure you do not have syntax errors and then click Create Detection Rule.

  10. The following fields are shown in the Create Detection Rule wizard, as well as in Figure 1-84.

    This is a screenshot of the Create Detection Rule wizard. Here, you can enter the Detection Name, Frequency, Alert Title, Severity, Category, Description, and Recommended Actions.

    FIGURE 1-84 Create Detection Rule wizard, Alert Details

    • Detection Name A name for the detection.

    • Frequency This is how often the custom detection rule will run. The choices are Every 24 Hours, Every 12 Hours, Every 3 Hours, or Every Hour. The more often your custom detection rule runs, the smaller the window of time it will look back. In Figure 1-84, Every Hour has been chosen.

    • Alert Title This is the title of the alert you will see in the alert view.

    • Severity This is the severity of the alert. The choices are High, Medium, Low, and Informational. Choose High because this is ransomware-related and needs to be triaged as fast as possible.

    • Category This is the type of activity that best matches this alert. Choose Ransomware.

    • Description This is a description for the custom detection rule.

    • Recommended Actions This instructs the incident responder regarding the steps to take for triaging and resolving this alert.

  11. Click Next to advance to the Impacted Entities page shown in Figure 1-85.

    This is a screenshot of Impacted Entities page in the Create Custom Detection rule wizard.

    FIGURE 1-85 Impacted Entities

  12. Only the Device option will be available because the device info will be returned in this query. Select the Device option and select DeviceId from the drop-down menu. Click Next to open the Actions page shown in Figure 1-86.

    This is a screenshot of the Actions configuration in the Create Detection Rule wizard.

    FIGURE 1-86 Create Detection Rule, Actions

  13. From this screen, you can trigger a response action on the device that triggers the custom detection. These actions are the same as covered previously. Select Isolate Device and make sure Full is selected because you do not want to allow Outlook, Skype, or Teams to have access while isolated. Then click Next to open the Scope page shown in Figure 1-87.

    This is a screenshot of the Scope configuration in the Create Detection Rule wizard.

    FIGURE 1-87 Scope for the custom detection rule

  14. The Scope page lets you select which device group you want to target with the custom detection rule. Select All Devices and click Next.

  15. The Summary page lists all the configuration settings made so far in the Create Detection Rule wizard. You can edit any of the settings from this screen. When the settings are configured as desired, click Create to create the custom detection rule.

To test the custom detection rule, follow these steps:

  1. Run the following command on an onboarded endpoint using an elevated command prompt or PowerShell:

    WMIC.exe shadowcopy delete /nointeractive
  2. Wait for about 5 minutes for the data to reach the tenant.

  3. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure AD roles or as a member of an Endpoint role with the Manage Security Settings permission.

  4. In the menu on the left, expand Hunting and click Custom Detection Rules.

  5. You should see the custom detection rule you created in previous steps. Click the bubble next to the custom detection rule. A fly-out menu for the rule will appear, as shown in Figure 1-88:

    This is a screenshot of the Detection Rules fly-out menu in the Detection Rules page.

    FIGURE 1-88 Detection Rules

  6. In this fly-out menu, you can see the Last Run and Next Run of this custom detection rule. To see the full details of this rule, click Open Detection Rule Page to open the page shown in Figure 1-89.

    This is a screenshot of the custom detection rule editing page with an arrow pointing to the Run option.

    FIGURE 1-89 Click Run to manually run the custom detection rule.

  7. On this page, you can fully manage the custom detection rule and see any Triggered Alerts and Triggered Actions. If you do not see a triggered alert and the Last Run Time field has not been populated, click Run in the top-right corner of the page.

  8. If the data reached the tenant from the onboarded device, this should generate the custom detection alert shown in Figure 1-90.

    This is a screenshot of the custom detection rule alert.

    FIGURE 1-90 Custom detection rule alert

  9. Note the fields in the details on the right reflect the information provided when you created the custom detection rule.

  10. Click the ellipsis () next to the Device Name at the top of the alert. You should see the Release From Isolation option at the bottom right (see Figure 1-91).

    This is a screenshot of the device action menu. An arrow points to the Release From Isolation option.

    FIGURE 1-91 Release From Isolation

  11. This indicates the machine is currently isolated because that was the action you specified to occur when activity on a device matched the custom detection rule question. Click Release From Isolation.

More Info Create and Manage Custom Detection Rules

See the following article for more information on creating and managing custom detection rules: https://aka.ms/sc200_m365customdetect.

Custom indicators

Indicators are another way to generate custom alerts, as well as block activity based on files, IP addresses, URLs, domains, and certificates. While you could create custom detection rules for these types of indicator-based detections, custom indicators are a much better-suited tool for non-logic-based detections, and they have the additional benefit of being able to block the file.

You receive some Indicators of compromise (IOCs) from a threat intel feed, which contains an SHA256 hash. If this hash is seen in your environment, you want Microsoft Defender for Endpoint to raise an alert. To accomplish this, you need to create a custom alert based on a file indicator by following these steps:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles or as a member of an Endpoint role with the Manage Security Settings permission.

  2. In the menu on the left, click Settings.

  3. On the Settings page, click Endpoints.

  4. On the Endpoints settings page under Rules, click Indicators.

  5. Under File Hashes, click the Add Item option, which opens the Add File Hash Indicator menu shown in Figure 1-92.

    This is a screenshot of the Add a file hash indicator wizard.

    FIGURE 1-92 Add a file hash indicator.

    Note Importing Lists of Indicators

    You can also import lists of indicators by using the Import option. A template is provided in the Import Option menu.

  6. On the Add File Hash Indicator fly-out menu on the Indicator page, in the File Hash text box, type the following SHA256 hash. (This hash is from a benign text file generated for the purposes of this book. You can generate your own text file and use the Get-FileHash PowerShell command to test it in your environment.)

    0296F272170F18B0A04760DE5DBA41029F74B3247F0609CBAA8858B4DB1C4333
  7. Set Expires On (UTC) to Never, as previously shown in Figure 1-92, then click Next to advance to the Action page shown in Figure 1-93.

    This is a screenshot of the Add A File Hash Indicator wizard. The Action tab has been selected, and under Response Action, Alert Only has been selected.

    FIGURE 1-93 Add File Hash Indicator, Action tab

  8. Select Alert Only and provide an Alert Title, Alert Severity, Category, Recommended Actions, and Description. Notice these are all the same fields you set in custom detections rules. This is because we are configuring an alert to generate when this indicator is seen. Click Next to move to the Scope page shown in Figure 1-94.

    This is a screenshot of the Add A File Hash Indicator wizard. The Scope tab has been selected, and under Device Groups Scope, All Devices In My Scope has been selected.

    FIGURE 1-94 Add File Hash Indicator, Scope tab

  9. Use the Scope page to configure what device group this indicator and alert will target. Choose All Devices In My Scope and click Next.

  10. The Summary page allows you to see all your choices. If everything looks good, click the Save button. The next time this file hash is needed on any onboarded endpoint, an alert will be raised with the previously entered information.

More Info Create Indicators

For more information about creating indicators, see https://aka.ms/sc200_mdeioc.

Managing risk through security recommendations and vulnerability management

Keeping up with vulnerabilities and risky security configurations is a daunting task. Traditionally, scanning-based vulnerability assessment tools seemed like they were doing good work. They would scan as many devices as the tool could reach over the network, assess the configuration weaknesses and vulnerabilities, and output a multipage report with all the required actions that an already overworked infrastructure administration team would need to fix. There are three major issues with this approach:

  1. Offline devices are not scanned, resulting in blind spots in the report.

  2. When the vulnerability or weakness on the device is remediated, it is a manual effort to update the report or would require another scan that is also subject to incomplete information caused by offline devices.

  3. The list of weaknesses and vulnerabilities is typically a lengthy list with little prioritization. IT teams mitigate the high-ranked items, but those items do not necessarily represent true organizational risk.

One workaround to issues 1 and 2 above is to install an agent on the devices so they report their data, rather than being scanned remotely. This leads to other issues, such as broken or missing agents and lack of reporting when the device is not connected to the corporate network.

Threat and Vulnerability Management (TVM) in Microsoft Defender for Endpoint does not have these issues for the following reasons:

  1. There is no agent The sensor is built into the Windows Operating System.

  2. There is no scanning The Defender for Endpoint service that reports EDR data also reports these weaknesses and vulnerabilities on an ongoing basis.

  3. No corporate network required Any time the device has access to the Internet, it can send data since the Defender for Endpoint service is in Azure.

  4. Vulnerabilities and configuration weaknesses are prioritized based on risk to the organization When the risk of a vulnerability or configuration weakness raises, such as when a public exploit is posted that uses a vulnerability, the prioritization dynamically changes to ensure that you remediate the riskiest vulnerabilities and weaknesses in your environment.

More Info Threat and Vulnerability Management

For more information about threat and vulnerability management, see https://aka.ms/sc200_tvm.

Threat & Vulnerability Dashboard

You need to have a quick and clear view of the weaknesses and vulnerabilities that are present across your organization. The Threat & Vulnerability Dashboard is a great way to get this comprehensive, high-level assessment. Follow these steps to familiarize yourself with the dashboard.

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles or as a member of an Endpoint role with the View Data—Threat And Vulnerability Management permission.

  2. Under Endpoints, expand Vulnerability Management and click Dashboard.

  3. The following tiles are shown in the dashboard shown in Figure 1-95.

    • Exposure Score This shows the amount of exposure affecting devices in your organization. Ideally, you want the score to be as low as possible.

    • Top Security Recommendations This is a list of actions you can take to lower your Exposure Score. They are ordered by Impact, which is the measure of the number of points by which your Exposure Score will be lowered by remediating that action

    • Microsoft Secure Score For Devices This rates the security posture of your environment based on Application, OS, Network, Accounts, and Security Controls. A higher percentage indicates a better security posture.

    • Exposure Distribution This shows the number of devices that are susceptible to attacks, which are ranked as High, Medium, and Low.

    • Remediation Activities This is a list of activities to remediate vulnerabilities and configuration weaknesses.

    • Top Vulnerable Software This is a list of software with vulnerabilities that is intelligently ranked on factors such as number of vulnerabilities, threats, and number of affected devices.

    • Top Exposed Devices This is a list of devices with the most exposure that is intelligently ranked on factors such as number of vulnerabilities, threats, and security recommendations.

      This is a screenshot of the Threat & Vulnerability Management Dashboard.

      FIGURE 1-95 Threat & Vulnerability Management Dashboard

Remediation activities and exceptions

Now that you have your security recommendations ranked intelligently and dynamically, you need to assign remediation activities to the individual or teams responsible for patch management. The Threat & Vulnerability Management Dashboard tells you which actions to take first that will have the greatest impact in lowering the risk in your environment.

Follow these steps to create a remediation activity:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles or as a member of an Endpoint role with the Active Remediation Actions: Threat And Vulnerability Management—Exception Handling And Remediation Handling role.

  2. Under Endpoints, expand Vulnerability Management and click Recommendations to open the view shown in Figure 1-96.

    This is a screenshot of the Security Recommendations view.

    FIGURE 1-96 Security recommendations

  3. Just remediating the Update Microsoft 10 (OS And Built-In Applications) line item will result in the Exposure Score lowering by 30.65 points. One of the reasons this action will lower the score is because there is a verified, public exploit available for some of the vulnerabilities that these two devices are affected by.

  4. You can tell if there is an exploit available for one or more of these vulnerabilities by looking at the icons under Threats. These threats indicate the following:

    • Threat insights As shown in Figure 1-97, when this icon is red, there is a publicly available exploit for one or more vulnerabilities.

      This is a screenshot of a red threat insights icon.

      FIGURE 1-97 Threat insights icon

    • Breach insights If this icon is red, there is an active alert attributed to the vulnerability, as shown in Figure 1-98.

      This is a screenshot of the breach insights icon.

      FIGURE 1-98 Breach insights icon

  5. Click Update Microsoft Windows 10 (OS And Built-In Applications) in the list of security recommendations.

  6. Click Request Remediation to open the view shown in Figure 1-99.

    This is a screenshot of the Remediation Request wizard screen.

    FIGURE 1-99 Remediation Request wizard

  7. Select Software Update (Recommended) under Remediation Options.

  8. Select the Open A Ticket In Microsoft Endpoint Manager (For AAD Joined Devices) check box.

    Tip Enable Microsoft Intune Connection

    If you do not see the Open A Ticket In Microsoft Endpoint Manager (For AAD Joined Devices) option, you need to turn on the Microsoft Intune Connection in the Endpoint Advanced Features settings.

  9. Select a Remediation Due Date.

  10. Under Priority, select High.

  11. Type some notes under Add Notes and click Next to open the Review And Finish screen shown in Figure 1-100.

    This is a screenshot of the Review And Finish screen in the Request And Remediation wizard. The Submit button is shown at the bottom of the screen.

    FIGURE 1-100 Review And Finish, Request remediation wizard

  12. Select Export All Remediation Request Data To CSV. This creates a CSV file that you can provide with your change management request because it contains the remediation action and a list of the machines requiring the remediation.

  13. Click Submit.

  14. Once the remediation request is created, click Done.

Now that you have a remediation request created, you can track the request in the Remediation menu item under Vulnerability Management. Your patch management team should now see the remediation request in Microsoft Endpoint Manager under Security Tasks, as shown in Figure 1-101.

This is a screenshot of the Security Tasks screen in Microsoft Endpoint Manager showing the remediation request.

FIGURE 1-101 Security tasks in Microsoft Endpoint Manager

More Info Remediate Vulnerabilities with Threat and Vulnerability Management

For more information about remediating vulnerabilities, see https://aka.ms/sc200_tvmremedy.

In some cases, you need to create an exception for security recommendations. For example, machines that do not support the hardware requirements for Credential Guard. Follow these steps to create an exception for these machines:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles or as a member of an Endpoint role with the Active Remediation Actions: Threat And Vulnerability Management—Exception Handling And Remediation Handling.

  2. In the menu on the left, under Endpoints, expand Vulnerability Management and click Recommendations.

  3. In the Search option in the upper-right of the window, type credential guard. This should filter the security recommendation list as shown in Figure 1-102.

    This is a screenshot of the Security Recommendations screen with the Turn On Microsoft Defender Credential Guard window at the right

    FIGURE 1-102 Turn on Microsoft Defender Credential Guard

  4. Click the Turn On Microsoft Defender Credential Guard security recommendation. This will open a window with a description of the recommendation. Click the Exception Options button at the bottom of the window to open the Create Exception screen shown in Figure 1-103.

    This is a screenshot of the Create Exception menu in Security Recommendations.

    FIGURE 1-103 Create Exception

  5. This screen allows you to set the Exception Scope to a device group. Under Justification And Duration, select Planned Remediation (Grace) to indicate that this is a temporary exception. The Provide Justification Context text box allows you to enter notes for the exception reason, which in this case is that because the hardware is old and does not support Credential Guard, it will be replaced. The Exception Duration allows you to set a fixed time length (30, 60, or 90 days), or you can select a custom date up to 1 year beyond the current date.

  6. Once you select your options, click Submit.

  7. When the Exception is created, click Done.

You now have an exception created for the Turn On Microsoft Defender Credential Guard security recommendation.

More Info Create and View Exceptions for Security Recommendations

For more information about managing exceptions, see https://aka.ms/sc200_tvmexception.

Skill 1-3: Detect, investigate, respond, and remediate identity threats

Your identity is composed of unique characteristics that other people and systems use to distinguish you from other people and objects. Most people think of Social Security Numbers or drivers licenses when you ask them what identity means to them. In security operations, an identity is a set of credentials that is used to identify a user or system and grant authorization and access to a system based on these credentials. When identities are compromised, the attacker effectively becomes the identity, using it to conceal themselves and gain unauthorized access to systems.

Identifying and responding to Azure Active Directory identity risks

In Azure Active Directory (AD) Identity Protection, there are two methods that can be used to detect attackers using stolen identities to access systems. These methods include:

  • User risk The user account shows a pattern of unusual usage.

  • Sign-in risk The user account signs in from a known suspicious IP address.

When an identity such as a user account shows signs of either of these conditions, protections can be put in place to ensure the user account is being used by the intended party. These protections can be put in place either automatically, such as forcing a multifactor authentication (MFA) challenge followed by a password reset, or by an administrator taking actions to secure the account through blocking a user account. Azure AD Identity Protection policies can be set to configure Azure Active Directory to respond and remediate appropriately to these identity threats.

In Skill 1-1, you saw that Contoso CFO Paul DePaul’s credentials were phished using a fake log-in page. You need to determine if Paul’s identity—his user account—was stolen using Azure AD Identity Protection and if so, remediate this threat and configure the appropriate policies to improve the protection of user accounts going forward. To do this, follow these steps:

  1. Log in to https://portal.azure.com as a Global Administrator or Security Administrator.

  2. Using the Search bar at the top of the portal, type identity protection and click Azure AD Identity Protection to open the Identity Protection Overview page shown in Figure 1-104.

    This is a screenshot of the Azure AD Identity Protection overview page

    FIGURE 1-104 Azure AD Identity Protection Overview

  3. You see there are risky users and sign-ins detected. Under the Report section on the left, click Risky Users, as shown in Figure 1-105.

    This is a screenshot of the Recent Risky Sign-Ins for a user.

    FIGURE 1-105 Recent Risky Sign-Ins

  4. You see that there are several risky sign-ins for Paul DePaul. Clicking the first entry in the list and then clicking Risk Info in the lower pane brings up the view shown in Figure 1-106.

    This is a screenshot of the risk information on the Risky Sign-Ins pane.

    FIGURE 1-106 Risky Sign-Ins risk information

  5. This successful log-in was from an anonymous IP address. Anonymous IPs are used by attackers to mask their real IP addresses so that they remain anonymous on the Internet.

  6. In this example, clicking the user’s risk report takes you to the Paul DePaul—Risky Users screen, which is shown in Figure 1-107.

    This is a screenshot showing Paul DePaul, who has been identified as a risky user.

    FIGURE 1-107 Risky users

  7. You can take action based on the findings so far. Because it seems that Paul’s account is compromised given the amount of risky sign-in events and his account’s Risk Level is High, click Block User to prevent future sign-ins for Paul’s account. Click Confirm User Compromised, which will signal back to Azure AD Identity Protection that this is a true-positive.

More Info Identity Protection Risks

For more information about identity protection risks, see https://aka.ms/sc200_idrisks.

Configuring users at risk alerts

You need to be alerted when a risky user or sign-in is detected. To be notified via email alerts when this type of risky activity occurs, follow these steps:

  1. Log in to https://portal.azure.com as a Global Administrator or Security Administrator.

  2. Using the Search bar at the top of the portal, type identity protection and click Azure AD Identity Protection.

  3. Under Notify, click Users At Risk Detected Alerts, as shown in Figure 1-108.

    This is a screenshot of the Users At Risk Detected Alerts configuration page.

    FIGURE 1-108 Users At Risk Detected Alerts

  4. Here, you can type email addresses to be notified when user’s risk level reaches or exceeds Low, Medium, or High levels. You want to be alerted any time any risk is detected, so select Low and click Save.

  5. Weekly Digest is a weekly email containing risky sign-ins, users, and links to the related reports to users you specify. Configure the users you for whom you want to receive the weekly digest and click Save.

More Info Azure AD Identity Protection Notifications

For more information about configuring these notifications, see https://aka.ms/sc200_idpnotify.

Configuring multifactor authentication and risk policies

To improve your defenses against identity compromise such as what happened to Paul’s user account, you can configure policies to make it harder for attackers to use compromised accounts if they have the username and password for the account. A multifactor authentication (MFA) registration policy allows you to add a third form of authentication in addition to the username and password required when a user logs in. In the previous example with Paul’s account, the attacker had the username and password and could log in. Once MFA is added to Paul’s account, when Azure AD Identity Protection detects a risky sign-in for Paul, Azure AD could then challenge him to use a third form of authentication, such as a rotating cipher on his cell phone, before granting him access.

To require users to register for MFA, follow these steps to set an MFA registration policy:

  1. Log in to https://portal.azure.com as a Global Administrator or Security Administrator.

  2. Using the Search bar at the top of the portal, type identity protection and click Azure AD Identity Protection.

  3. Under Protect, click MFA Registration Policy, as shown in Figure 1-109.

    This is a screenshot of the MFA registration policy page under Identity Protection.

    FIGURE 1-109 MFA registration policy

  4. Under Assignments, choose the users or groups to target for this policy. In this example, the finance department that Paul is a member of is targeted.

  5. Under Enforce Policy, click to activate the policy, and then click Save.

Now that an MFA registration policy is configured, you can configure an MFA challenge if Azure AD Identity Protection suspects a sign-in is risky. Follow these steps to configure a sign-in risk policy.

  1. Log in to https://portal.azure.com as a Global Administrator or Security Administrator.

  2. Using the Search bar at the top of the portal, type identity protection and click Azure AD Identity Protection.

  3. Under Protect, click Sign-In Risk Policy, as shown in Figure 1-110.

  4. Under Users, select the desired users or groups. In this example, we have chosen the finance department.

  5. Under Sign-In Risk, specify the risk level that will trigger the policy. Select Low And Above to trigger an alert on any indication that the sign-in is risky.

    This is a screenshot of the Sign-In Risk Policy screen in Identity Protection.

    FIGURE 1-110 Sign-In Risk Policy

  6. Under Controls, select Allow Access, select Require Multi-Factor Authentication, and click Done.

  7. Click the Enforce Policy slider to the On position, and then click Save.

Next, you configure a user risk policy that will take action when a user is marked as being at risk. Follow these steps:

  1. Log in to https://portal.azure.com as a Global Administrator or Security Administrator.

  2. Using the Search bar at the top of the portal, type identity protection and click Azure AD Identity Protection.

  3. Under Protect, click User Risk Policy, as shown in Figure 1-111.

    This is a screenshot of the User Risk Policy screen in Identity Protection.

    FIGURE 1-111 User Risk Policy

  4. Under Users, select the desired users or groups. In this example, we have chosen the finance department.

  5. Under User Risk, specify the risk level that will trigger the policy. Select High to trigger on users who are marked as high risk.

  6. Under Controls, select Allow Access, select the Require Password Change box, and click Done.

  7. Click the Enforce Policy slider to toggle it On, and then click Save.

More Info Identity Protection Policies

For more information about configuring Identity Protection policies, see https://aka.ms/sc200_idppol.

Identifying and responding to Active Directory Domain Services threats using Microsoft Defender for Identity

Microsoft Defender for Identity helps you detect and investigate malicious activity involving identities in Active Directory. Using various signals like network traffic and events from domain controllers, Defender for Identity can detect and investigate techniques in the following stages of the MITRE ATT&CK framework:

  • Reconnaissance

  • Credential access

  • Discovery

  • Lateral movement

  • Exfiltration

  • Command and control

  • Defense evasion

  • Persistence

To begin monitoring your Active Directory environment, follow this process:

  1. First, you need to create your Microsoft Defender for Identity instance.

  2. Once the instance is created, you then configure a user account or, preferably, a group Managed Service Account (gMSA) so that Defender for Identity can look up objects in Active Directory.

  3. Lastly, you install the Microsoft Defender for Identity sensor on each of your domain controllers.

  4. Each sensor gathers network traffic and events from your domain controllers to detect malicious activity and generate alerts.

More Info Quickstart for Microsoft Defender for Identity

For a quick start guide on setting up Defender for Identity, see https://aka.ms/sc200_setupmdi.

Investigating an alert in Microsoft Defender for Identity

An example of a technique in the reconnaissance stage is when an attacker explores Server Message Block (SMB) sessions from a server, such as a file server or domain controller, to find user accounts and the IP addresses they originate from. This allows the attacker to map out what accounts they need to compromise to gain access to the systems with those IP addresses. The User And IP Address Reconnaissance (SMB) alert in the Defender for Identity portal shows this attack. You will use this alert to train your security operations team on how to triage alerts in the Microsoft Defender for Identity portal.

More Info Generating A Similar Attack

To generate a similar alert in your environment, follow the lab guide here: https://aka.ms/sc200_mdiplaybook.

Follow these steps to triage this alert:

  1. Log in to the Microsoft Defender for Identity portal at https://portal.atp.azure.com as a member of the Global Administrator or Security Administrator Azure AD role. You can also log in as a lower-privileged user if they are a member of the Azure ATP (instance name) Administrators, Azure ATP (Instance Name) Users, or Azure ATP (Instance Name) Viewers Azure AD groups. This opens the Timeline view shown in Figure 1-112.

    This is a screenshot of the Timeline screen in Microsoft Defender for Identity.

    FIGURE 1-112 Microsoft Defender for Identity Timeline

  2. The Timeline shows alerts generated by Defender for Identity in chronological order. Click the User And IP Address Reconnaissance (SMB) alert to open the alert shown in Figure 1-113.

    This is a screenshot of the alert details screen in Microsoft Defender for Identity.

    FIGURE 1-113 Alert detail

  3. The alert tells you that two different accounts from WIN10-1 enumerated SMB sessions on the domain controller named DC1. Hovering the mouse over DC1 shows the operating system, when the machine was first seen, and the domain it is a member of. Also, you can see that it is marked as a Sensitive object because it is a domain controller.

  4. Under Evidence, you can see the accounts and IP addresses that were exposed because of this enumeration, which can help you in your investigation into suspicious activities involving these accounts.

  5. You can also search for a user account and see details about the alert. In the Search box located in the upper-right portion of the screen, type helpdesk1 and press Enter to bring up the helpdesk1 user page shown in Figure 1-114.

    This is a screenshot of the user account timeline in Microsoft Defender for Identity.

    FIGURE 1-114 User account timeline

  6. The user account helpdesk1 has five open security alerts and is logged into two different computers. Also, you can access a timeline view of the activities performed by helpdesk1. Click Directory Data on the left to display the view shown in Figure 1-115.

    This is a screenshot of the Direct Data screen for a user in Microsoft Defender for Identity.

    FIGURE 1-115 User Directory Data

  7. This view shows information from Active Directory about the user, such as group memberships, account info, and user account control features, such as Password Never Expires. Note this account is also marked Sensitive because it is a member of a sensitive group, Domain Admins And Administrators.

  8. Note the profile picture of helpdesk1 is a bee. This is because helpdesk1 is configured as a Honeytoken account, as shown in Figure 1-116.

    This is a screenshot of the Honeytoken configuration screen in Microsoft Defender for Identity.

    FIGURE 1-116 Honeytoken configuration

  9. An account can be configured as Honeytoken account so that an alert will generate when the user account authenticates to Active Directory. This can serve as a trap for attackers to signal they are in your environment.

More Info Manage Sensitive or Honeytoken Accounts

More information about sensitive and honeytoken accounts can be found here: https://aka.ms/sc200_mdihoney.

More Info Working with the Microsoft Defender for Identity Portal

You can learn more about the Defender for Identity portal at https://aka.ms/sc200_mdiportal.

Using Microsoft Cloud App Security to identify and respond to threats in Software as a Service

While Software as a Service (SaaS) provided faster time-to-value because of its quick implementation times for users, SaaS also introduced new challenges for security operations and data loss prevention teams in terms of monitoring and application control. The use of SaaS applications such as Office 365, Dropbox, and others allow users to share files and interact with people outside their organizations more easily than ever before. The need for security operations teams and data loss prevention officers to monitor and control this type of activity is what birthed the Cloud App Security Broker (CASB) market. CASB products, such as Microsoft Cloud App Security (MCAS), allow security operations and data loss prevention teams to:

  • Discover what cloud applications are used in the environment.

  • Apply conditional access to sanctioned cloud applications for session control, such as allowing files to be downloaded only to corporate-owned assets.

  • Use policies to control what data is shared from the cloud application and with whom it is shared.

  • Detect anomalies and threats associated with cloud application sign-ins and activities.

Configure threat detection policies in MCAS

MCAS has several threat-detection policies for discovering and alerting on suspicious and malicious activities occurring in cloud applications. One of the built-in anomaly detection policies is the Impossible Travel Policy. The Impossible Travel Policy raises an alert when a user performs actions in a cloud application from two physical locations during a time interval that is shorter than the time it would take someone to travel between these two locations.

Let’s say you suspect that there are anomalous user log-in activities occurring in your environment, such as user accounts being used from disparate locations. Follow these steps to examine the Impossible Travel Policy that can detect these threats:

  1. Log in to https://portal.cloudappsecurity.com as a member of the Global Administrator or Security Administrator Azure AD roles.

    More Info Manage Admin Access

    MCAS supports role-based access controls. Learn more at https://aka.ms/sc200_mcasrbac.

  2. Under Control, click Policies.

  3. Click the Threat Detection tab at the top of the main page.

  4. Scroll down and click Impossible Travel Policy to open the Edit Anomaly Detection Policy page shown in Figure 1-117.

    This is a screenshot of the Edit Anomaly Detection Policy screen in Microsoft Cloud App Security (MCAS).

    FIGURE 1-117 Edit Anomaly Detection Policy

  5. In the Edit Anomaly Detection Policy page for the Impossible Travel Policy, you can target specific users or groups for the policy and adjust the Sensitivity of the policy. For example, if most of your users travel frequently, you can set the Sensitivity to Low. However, because your finance department users do not travel and the group contains users with access to sensitive data, you need the policy to be more sensitive for those users.

  6. Find the Scope section of the policy page shown in Figure 1-118.

    This is a screenshot of the Scope setting, where you can set the Sensitivity for users and groups.

    FIGURE 1-118 Impossible Travel Policy Scope

  7. Select Set Sensitivity To Specific Users And Groups.

  8. Under Filters, select User Groups Equals Finance Department.

  9. Slide the Sensitivity bar under the filter to High. This will increase the sensitivity for finance department users for this policy.

  10. You can configure Alerts from this policy to be sent via email or text message. Because you are using Microsoft 365 Defender, these alerts will appear in the Microsoft 365 Security portal (https://security.microsoft.com), so there is no need to configure an Alert here.

  11. Scroll down to see the Governance Actions shown in Figure 1-119.

    This is a screenshot of the Governance Actions setting.

    FIGURE 1-119 Governance Actions

  12. You can select actions to apply to all cloud apps or to specific actions for specific cloud apps when the policy is matched by an activity. Under Office 365, select the Confirm User Compromised option. This will flag the user to be challenged for MFA, and if successful, the user will be required to change their password per your sign-in and user risk policy settings defined in Skill 1-2.

  13. Once finished, click Update to save your changes to the policy.

Note Seven-Day Learning Period

The Impossible Travel Policy has a learning period of seven days to minimize benign true positives as much as possible.

Respond to alerts in MCAS

When policies are matched, alerts will be generated for investigation and response. You configured the Impossible Travel Threat detection policy, so now you will investigate the generated alerts. Follow these steps to investigate an Impossible travel alert:

  1. Log in to https://portal.cloudappsecurity.com as a member of the Global Administrator or Security Administrator Azure AD roles.

  2. Click the Alerts option in the menu on the left.

  3. At the top of the Alerts page, click the Category Filter drop-down menu and select Threat Detection.

  4. Click the Impossible Travel Activity alert to open the alerts shown in Figure 1-120.

    This is a screenshot of an Impossible Travel Activity alerts in Microsoft Cloud App Security (MCAS).

    FIGURE 1-120 Impossible Travel Activity alerts

  5. The alert indicates that Paul DePaul had activities originating from the Netherlands and Russia within a 4-minute period, which is what triggered the alert. A subset of the activities performed using Paul’s account are shown in the Activity Log sections. All activities can be seen by clicking the Investigate In Activity Log option.

  6. Click the drop-down menu next to Resolution Options, as shown in Figure 1-121.

    This is a screenshot of the Resolution Options for an alert in Microsoft Cloud App Security (MCAS).

    FIGURE 1-121 Resolution options

  7. Because it appears that Paul’s account is compromised, click Confirm User Compromised.

  8. Click Confirm User Compromised again on the confirmation pop-up window.

  9. Because you have taken steps to mitigate this alert, click the Close Alert button shown in Figure 1-122.

    This is a screenshot of the Close Alert button in Microsoft Cloud App Security (MCAS). When this button is clicked, two options appear: False Positive and True Positive. In this example, True Positive is selected.

    FIGURE 1-122 Close Alert

  10. Click True Positive.

  11. The Close Alert As True Positive pop-up window offers these options: Comment, Send Feedback, and Opt-In To Share Your Email Address. The latter option allows the MCAS development team to contact you for more information if required.

More Info Manage Alerts

For more information on managing alerts in MCAS, see https://aka.ms/sc200_mcasalertmgmt.

More Info Detect Suspicious User Activity with UEBA

For a full tutorial on managing IP address rangers and tuning anomaly detection policies in MCAS, see https://aka.ms/sc200_mcasalerttune.

Skill 1-4: Manage cross-domain investigations in the Microsoft 365 Defender Security portal

In the previous skills, you investigated alerts generated in each of the Microsoft threat protection products and the risk domains they cover (see Figure 1-123).

This is a table showing the Microsoft threat protection products and the risk domains covered by each.

FIGURE 1-123 Microsoft threat protection products

Each of these products are best-in-market for the risk domains they cover. Unfortunately, attackers do not operate in silos. They move to whatever risk domain they need to achieve their end goals. Investigation is especially challenging for security operations teams for the following reasons:

  • Alerts are investigated individually, and there are too many alerts to triage and manage.

  • Alerts generated by each threat protection product appear in separate consoles.

  • Each console has a different look and feel and requires a wide variety of skill sets.

  • Automated self-healing is siloed to each threat protection product.

  • Data searches are done within each risk domain.

Microsoft 365 Defender addresses these challenges with the following design principles:

  • Single-incident model Machine Learning runs across alerts generated by each threat protection product and places them into incidents. This helps the incident responder track an attacker as they move through risk domains.

  • Portal consolidation Each of the threat protection products is consolidating into the Microsoft 365 Security portal at https://security.microsoft.com.

  • Automated self-healing Automated self-healing now spans across email and device risk domains.

  • Advanced hunting unified schema One schema to rule all the threat domains.

Examine a cross-domain incident

Contoso Corporation recently experienced a security incident on April 11, 2021, which involved a high-ranking finance officer named Paul DePaul and the CEO Bob Smith. Figure 1-124 is a flow diagram of the attack.

This is a diagram that shows the flow of a security incident involving Paul and Bob at Contoso Corporation.

FIGURE 1-124 Security incident flow diagram

Following are the steps of the attack shown in Figure 1-124:

  1. The attacker sends an email to Paul DePaul, a high-ranking finance officer at Contoso Corporation. In the email is a URL to a credential phishing site, and the email appears to come from Bob Smith, the CEO of Contoso Corporation.

  2. Paul clicks the link and enters his username and password into the website, which means the attacker now has Paul’s credentials.

  3. The attacker uses a Tor browser to anonymously access Paul’s mailbox.

  4. The attacker sets up an email forwarding rule to send emails received by Paul from Bob Smith to the attacker’s email.

  5. The attacker emails Bob Smith using Paul’s mailbox. The email contains a URL to a malicious, macro-enabled Excel document hosted on a web server.

  6. Bob opens the Excel document thinking it is from Paul. He runs the macro, which sets up a command-and-control channel back to the attacker’s computer.

  7. The attacker begins to run commands to explore Contoso’s Active Directory domain.

This attack spans the risk domains of email, identity, and device, which makes it time consuming to piece together using individual alerts and possibly involving separate teams at Contoso. Because the attacker is already on a device inside Contoso, the security operation team needs to work quickly to mitigate the threat.

Manage a cross-domain incident using Microsoft 365 Defender

Microsoft 365 Defender uses a single incident model that aggregates alerts from Microsoft Defender for Office 365, Defender for Endpoint, Defender for Identity, and MCAS. Data from each of these solutions is also aggregated to provide a unified hunting experience.

You need to triage the incident in Microsoft 365 Defender, stop the attacker, and remediate the threat. Follow these steps to mitigate this incident:

  1. Log in to https://security.microsoft.com as a member of the Global Administrator or Security Administrator Azure Active Directory roles.

  2. On the Home screen, the Threat Analytics card is shown (see Figure 1-125).

    This is a screenshot showing the threat analytics tile on the Microsoft 365 Defender Home page.

    FIGURE 1-125 Threat analytics tile

  3. The Threat Analytics card indicates there is 1 active threat: Adwind RAT lands using DDE. Click the red bar to open the Threat Analytics Report shown in Figure 1-126.

    This is a screenshot showing a Threat Analytics report for Adwind RAT lands using DDE in Microsoft 365 Defender.

    FIGURE 1-126 Threat analytics report

  4. Threat analytics is a collection of threat intelligence reports written by threat researchers at Microsoft. Data from Microsoft 365 Defender is integrated into these reports to indicate the degree to which your organization is from the described threat. The report also shows ways to mitigate these risks.

  5. Under Related Incidents, you see that there are three active alerts in one active incident. Click View All Related Incidents.

  6. Click the Incident listed as Related Incidents to open the incident view shown in Figure 1-127.

  7. The incident that was linked to the Threat Analytics reports is titled Multi-Stage Incident Involving Initial Access & Discovery On One Endpoint Reported By Multiple Sources. This name is generated by machine learning that aggregated all the alerts from the alert sources. You see that there are 16/16 Active Alerts that fall within four MITRE ATT&CK tactics. This indicates that of the 16 alerts in this incident, 16 of them are not resolved. You also see that there is one impacted device, two impacted users, and one impacted mailbox.

    This is a screenshot showing the incident page in Microsoft 365 Defender.

    FIGURE 1-127 Incident page

  8. To mitigate the threat as fast as possible, you need to isolate the affected device and prevent the involved user accounts from logging in. Click the Devices section to bring up the Devices tab shown in Figure 1-128.

    This is a screenshot showing the Devices tab, where you have options to isolate a device.

    FIGURE 1-128 Devices tab

  9. In this example, click the bubble next to the win10-2 device, and then click Isolate Device. In the isolation confirmation pop-up window, enter comments into the Comments field. It is mandatory that you add comments so that other incident responders working in the console know why the device has been isolated. Once you enter your comments, click Confirm.

  10. Click the Users section to open the Users tab shown in Figure 1-129.

    This is a screenshot showing the Suspend User option.

    FIGURE 1-129 Suspend User

  11. Click the Paul user object as shown in Figure 1-129, click the ellipsis (…) to display additional actions and click Suspend User. Click Suspend User on the confirmation pop-up window. Repeat these steps for the Bob user object located under Paul. This will prevent Paul and Bob from logging in, but it also will keep the attacker from logging in as Paul or Bob.

Now that the threat is mitigated, you need to investigate the attack to understand how it developed. Follow these steps to investigate how the attack happened:

  1. Click Manage Incident in the upper-right part of the screen. Click Assign To Me and then click Save. Next, click the Alerts section to bring up the alert view shown in Figure 1-130.

    This is a screenshot showing the alerts view in an incident. An arrow points to the Service Source column.

    FIGURE 1-130 Alerts view in an incident

  2. In the Service Source column, multiple sources are shown. Click the bubble next to the Impossible Travel Activity alert to display further details about this alert, as shown in Figure 1-131.

  3. This alert indicates that Paul DePaul traveled from the Netherlands to Russia within 4 minutes.

    This is a screenshot showing the Impossible Travel Activity alert.

    FIGURE 1-131 Impossible Travel Activity alert

  4. In the Alerts list, click the bubble next to Creation Of Forwarding/Redirect Rule, and then click Open Alert Page, as shown in Figure 1-132.

    This is a screenshot showing the inbox mail forwarding rule.

    FIGURE 1-132 Inbox mail forwarding rule

  5. In this alert, you see that a new rule was created in Paul’s mailbox. The Parameters text box shows that the rule forwards emails to a gmail.com account when the email is from Bob.

  6. Return to the Alerts page of the incident.

  7. Click the bubble next to one of the Suspicious PowerShell Command-Line alerts and click Open Alert Page, as shown in Figure 1-133.

    This is a screenshot showing the Suspicious PowerShell Command Line alert page.

    FIGURE 1-133 Suspicious PowerShell Command Line alert

  8. At the top of the alert page are the entities that the alert applies to—the device win10-2 and user CONTOSOob. Under Alert Story is the process tree where the rest of the alerts in this incident are shown. Because there are multiple alerts pertaining to EXCEL.EXE, Defender for Endpoint taints this process (marks it as untrustworthy), which means all subprocesses and their associated alerts are shown. This prevents the incident responder from needing to click every alert in the incident.

  9. The document that more than likely contained the malicious macro is named quote3245.xlsm. The.XLSM extension indicates that it is an Excel file with a macro. Because Excel opened this file and is a child process of msedge.exe—which is a subprocess of OUTLOOK.EXE—this tells you that the file was downloaded from a URL in an email. You can use Advanced Hunting to find this email and the URL.

  10. Click Hunting in the menu on the far left and click Advanced Hunting.

  11. Use this query:

    let badfile = "quote3245.xlsm";
    
    EmailUrlInfo
    
    | where Timestamp between (datetime(2021-04-11T20:00:00) .. datetime(2021-04-
    13T00:00:00)) and Url has badfile
    
    | join EmailEvents on NetworkMessageId
    
    | project Timestamp, NetworkMessageId, Url, SenderFromAddress,
    RecipientEmailAddress

    The query is broken down like so:

    • It sets the variable badfile to quote3245.xlsm.

    • It then searches the EmailUrlInfo table for quote3245.xlsm as a partial match in the Url field records.

    • Next, it joins the EmailEvents table on the results, keying off the NetworkMessageId.

    • You need the join to expose the additional fields in the email—the SenderFromAddress and RecepientEmailAddress.

  12. Click Run Query.

  13. The results are shown in Figure 1-134.

    This is a screenshot showing the Advanced Hunting query editor and the results of the query you ran.

    FIGURE 1-134 Advanced hunting query editor

  14. You can see the full URL from which the file was downloaded, as well as the sender (Paul) and the recipient (Bob). The attacker used Paul’s compromised mailbox to send the email to Bob to increase the chances of Bob clicking the link and opening the document because it came from Paul, not a Gmail account.

  15. Copy the NetworkMessageId by right-clicking the value and choosing Copy Value To Clipboard. We need it to remove the email from Bob’s mailbox.

  16. In the menu on the far left, under Email & Collaboration, click Explorer.

  17. Change the View drop-down menu to All Email. In the query field selector, select Network Message ID, click in the text box next to Network Message ID, and press Ctrl+V to paste in the NetworkMessageId you copied in the previous step. Change the date range to before and after April 11, 2020 to only search email around April 11, 2020 and click the Refresh button.

  18. As shown in Figure 1-135, the search found the email that was sent from Paul to Bob with the malicious URL.

    This is a screenshot showing the Explorer tool. Under Email & Collaboration is a list containing the email sent from Paul to Bob.

    FIGURE 1-135 Email and collaboration explorer query tool

  19. The bar chart in Figure 1-135 shows the number of recipients for this email that were returned in this search and the date and time they were received. Below the bar chart are the email details. In the email details area, click the check box to select the email, as shown in Figure 1-135.

  20. Click the Actions drop-down menu shown in Figure 1-136.

    This is a screenshot showing the Actions drop-down menu, which shows the actions you can take on an email in the Explorer tool.

    FIGURE 1-136 Email Actions

  21. Click Hard Delete, which will remove the email from Bob’s mailbox permanently.

Now that you removed the email, you need to ensure the URL is blocked from Endpoints by using URL indicators. Follow these steps to add a URL indicator:

  1. On the far-left menu under Endpoints, click Search.

  2. Select URL in the drop-down menu, type the domain you want to search for, and press Enter. If there are multiple URLs that match your search, you will need to click the correct URL. If there is only one match for your search, a page like the one shown in Figure 1-137 will be shown.

    This is a screenshot of the URL page, which shows details about the URL you searched for.

    FIGURE 1-137 URL page

  3. The URL page allows you to see what machines had network communications with the URL. There are two machines in Contoso that accessed the URL that delivered the malicious Excel document, so you need to block this domain.

  4. Click Add Indicator in the upper-right portion of this screen to open the Add URL/Domain Indicator wizard.

  5. Under Expires On (UTC), select Never, and then click Next to advance to the Action tab shown in Figure 1-138.

  6. Under Response Action, select Alert And Block, type details for the Alert in the Description field, and click Next.

  7. On the Scope tab, under Device Groups, click All Devices In My Scope; click Next.

  8. To add the indicator, click Save on the Summary page.

This is a screenshot of the Add URL/Domain Indicator page, which allows you to configure blocks and/or alerts, as well as the alert properties.

FIGURE 1-138 Add URL/Domain Indicator

To ensure the malicious document quote3245.xlsm is not allowed to be opened on any endpoint in Contoso, use these steps to add a file indicator:

  1. On the far-left menu, under Endpoints, click Search.

  2. Select File from the drop-down menu and type the file name quote3245.xlsm; press Enter to search.

  3. The file page for quote3245.xlsm opens, as shown in Figure 1-139.

    This is a screenshot of the File page showing hashes, size, signer, alerts and other properties.

    FIGURE 1-139 File page

  4. You can see on which devices the file was seen. In the upper-right part of the screen, click Add Indicator.

  5. In the Add File Hash Indicator wizard, select Never from the options under Expires On (UTC). Click Next to advance to the Action page shown in Figure 1-140.

    This is a screenshot of the Add File Hash Indicator wizard with options to alert and/or block the file. There are configuration parameters for the corresponding alert.

    FIGURE 1-140 Add file hash indicator

  6. On the Action tab, configure the Response Action to Alert And Block, type details for the Alert, and click Next.

  7. On the Scope page, click All Devices In My Scope and click Next.

  8. Click Save on the Summary page to add the file hash indicator.

Now that all the entities from the incident are cleaned up, you should now close the incident. Follow these steps to close the incident:

  1. On the far-left menu, under Incidents & Alerts, click Incidents and locate the incident named Multi-Stage Incident Involving Initial Access & Discovery On One Endpoint Reported By Multiple Sources.

  2. In the upper-right portion of the incident page, click Manage Incident to open the Manage Incident fly-out menu shown in Figure 1-141.

    This is a screenshot of the Manage Incident fly-out window with the Resolve Incident and Classifications options.

    FIGURE 1-141 Manage Incident

  3. Click the Resolve Incident toggle, and under Classification, select True Alert.

  4. Under Determination, choose Malware, and click Save.

More Info Track and Respond to Emerging Threats with Threat Analytics

To learn more about Threat Analytics, see https://aka.ms/sc200_ta.

More Info The Unified Microsoft 365 Security Center Overview

To learn more about the Microsoft 365 Security portal, see https://aka.ms/sc200_m365secoverview.

Thought experiment

In this thought experiment, demonstrate your skills and knowledge of the topics covered in this chapter. You can find answers to this thought experiment in the next section.

Securing Contoso Corporation from modern threats

You are a senior member of the security operations team at Contoso Corporation, a company that writes software for autonomous cars. Executives at the company report they have received an increasing amount of spear phishing emails that appear to come from board of director members. Most of these spear phishing emails contain URLs pointing to websites that mimic Office 365 log-in pages. Unfortunately, the security team at Contoso is overwhelmed by the number of alerts coming from endpoints, so they have not been able to give the spear phishing issue enough attention.

To make matters worse, the tier 1 security operators report they had access to Microsoft Defender for Endpoint data last week, but after you enabled the roles feature in Defender for Endpoint, they no longer have access to the Endpoint data.

MCAS is also generating many Impossible Travel Alerts, which started around the time Contoso switched its VPN provider to another company overseas.

1. What configuration changes could you make in Microsoft Defender for Office 365 to mitigate the spear phishing issue?

2. What could you do to help the security operations team keep up with Endpoint alerts?

3. Why did the tier 1 security operations team lose access to Defender for Endpoint data after roles were enabled in Defender for Endpoint? How can you fix this issue?

4. What can you do to tune the MCAS impossible travel alerts to reduce the number of benign true positives?

Thought experiment answers

This section contains the solution to the thought experiment. Each answer explains why the answer choice is correct.

1. You can configure anti-phishing policies and add the email addresses of the board of directors to the users to protect. You can also configure a Safe Links policy to address the credential phishing URLs. Both changes are made in Microsoft Defender for Office 365.

2. You can configure device groups in Microsoft Defender for Endpoint to Full—Remediate Threats Automatically and enable an advanced feature, Automatically Resolve Alerts. This will enable the Automated Investigation self-healing feature in Microsoft Defender for Endpoint to investigate new alerts, remediate found threats, and automatically close alerts. This would reduce the workload of the security team.

3. The tier 1 security operations team was given access to the Microsoft Defender for Endpoint data through membership in the Azure AD role Security Readers. When Roles are enabled in Defender for Endpoint, Security Readers lose access to the portal. To resolve this issue, the tier 1 team’s security group should be assigned a role with the permission to view data for security operations data.

4. Add the VPN IP network ranges to the known IP addresses configuration in MCAS. This will exclude the VPN IP range from impossible travel detections and reduce the benign true positives.

Chapter Summary

  • Safe Links, Safe Attachments, and anti-phishing policies in Microsoft Defender for Office 365 can help protect users from malicious links, attachments, and impersonated emails, respectively.

  • Attack Simulation Training can help educate your users on how to spot phishing and other malicious document content.

  • Microsoft Defender for Endpoint not only helps you protect, detect, and respond to endpoint threats, it can also recommend security settings and report vulnerable software in your environment that pose the highest risk of exploitation.

  • The automated investigation self-healing feature can reduce the workload of your security operations team, so they can concentrate on proactive hunting and improving protection.

  • Azure Active Directory Identity Protection can detect risky sign-ins and user accounts at risk of being compromised. Multifactor authentication and requiring a password change can be invoked to protect these accounts.

  • Microsoft Cloud App Security allows you to discover the cloud applications you users access. It can also alert you to unusual and malicious activity based on user behavior patterns.

  • Microsoft Defender for Identity can detect reconnaissance and user account compromise in Active Directory Domain Services environments.

  • Microsoft 365 Defender improves the efficiency and effectiveness of your security operations teams by providing a single portal for Microsoft threat protection products, a single incident model, intelligent Automated Investigation self-healing, and a combined schema for Advanced Hunting and custom detections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.160.154