Defender XDR advanced huntingvsMicrosoft Sentinel
Sentinel vs Defender tables
Microsoft Sentinel and Microsoft Defender XDR both use KQL, but they don’t search the same tables. Defender’s advanced hunting has its own tables for devices, email, identities and cloud apps, and keeps 30 days. Sentinel has whatever you connect to it, like sign-in logs, Windows security events and firewall logs, and keeps data for as long as your workspace is set to. If you send Defender data to Sentinel, the Defender tables show up there too.
Side by side
| What | Defender XDR | Sentinel |
|---|---|---|
| Time column | Timestamp | TimeGenerated |
| How far back | 30 days | As long as the workspace keeps it, 90 days included |
| Processes started | DeviceProcessEvents | SecurityEvent with EventID == 4688, or DeviceProcessEvents if Defender data is connected |
| Network connections | DeviceNetworkEvents | CommonSecurityLog for firewalls, or DeviceNetworkEvents if connected |
| Logons to devices | DeviceLogonEvents | SecurityEvent with EventID 4624 or 4625 |
| Entra ID sign-ins | EntraIdSignInEvents, which replaced AADSignInEventsBeta | SigninLogs and AADNonInteractiveUserSignInLogs |
EmailEvents, EmailAttachmentInfo and EmailUrlInfo | The same tables if Defender for Office 365 is connected, or OfficeActivity | |
| Cloud and admin activity | CloudAppEvents | AuditLogs, AzureActivity and OfficeActivity |
| Alerts and incidents | AlertInfo and AlertEvidence | SecurityAlert and SecurityIncident |
| Device name | DeviceName | Computer in SecurityEvent |
| Account name | AccountName and AccountDomain | Account, TargetUserName or TargetAccount, depending on the table |
| What happened | ActionType, like LogonFailed | EventID, like 4625 |
Same question, both sets of tables
DeviceLogonEvents
| where Timestamp > ago(1d)
| where DeviceName startswith "srv-"
| where ActionType == "LogonFailed"
| summarize Failures = count() by AccountName, DeviceName
SecurityEvent
| where TimeGenerated > ago(1d)
| where Computer startswith "srv-"
| where EventID == 4625
| summarize Failures = count() by TargetAccount, Computer
DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName =~ "powershell.exe"
| where ProcessCommandLine contains "-enc"
| project Timestamp, DeviceName, AccountName, ProcessCommandLine
SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID == 4688
| where NewProcessName endswith @"powershell.exe"
| where CommandLine contains "-enc"
| project TimeGenerated, Computer, SubjectUserName, CommandLine
Event 4688 only includes the command line if command-line auditing is turned on.
What catches people out when switching
- Defender’s own tables use
Timestamp. Sentinel tables useTimeGenerated, so that’s the first thing to change when you move a query across. - Advanced hunting only goes back 30 days. For older Defender data, look in Sentinel if it’s connected.
- Not every Sentinel workspace has the same tables. They depend on what’s connected, so check the table list before you write the query.
- Defender uses
ActionTypewhere Windows uses event IDs.LogonFailedinDeviceLogonEventsis close to event 4625. - In the Defender portal, with Sentinel connected, advanced hunting can search both sets of tables in one place.
- Some columns hold JSON, like
AdditionalFieldsandRawEventData. Read them withparse_json().
Keep going
Practise both on the same exercise
SOC Fluent launches with KQL for both Defender and Sentinel. Exercises use both sets of tables, so you learn where to look as well as what to write.
Free to join. Students get 50% off at launch.