Sponsored by Hudson Rock – Use Hudson Rock's free cybercrime intelligence tools to learn how Infostealer infections are leading to ransomware attacks
DeviceProcessEventslet safeMode = DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "bcdedit.exe" and ProcessCommandLine has_any ("safeboot minimal","safeboot network")
| project DeviceName, SafeModeTime = Timestamp;
let svcStop = DeviceProcessEvents
| where Timestamp > ago(1d)
| where FileName =~ "sc.exe" and ProcessCommandLine has_any ("stop","config")
| project DeviceName, StopTime = Timestamp, StopCmd = ProcessCommandLine;
safeMode
| join kind=inner svcStop on DeviceName
| where StopTime - SafeModeTime between (0min .. 2h)
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.