Device network events w low count FQDN
Description
Device Network Events Involving Low Count FQDNs. This query reduces network events to only those with the RemoteURL column populated,. Then parses the DNS name from the URL (if needed) and finds the least prevalent. FQDNs. The result is then joined with DeviceNetworkEvents to highlight anomalous. Network communication.
Query · kql
DeviceNetworkEvents
| where Timestamp > ago(1h)
| where InitiatingProcessFileName !in~ ('iexplore.exe','chrome.exe','opera.exe','safari.exe') // Remove web browsers
and isnotempty(RemoteUrl)
| extend FQDN = iff(RemoteUrl matches regex "^([a-zA-Z0-9._-])+$", tostring(RemoteUrl), parse_url(RemoteUrl).domain)
| top-nested 100 of FQDN by dcount(DeviceId) asc
| join kind=inner (
DeviceNetworkEvents
| where Timestamp > ago(1h)
| where isnotempty(RemoteUrl)
| extend FQDN = iff(RemoteUrl matches regex "^([a-zA-Z0-9._-])+$", tostring(RemoteUrl), parse_url(RemoteUrl).domain)
) on FQDN
| order by aggregated_FQDN asc