Tools / Event IDs / Sysmon Event ID 22

Sysmon Event ID 22: dns query

What Sysmon Event ID 22 (dns query) means, the fields to check, what is normal and what is suspicious, with PowerShell and KQL queries to find it.

Log: Microsoft-Windows-Sysmon/Operational · Severity: Informational · MITRE ATT&CK T1071.004 · Updated 2026-11-03

Sysmon event ID 22 records a DNS query made by a process, with the process name and the answers. That process detail is what network DNS logs lack: it tells you that rundll32.exe, not the browser, looked up the suspicious domain.

The fields that matter

FieldWhat it tells you
ImageThe process that made the query.
QueryNameThe domain looked up.
QueryResultsThe returned addresses or CNAMEs.
QueryStatus0 for success; other values are DNS error codes.
ProcessGuid / ProcessIdLink to Sysmon event 1 for the process.

What is normal

Browsers, Office, update agents and Windows services resolving their usual domains.

When Sysmon Event ID 22 is suspicious

Common false positive: Telemetry from browsers and endpoint agents is very chatty. Most Sysmon configurations exclude well-known domains to keep volume down.

Find Sysmon Event ID 22 with PowerShell

Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-Sysmon/Operational'; Id=22; StartTime=(Get-Date).AddDays(-7)} -MaxEvents 50 |
  ForEach-Object {
    $d = [ordered]@{ Time = $_.TimeCreated; Computer = $_.MachineName }
    ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
    [pscustomobject]$d
  } | Format-List

Microsoft Sentinel (KQL)

Event
| where TimeGenerated > ago(7d) and Source == "Microsoft-Windows-Sysmon" and EventID == 22
| project TimeGenerated, Computer, RenderedDescription, EventData
| order by TimeGenerated desc

Related events

FAQ

Does Sysmon 22 work on all Windows versions?

It needs Windows 8.1 / Server 2012 R2 or later and Sysmon 10 or later.