Investigate Security Incidents

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 14 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Lesson: Investigating Security Incidents in Microsoft Defender XDR

Introduction: The Criticality of Incident Investigation

In the modern digital landscape, security operations centers (SOCs) are bombarded with thousands of alerts every single day. If a security analyst tried to investigate every single alert individually, they would quickly become overwhelmed, leading to "alert fatigue" and the high probability of missing a genuine, high-impact breach. This is where Microsoft Defender XDR (Extended Detection and Response) changes the game. Instead of focusing on isolated alerts, Defender XDR focuses on incidents.

An incident is a collection of correlated alerts, suspicious events, and affected assets that together represent a single attack campaign. By grouping related activity into a single incident, Microsoft Defender XDR allows security teams to see the "big picture" of an attack rather than just the fragmented pieces. Investigating security incidents effectively is the most important skill for a security analyst because it determines how quickly an organization can stop an ongoing attack, contain the damage, and begin the recovery process.

This lesson will guide you through the process of investigating incidents within the Microsoft Defender portal. We will explore how to triage incidents, analyze the attack story, use the automated investigation tools, and perform manual hunting to uncover the truth behind complex threats.


Not read yet

Understanding the Incident Lifecycle

Before diving into the technical steps, it is helpful to visualize the lifecycle of an incident. Understanding this flow helps analysts prioritize their time and ensures that no critical steps are missed during the heat of an investigation.

  1. Alerting and Correlation: Defender XDR uses machine learning to group individual alerts (e.g., a suspicious PowerShell script, a malicious login, and an unusual file download) into a single incident.
  2. Triage and Prioritization: The analyst reviews the incident queue, looking at severity, status, and the scope of affected assets to decide which incidents require immediate attention.
  3. Investigation: This is the core phase where the analyst explores the incident, examines the attack story, views affected devices, and looks at user activity logs.
  4. Remediation: The analyst takes action to stop the threat, such as isolating a device, disabling a user account, or deleting a malicious file.
  5. Post-Incident Review: Once the threat is contained, the analyst documents the findings, closes the incident, and looks for ways to improve security posture to prevent similar future attacks.

Callout: Alert vs. Incident It is vital to understand the distinction between an alert and an incident. An alert is a single notification that something suspicious happened, such as "Unusual login from an unknown IP address." An incident is the story that connects that login to a subsequent malware installation and a data exfiltration attempt. Always investigate the incident to understand the context of the alerts.


Not read yet

Step 1: Navigating the Incident Queue

The Microsoft Defender portal provides a centralized incident queue. Your first task as an analyst is to filter and sort this queue to find the most pressing issues.

Filtering for Impact

When you open the Incidents & Alerts page, you will see a list of active incidents. You should use the filtering pane on the right side to narrow your focus. Key filters include:

  • Severity: Start with "High" and "Medium" severity incidents.
  • Status: Ensure you are looking at "Active" or "In progress" incidents.
  • Classification: Filter by "True positive" if you are looking for confirmed threats, or look for "Unassigned" incidents to pick up new work.
  • Category: You can filter by specific attack types, such as "Phishing," "Malware," or "Credential Access."

Prioritizing Your Work

Not all incidents are created equal. An incident involving a domain controller or a C-level executive's laptop is inherently more critical than one involving a workstation in an isolated lab environment. Look for the "Impacted assets" column in the queue to quickly gauge the potential blast radius of an incident before you even open it.


Not read yet

Step 2: Deep Dive into the Incident Page

Once you click on an incident, you are presented with the Incident Summary page. This page is designed to provide you with everything you need to know about the attack.

The Attack Story

The "Attack Story" tab is your most valuable asset. It provides a chronological visual representation of the attack. You will see a graph showing how the attacker moved through the environment, starting from the initial point of entry (the "entry vector") and moving toward their ultimate goal.

  • Nodes: Each node in the graph represents an entity, such as a user, a file, a process, or a device.
  • Edges: The lines connecting the nodes represent the actions taken, such as "Process created" or "File read."
  • Time-based view: You can toggle the view to see the timeline of events, which is essential for understanding the speed and sequence of the attack.

Tip: Use the Graph View When looking at complex attacks involving multiple machines and users, the graph view is often easier to parse than a long list of events. Look for "clusters" of activity, as these often indicate where the attacker spent the most time or performed the most significant actions.


Not read yet

Step 3: Investigating Affected Assets

After reviewing the attack story, you need to look at the specific assets involved. The "Assets" tab on the incident page lists all devices, users, and mailboxes impacted by the incident.

Analyzing Devices

Clicking on an affected device takes you to the device page. Here, you can:

  • View security history: See all alerts related to this device.
  • Collect investigation package: If you need deep forensics, you can trigger the collection of logs and files from the device.
  • Isolate the device: If the device is actively compromised, you can use the "Isolate device" action to disconnect it from the network while maintaining your connection to it for investigation.

Analyzing Users

If a user account was compromised, you need to determine if the attacker is still using that account. Check the "User" page to see recent sign-in activity and any unusual mailbox rules that might have been created.

Warning: Account Compromise If you suspect an account is compromised, do not just reset the password. Check for "persistence mechanisms" first. Attackers often create new "shadow" admin accounts or set up forwarding rules in Outlook to receive copies of all incoming emails before you even realize the account was breached.


Not read yet

Step 4: Using Automated Investigations

Microsoft Defender XDR includes self-healing capabilities that can automatically investigate and remediate certain types of threats. When an incident is triggered, you may see an "Automated Investigation" running.

How it Works

The automated investigation engine acts like a virtual analyst. It follows a set of pre-defined "playbooks" to:

  1. Check for similar files or processes across your entire environment.
  2. Analyze files using cloud-based sandboxing.
  3. Look for indicators of compromise (IOCs) like known malicious IP addresses.
  4. Suggest remediation actions, such as removing a malicious file from all machines.

You should always review the results of the automated investigation. While the engine is very effective, it may sometimes miss the human context of an attack. If the engine suggests an action, you can approve or reject it after reviewing the evidence.


Not read yet

Step 5: Advanced Hunting with KQL

Sometimes, the information provided in the incident summary is not enough. You may need to perform "Advanced Hunting" using the Kusto Query Language (KQL). This allows you to query your security data directly to find patterns that the automated systems might have missed.

Practical Example: Finding Malicious PowerShell

If you see an alert about a suspicious PowerShell script, you might want to see if that same script was executed on any other machines. You can use a query like this:

DeviceProcessEvents
| where FileName =~ "powershell.exe"
| where ProcessCommandLine contains "hidden" or ProcessCommandLine contains "encodedcommand"
| project Timestamp, DeviceName, InitiatingProcessFileName, ProcessCommandLine
| sort by Timestamp desc

Explanation of the code:

  • DeviceProcessEvents: This is the table containing information about process executions on your devices.
  • where FileName =~ "powershell.exe": This filters for PowerShell processes. The =~ operator makes the search case-insensitive.
  • where ProcessCommandLine contains ...: This looks for common flags used by attackers to hide their activities.
  • project: This selects only the columns that are relevant to your investigation.
  • sort by: This puts the most recent events at the top of your results.

When to use Advanced Hunting

  • When you need to find the "patient zero" of an infection.
  • When you need to verify if an indicator of compromise (like a malicious URL) appears elsewhere in your environment.
  • When you are performing a proactive threat hunt to find signs of an attacker who has not yet triggered an alert.

Not read yet

Best Practices for Incident Investigation

To be an effective security analyst, you must follow a disciplined approach. Below are some industry-standard best practices.

1. Maintain Documentation

Always document your findings in the "Comments" section of the incident. If another analyst picks up the incident, they should be able to read your comments and understand exactly what you have done and what you have discovered. This is critical for shift handovers.

2. Don't Ignore "Low" Severity Alerts

Attackers often perform "low and slow" attacks. They might trigger a low-severity alert by failing a login attempt, then wait a few days before trying again. If you ignore all low-severity alerts, you might miss the reconnaissance phase of a larger attack.

3. Verify Before You Remediate

Before you delete a file or disable an account, make sure you are not disrupting a legitimate business process. If you are unsure, check with the device owner or the user. A false positive that disrupts a production server is almost as bad as a missed alert.

4. Close the Loop

Once an incident is resolved, always update the "Classification" and "Determination" fields. This helps Microsoft Defender learn from your actions and improves the quality of future alerts.


Not read yet

Common Pitfalls to Avoid

Even experienced analysts can fall into traps. Here is how to avoid the most common mistakes:

  • Tunnel Vision: Analysts often focus so hard on the specific alert that they forget to look at the broader environment. Always zoom out and look at the "Attack Story" to see what happened before and after the alert.
  • Ignoring Cloud Activity: Many attacks today move between on-premises devices and cloud services like Microsoft 365 or Azure. If you only look at the device, you might miss the data being exfiltrated from the cloud.
  • Over-reliance on Automation: Automation is a tool, not a replacement for human judgment. Always verify the findings of the automated investigation.
  • Failing to Check for Persistence: As mentioned earlier, attackers love to leave a "backdoor" so they can return later. Always check for new scheduled tasks, new local accounts, or modified startup folders on compromised devices.

Not read yet

Quick Reference: Incident Investigation Checklist

Phase Action Purpose
Triage Check Incident Severity Determine priority of response.
Analysis Review Attack Story Understand the "Who, What, Where, When."
Validation Verify Alerts Distinguish between true threats and false positives.
Forensics Run KQL Queries Find hidden indicators of compromise.
Containment Isolate/Disable Assets Stop the attacker from moving further.
Review Document Findings Ensure knowledge transfer and compliance.

Frequently Asked Questions

Q: Why is my incident still "Active" even after I fixed the issue?

A: An incident remains active until a human analyst manually changes the status. Always ensure you update the status to "Resolved" and classify the incident (e.g., "True positive") after you have finished your work.

Q: Can I investigate an incident from a mobile device?

A: While you can access the Microsoft Defender portal from a mobile browser, it is highly recommended to use a desktop browser for full functionality, especially when running complex KQL queries or viewing large attack story graphs.

Q: What if the attacker deleted their logs?

A: This is why Microsoft Defender XDR is powerful. Logs are streamed to the cloud in real-time. Even if the attacker deletes the local logs on the device, the data has already been captured and stored in the Defender backend, ensuring you still have the evidence you need.


Not read yet

Advanced Scenario: A Multi-Stage Attack

To put these concepts into practice, let's walk through a common multi-stage attack scenario.

  1. The Entry: A user clicks a malicious link in a phishing email. The link downloads a macro-enabled document.
  2. The Execution: The macro runs a PowerShell script. An alert is triggered for "Suspicious process execution."
  3. The Expansion: The script reaches out to a command-and-control (C2) server and downloads a secondary payload. This triggers a "Malware detected" alert.
  4. The Persistence: The malware creates a scheduled task to run every time the computer boots up.
  5. The Investigation:
    • You open the incident and see the alert chain.
    • You use the Attack Story to see the sequence: Email -> Word Doc -> PowerShell -> Network Connection -> Scheduled Task.
    • You use Advanced Hunting to see if that same malicious IP address contacted any other devices in your network.
    • You Isolate the infected device.
    • You Remediate by deleting the scheduled task and the malicious file.
    • You Reset the user's password because their credentials were likely captured.

This systematic approach ensures that you address every phase of the attack, not just the initial alert.


Not read yet

Key Takeaways

  1. Incidents over Alerts: Always focus on the incident as a whole. An incident is a collection of related alerts that tell the complete story of an attack.
  2. Use the Attack Story: The visual graph in the incident page is your best tool for understanding the attacker's path, from entry to persistence.
  3. Leverage Automation, But Verify: Automated investigations save time, but they are not infallible. Always review their findings and suggested actions before applying them.
  4. Master KQL: Learning KQL for Advanced Hunting is the single most important skill for moving from a junior to a senior security analyst. It allows you to find threats that are not yet known to the system.
  5. Persistence is Key: Never consider an incident "resolved" until you have checked for and removed persistence mechanisms (like scheduled tasks or hidden accounts).
  6. Document Everything: Clear documentation is essential for team coordination and for performing post-incident reviews. Never leave a resolution unexplained.
  7. Think Broadly: Attacks rarely stay within one boundary. Always consider the movement between devices, users, and cloud services when investigating a security incident.

Not read yet

Expanding Your Expertise: Moving Beyond the Basics

Once you are comfortable with the standard investigation workflow, you should start exploring more proactive measures. The best security teams do not just wait for incidents to appear; they go looking for them.

Proactive Threat Hunting

Instead of waiting for an alert, you can use the knowledge you gain from investigating incidents to build your own "hunting queries." For example, if you see a new type of ransomware in the news, you can write a KQL query to look for the specific file hashes or registry keys associated with that ransomware across your entire organization. This is the hallmark of a mature security operations team.

Incident Response Playbooks

Every organization should have documented "playbooks" for common incident types. A playbook is simply a checklist of steps to take for a specific threat, such as "What to do when a laptop is reported stolen" or "What to do when a phishing campaign is detected." Developing these playbooks ensures that your team responds consistently and effectively, even under pressure.

The Human Element

Finally, remember that security is a team sport. If you find a particularly clever attack, share it with your colleagues. Discussing how you investigated an incident and what you learned is the best way to elevate the skills of your entire team. Microsoft Defender XDR is a powerful tool, but it is the skill, curiosity, and persistence of the analyst that truly mitigates threats and protects the organization.

Not read yet

Final Thoughts

Investigating security incidents in Microsoft Defender XDR is an iterative process. You start with an alert, you build a story, you gather evidence, and you take action. With every incident you investigate, you gain a deeper understanding of how attackers operate and how to better defend your environment. By following the best practices outlined in this lesson—using the tools effectively, documenting your work, and maintaining a broad, proactive mindset—you will become a highly effective security professional capable of protecting your organization from even the most sophisticated threats.

Note: Continuous Learning The threat landscape changes daily. Attackers are constantly updating their methods to bypass security controls. Make it a habit to review the "Threat Analytics" reports within Microsoft Defender XDR. These reports are written by Microsoft's security researchers and provide deep insights into the latest attack campaigns, often including the specific KQL queries you can use to hunt for them. Staying informed is your best defense.

By consistently applying these methods, you transition from being a reactive responder to a proactive defender. Your goal is not just to close tickets, but to understand the "why" and "how" behind every incident, thereby hardening the organization's defenses against future attempts. Keep practicing, keep questioning the data, and keep refining your investigative techniques.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.