Huntbook by Predefender

part-5

Microsoft Defender XDR Hunting Tables

Author: Roger C.B. Johnsen

Microsoft Defender XDR advanced hunting and Microsoft Sentinel are related but not interchangeable schemas. The Device*, Email*, Identity*, and CloudAppEvents tables below are Defender XDR schema tables; Sentinel also exposes connector-specific tables such as SecurityEvent, SigninLogs, and CommonSecurityLog.

Table availability depends on deployed products, licensing, retention, and telemetry health. Confirm the in-portal schema before assuming a column or ActionType exists.

Core tables

TableContainsUseful pivots
DeviceProcessEventsProcess creation and related eventsDeviceId, ProcessUniqueId, InitiatingProcessUniqueId, SHA1
DeviceNetworkEventsNetwork connections and related eventsDeviceId, process IDs, RemoteIP, RemoteUrl
DeviceFileEventsFile creation, modification, rename, and deletionDeviceId, SHA1, FileName, initiating process
DeviceRegistryEventsRegistry creation and modificationDeviceId, key/value, initiating process
DeviceLogonEventsDevice authentication activityDeviceId, account SID/name, remote IP, logon ID
DeviceEventsSecurity-control and miscellaneous device eventsActionType, DeviceId, AdditionalFields
DeviceImageLoadEventsDLL and image loadsDeviceId, SHA1, initiating process
DeviceInfoDevice metadata and posture snapshotsDeviceId, DeviceName, tags, exposure
DeviceNetworkInfoInterfaces, addresses, networks, domainsDeviceId, IP and MAC address
EmailEventsMail flow and delivery metadataNetworkMessageId, sender, recipient
EmailAttachmentInfoAttachment metadataNetworkMessageId, SHA1, filename
EmailUrlInfoURLs found in emailNetworkMessageId, URL
UrlClickEventsSafe Links clicks in supported workloadsURL, account, NetworkMessageId
CloudAppEventsCloud application and governance activityaccount/object IDs, application, IP
IdentityLogonEventsAD and Microsoft online authenticationaccount SID/UPN, IP, device
IdentityDirectoryEventsOn-premises directory and DC activityaccount SID, device, ActionType
IdentityQueryEventsQueries for AD objectsquerying identity/device and queried target
IdentityInfoIdentity context from available sourcesaccount SID, object ID, UPN
AlertInfoAlert metadataAlertId
AlertEvidenceEntities associated with alertsAlertId, entity identifiers

Use SHA1 when hunting Defender endpoint tables unless the schema confirms SHA256 is populated; several tables document SHA-256 as commonly empty.

Common pivot patterns

Start withPivot throughUse it to answer
DeviceDeviceInfo -> DeviceNetworkInfo -> DeviceNetworkEventsWhich identities and network peers belonged to the device over time?
ProcessProcessUniqueId -> initiating process fieldsWhich network, file, registry, and child-process activity belongs to it?
IP addressassignment window -> local and remote network perspectivesWhich device owned the address, and which peers communicated with it?
FileSHA1, origin fields, initiating processWhere did it arrive, where else did it appear, and was it executed?
AccountSID/object ID -> logon and device eventsWhich sessions, devices, and resources did the identity use?
AlertAlertId -> AlertEvidence -> native event tablesWhich underlying telemetry supports the alert?
SMB or pipesource IP, account, share, pipe, targetWas it discovery, administration, transfer, or remote execution?

For complete workflows, see Device-centric Pivoting in Defender XDR , Named Pipes , and File Staging and User-writable Paths .

Reliable pivot habits

  1. Filter time and reduce columns before joins.
  2. Prefer stable service identifiers such as DeviceId, account SID/object ID, AlertId, and NetworkMessageId.
  3. Use process unique identifiers where available; PIDs are reused.
  4. Normalise case and identity format before joining names.
  5. Use arg_max(Timestamp, *) by DeviceId for the latest snapshot, not an unconstrained join to DeviceInfo.
  6. Use leftouter when enrichment may be absent and innerunique only when its left-side deduplication is intended.
  7. Treat AdditionalFields as dynamic data and parse only the keys needed.

Query starters

Process to network activity

let start = ago(24h);
DeviceProcessEvents
| where Timestamp >= start
| where FileName =~ "powershell.exe" or FileName =~ "pwsh.exe"
| project Timestamp, DeviceId, DeviceName, ProcessUniqueId,
          FileName, ProcessCommandLine, AccountName
| join kind=leftouter (
    DeviceNetworkEvents
    | where Timestamp >= start
    | project NetworkTime=Timestamp, DeviceId,
              InitiatingProcessUniqueId, RemoteUrl, RemoteIP, RemotePort
) on DeviceId
| where InitiatingProcessUniqueId == ProcessUniqueId
| where NetworkTime between (Timestamp .. Timestamp + 10m)

Alert to evidence

AlertInfo
| where Timestamp > ago(7d)
| project AlertId, AlertTime=Timestamp, Title, Severity
| join kind=inner (AlertEvidence | where Timestamp > ago(7d)) on AlertId
| project AlertTime, Title, Severity, EntityType,
          DeviceName, AccountName, RemoteIP, FileName, SHA1

References

Revision

Revised DateComment
2025-03-21Article added
2026-07-22Corrected scope, tables, pivots, and query patterns