SERVICE STOP
TASKKILL
NET STOP
T1489
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Ransomware Stopping Services and Processes

Open files cannot be encrypted cleanly, so ransomware closes the programs that hold them. Stopping a dozen database and backup services in a minute is not normal admin work.

Scroll

Databases, mail stores, virtual machine hosts and backup agents keep their files locked, and security tools can interfere with the encryptor. Ransomware therefore stops or kills them first, often dozens in a row from a scripted list. The individual commands are common, but the burst, the targets and the context are what make the detection.

Signals at a Glance

SignalWhereATT&CK
Many net stop, sc stop or taskkill commands within a few minutesProcess creationT1489
Targets include database, backup, mail and virtualisation servicesProcess creation, service events 7036T1489
sc config with start= disabled on security or backup servicesProcess creation, 7040T1489
Security agent service stopped by a non-admin-tool parentService control logs, EDRT1562.001
Restart Manager APIs used to free locked filesEDR API telemetryT1489

Burst and Target Mix

One service stop is routine. Ten distinct stops of database, backup and security services in two minutes from one parent is not. This hunt counts distinct targets per parent process and host, then flags target-type diversity:

// KQL - burst of service/process stops from one parent
DeviceProcessEvents
| where Timestamp > ago(1h)
| where (FileName =~ "net.exe" or FileName =~ "net1.exe") and ProcessCommandLine has " stop "
     or (FileName =~ "sc.exe" and ProcessCommandLine has_any (" stop ", "config") and ProcessCommandLine has "disabled")
     or (FileName =~ "taskkill.exe" and ProcessCommandLine has "/f")
     or (FileName =~ "powershell.exe" and ProcessCommandLine has_any ("Stop-Service", "Stop-Process"))
| summarize stops=count(), distinctCmds=dcount(ProcessCommandLine),
            sample=make_set(ProcessCommandLine, 10)
          by DeviceName, InitiatingProcessFileName, AccountName, bin(Timestamp, 5m)
| where stops >= 8 and distinctCmds >= 6
| order by stops desc
// tune/validate: patch windows and application deployment will trip this; allowlist by change ticket window.

Add a target-type check to separate maintenance from ransomware. Maintenance stops one application stack; ransomware sweeps across categories:

// KQL - category diversity across the sampled commands
let dbTerms  = dynamic(["sql","oracle","mysql","postgres","mongo"]);
let bkTerms  = dynamic(["veeam","backup","acronis","vss"]);
let avTerms  = dynamic(["defender","sophos","mcafee","symantec","crowdstrike","endpoint"]);
DeviceProcessEvents
| where Timestamp > ago(1h) and ProcessCommandLine has_any ("stop", "taskkill", "disabled")
| extend isDb = ProcessCommandLine has_any (dbTerms),
         isBk = ProcessCommandLine has_any (bkTerms),
         isAv = ProcessCommandLine has_any (avTerms)
| summarize db=countif(isDb), bk=countif(isBk), av=countif(isAv)
          by DeviceName, AccountName, bin(Timestamp, 10m)
| where (db > 0) + (bk > 0) + (av > 0) >= 2
// Two or more categories in 10 minutes is the pre-encryption pattern.

Tuning Notes

Vetted sources

SigmaHQ and Splunk ESCU include net stop, sc config and taskkill rules for ransomware-style service kills, and MITRE CAR documents service-stop analytics. Treat their lists of target names as examples, not complete sets, and baseline your own patching windows before alerting.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026