Sponsored by Hudson Rock – Use Hudson Rock's free cybercrime intelligence tools to learn how Infostealer infections are leading to ransomware attacks
DeviceLogonEventslet logon = DeviceLogonEvents
| where Timestamp > ago(1d)
| where LogonType in ("RemoteInteractive","Network") and IsLocalAdmin == true
| project DeviceName, LogonTime = Timestamp, AccountName;
let svcCreate = DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "sc.exe" and ProcessCommandLine has "create"
| project DeviceName, SvcTime = Timestamp, SvcCmd = ProcessCommandLine;
logon
| join kind=inner svcCreate on DeviceName
| where SvcTime - LogonTime between (0min .. 30min)
| project DeviceName, AccountName, LogonTime, SvcTime, SvcCmd
Hunting queries are starting points for threat hunting & detection engineering — validate table/column names against your own workspace schema and tune thresholds before turning any of these into a production alert rule.