Skip to content

Instantly share code, notes, and snippets.

@zyrone27
zyrone27 / 2021-1675-spooler-imageloads.kql
Created July 6, 2021 00:31 — forked from olafhartong/2021-1675-spooler-imageloads.kql
2021-1675 - PrintNightmare KQL - MDE
let serverlist=DeviceInfo
| where DeviceType != "Workstation"
| distinct DeviceId;
let suspiciousdrivers=DeviceImageLoadEvents
| where DeviceId in (serverlist)
| where FolderPath startswith @"c:\windows\system32\spool\drivers"
| distinct SHA1
| invoke FileProfile(SHA1, 1000)
| where GlobalPrevalence < 50 and IsRootSignerMicrosoft != 1 and SignatureState != "SignedValid";
suspiciousdrivers