Evidence and Entity Correlation
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 8 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Lesson: Evidence and Entity Correlation in Microsoft Sentinel
Introduction: The Challenge of Security Visibility
In the modern security operations center (SOC), the primary struggle is not a lack of data, but an excess of it. Security Information and Event Management (SIEM) systems like Microsoft Sentinel ingest millions of logs from firewalls, endpoints, cloud identities, and applications. However, raw logs do not tell a story on their own. If an attacker logs into a VPN from a suspicious IP address and then attempts to escalate privileges on a server, those two events might appear as isolated alerts. Without the ability to stitch these disparate data points together, security analysts are forced to perform manual, repetitive investigations, which often leads to "alert fatigue" and missed threats.
Evidence and entity correlation is the process of linking these isolated signals into a coherent narrative. It involves identifying the "Who," "Where," and "What" across different data silos. By using Sentinel’s built-in entity mapping, Kusto Query Language (KQL), and the investigation graph, you can transform disconnected telemetry into a clear timeline of activity. This lesson explores how to design your detections to automatically correlate entities, how to navigate the investigation graph, and how to build a methodology that minimizes the time between a threat being detected and a threat being mitigated.
Not read yet
Understanding Entities in Microsoft Sentinel
At the core of Sentinel’s correlation engine are "Entities." An entity is a distinct object within your environment that plays a role in a security event. Common examples include user accounts, hostnames, IP addresses, file hashes, and URLs. When Sentinel processes logs, it looks for these specific identifiers to create relationships between events.
If you write a detection that identifies a suspicious login, but you do not map that login to a specific Account entity, Sentinel treats that alert as an isolated incident. By mapping the Account entity, Sentinel can automatically cross-reference that user across other data sources—such as cloud activity logs, email logs, and endpoint process logs—to show you everything that user did during the timeframe of the attack.
The Role of Entity Mapping
Entity mapping is the bridge between raw log data and the Sentinel investigation experience. When you create an Analytic Rule, you are essentially telling the system: "When this condition is met, look for these specific entities in the result set." Sentinel supports several predefined entity types, including:
- Account: Represents a user, service account, or machine identity.
- Host: Represents a workstation, server, or virtual machine.
- IP Address: The network address associated with a connection or activity.
- File Hash: A unique identifier for a file, critical for tracking malware movement.
- URL: A web address that might indicate a phishing attempt or command-and-control communication.
Callout: Entity Mapping vs. Incident Grouping It is important to distinguish between mapping an entity and grouping alerts into an incident. Entity mapping attaches metadata to an alert so that the investigation graph can draw lines between assets. Incident grouping, conversely, is a logic setting that tells Sentinel to combine multiple alerts into a single incident if they share the same entity. Both are necessary, but they serve different stages of the workflow: mapping provides the visibility, while grouping provides the management efficiency.
Not read yet
Designing Detections for Correlation
To make your investigations effective, you must design your detection queries to surface the right information. A common mistake is writing a query that returns only a boolean value (True/False) or a generic summary. Instead, your query should return the full context needed for an analyst to start their work immediately.
Practical Example: Detecting Lateral Movement
Imagine you want to detect when a user logs into a sensitive server from a workstation they have never accessed before. A simple detection would alert on the login. A correlated detection, however, would include the user's account name, the source workstation, and the destination server.
Here is how you would structure that query in KQL:
// Correlating User Login with Source and Destination
SigninLogs
| where TimeGenerated > ago(1h)
| where ResultType == 0
| extend AccountName = tostring(split(UserPrincipalName, '@')[0])
| extend SourceHost = tostring(DeviceName)
| extend DestinationHost = tostring(ResourceDisplayName)
| project TimeGenerated, AccountName, SourceHost, DestinationHost, IPAddress
In the Analytic Rule configuration, you would then map these fields to the Sentinel Entity fields. Under the "Set rule logic" step, you navigate to the "Entity mapping" section:
- Account: Select
AccountName. - Host: Select
SourceHost(and create a second mapping forDestinationHost). - IP Address: Select
IPAddress.
By performing this mapping, when an alert fires, the Sentinel dashboard will automatically display icons for the user and the hosts involved. When you click "Investigate," the graph will already have these nodes populated, allowing you to see if the same user or host has appeared in other alerts recently.
Not read yet
Using the Investigation Graph
Once a detection fires and an incident is created, the investigation graph is your most powerful tool. It provides a visual representation of how entities are connected. If an alert triggers regarding a suspicious file hash, the graph will show you every host that has executed that file. If you see a user entity connected to a suspicious IP, you can right-click the IP to run a "Timeline" query, which shows you every other connection that IP has made in your network over the past 24 hours.
Steps to Investigate Effectively:
- Start with the primary entity: Always begin by expanding the entity that triggered the alert. This is usually the "patient zero" of the investigation.
- Look for "Hubs": In the graph, look for entities that have many connections. A user account that connects to 50 different servers in 10 minutes is a clear indicator of either a service account or a compromised account performing lateral movement.
- Expand the timeline: Use the "Timeline" feature to see what happened before and after the alert. Often, the alert is just the final step of an attack that started with a phishing email three days prior.
- Pivot to related logs: If you find a suspicious host, pivot to the "SecurityEvent" table in KQL to look for process creation events on that specific machine.
Note: The quality of your investigation graph is entirely dependent on the quality of your entity mapping. If you fail to map entities during the creation of your analytic rule, the investigation graph will be empty, forcing you to manually search logs, which significantly increases your Mean Time to Respond (MTTR).
Not read yet
Best Practices for Correlation
Effective correlation is as much about data hygiene as it is about query logic. If your logs are messy, your correlation will be inaccurate.
1. Normalize Data Across Sources
Ensure that your logs use consistent naming conventions. For example, some logs might report a username as DOMAIN\User, while others report it as [email protected]. If you do not normalize these into a common format (like the UserPrincipalName standard), Sentinel will treat UserA and [email protected] as two different entities, breaking the correlation chain. Use the extend and replace operators in KQL to clean up these strings before mapping them.
2. Use "Watchlists" for Context
Sometimes, you want to correlate activity against a known list of assets, such as "Critical Servers" or "Terminated Employees." Sentinel Watchlists allow you to upload a CSV file of these entities. You can then join your detection queries against these watchlists.
// Joining a watchlist to flag activity on critical servers
let CriticalServers = _GetWatchlist('CriticalAssetList');
SecurityEvent
| where Computer in (CriticalServers)
| where EventID == 4624
3. Avoid Over-Correlation
While correlation is helpful, "noise" is a significant risk. If you correlate every single login event, you will create thousands of irrelevant connections. Focus your correlation on high-fidelity alerts and behavioral anomalies. Only correlate entities that provide meaningful context for an investigation.
Not read yet
Comparison: Manual Investigation vs. Automated Correlation
| Feature | Manual Investigation | Automated Correlation |
|---|---|---|
| Data Discovery | Analyst searches logs manually | Sentinel maps entities automatically |
| Timeline Building | Time-consuming; high error rate | Instant; visualized in graph |
| Alert Context | Often limited to trigger event | Provides full "Who, What, Where" |
| Scaling | Does not scale; limited by human speed | Scales across millions of logs |
| Analyst Effort | High; requires deep KQL knowledge | Low; visual interface for most tasks |
Common Pitfalls and How to Avoid Them
Pitfall 1: Ignoring the "Time Window"
Analysts often set a detection time window that is too short. If an attacker is performing a slow-and-low attack, a 1-hour window will never capture the correlation.
- Solution: Use longer lookback periods for behavioral detections. For example, checking for "newly created accounts" should look back at least 30 days to establish a baseline of what is "normal."
Pitfall 2: Relying on Single-Source Detections
A detection that only looks at firewall logs is easily bypassed. A robust detection should correlate across different layers of the stack.
- Solution: Always attempt to correlate identity (Azure AD logs) with endpoint activity (Defender for Endpoint logs). If a user logs in from a new location (Identity) and immediately runs a PowerShell script to disable security features (Endpoint), you have a high-confidence alert.
Pitfall 3: Failing to Update Mappings
As your environment changes—for example, when you migrate servers to the cloud or change naming conventions—your old analytic rules might stop mapping entities correctly.
- Solution: Conduct quarterly audits of your analytic rules. Run the queries manually to ensure the fields you are mapping still exist and contain the expected data.
Warning: Be cautious when using the
project-awayoperator in your KQL queries. If you accidentally remove a column that is being used for entity mapping, the analytic rule will fail to generate the visual graph, even if the alert itself still triggers. Always explicitlyprojectthe columns you need for your entities.
Not read yet
Advanced Correlation: Using KQL for Behavioral Analysis
Beyond simple entity mapping, you can use KQL to perform "Chain of Custody" analysis. This is the process of proving that a specific file led to a specific process, which opened a specific network connection.
Consider this scenario: You have an alert for a suspicious process. You want to see if that process was spawned by a document file (a common phishing vector).
// Correlating Process Creation with Parent Process
SecurityEvent
| where EventID == 4688
| extend ParentProcess = tostring(ParentProcessName)
| where ProcessName endswith "powershell.exe"
| where ParentProcess endswith "winword.exe" // Word spawned PowerShell
| project TimeGenerated, Account, Computer, ParentProcess, ProcessName, CommandLine
This query correlates the "what" (PowerShell) with the "how" (Word). By mapping Account and Computer as entities, you can immediately jump into the investigation graph to see if this user has opened other suspicious documents recently.
Not read yet
The Human Element: When to Stop Correlating
One of the most difficult skills for a security analyst is knowing when to stop. Because Sentinel makes it so easy to jump from one entity to another, it is possible to spend hours "rabbit-holing"—following connections that aren't actually part of the attack.
- Establish a Goal: Before starting an investigation, define what you are looking for. Are you looking for the entry point? Are you looking for data exfiltration?
- Time-Box Your Work: If you haven't found a meaningful connection after 30 minutes of pivoting, take a step back. Is the alert a false positive? Is there a missing data source?
- Document Your Findings: Use the "Comments" section in the Sentinel incident to record why you believe an entity is (or is not) involved. This helps the next analyst who picks up the case.
Summary: Integrating Correlation into SOC Operations
To summarize, evidence and entity correlation is the backbone of an efficient SOC. It moves the team away from "whack-a-mole" alert management and toward incident response. By following these principles, you ensure that your team is not just reacting to logs, but understanding the behavior behind them.
Key Takeaways
- Entities are foundational: Always map your analytic rules to specific entity types (Account, Host, IP, FileHash) to enable the investigation graph.
- Context is king: A detection query should return enough information to allow an analyst to understand the context of the event without needing to run five additional queries.
- Visualization reduces time: Utilize the built-in investigation graph to visualize relationships. It is significantly faster to identify a pattern in a graph than in a table of raw text.
- Consistency matters: Normalize your log data early. If your account names are inconsistent, your correlation will be incomplete.
- Use Watchlists for intelligence: Incorporate business context (like critical assets) into your detections to prioritize alerts that matter most to your organization.
- Audit your rules: Regularly review your analytic rules to ensure that field names haven't changed and that your mappings are still functional.
- Balance automation and human judgment: Trust the correlation tools to surface the data, but use your professional judgment to determine when an investigation has reached its logical conclusion.
By mastering these concepts, you shift your Sentinel environment from a passive log repository into an active, intelligent partner in your security operations. The goal is to spend less time digging through logs and more time stopping attackers. Start small by mapping entities in your most frequent alerts, then expand into more complex behavioral correlations as your team matures.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Investigate Security Incidents
- Investigate Security Incidents Quiz5q
- Manage Incidents in Defender Portal
- Manage Incidents in Defender Portal Quiz5q
- Investigate Alerts and Alert Queues
- Investigate Alerts and Alert Queues Quiz5q
- Automated Investigation and Response
- Automated Investigation and Response Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock SC-200 exam-style practice questions.
Practice for SC-200