Ransomware Service Manipulation
Before encrypting files, ransomware operators stop and delete security tools, backup services, and database engines to maximize impact and prevent recovery. This service manipulation phase is the last detectable warning before encryption begins. The chokepoint is immutable: admin/SYSTEM privileges, service enumeration, and service stop/delete capability are always required regardless of which ransomware family is executing. This pattern has remained consistent across all major ransomware families from 2021 to present, with kill lists expanding but the core behavior unchanged.
Attack Chokepoints 3 invariant stages
Each stage is an invariant condition the attacker must satisfy, regardless of tool, variant, or threat actor. Detection at any stage breaks the chain.
1 Service Enumeration ▶
- Admin or SYSTEM privileges already established on target system
- Target security, backup, and database services are running (cannot stop what is not running)
- Sysmon Event ID 1 (sc.exe query / wmic service get / Get-Service)
- Windows Security Event ID 4688 (Process Creation)
2 Bulk Service Stop ▶
- Windows System Event ID 7036 (Service State Change — stopped)
- Windows System Event ID 7040 (Service Start Type Changed — disabled)
- Sysmon Event ID 1 (sc.exe / net.exe / taskkill.exe process creation)
3 Service Deletion ▶
- Sysmon Event ID 1 (sc.exe delete / sc.exe config start= disabled)
- Sysmon Event ID 12/13 (Registry key deletion under Services hive)
Variations 5 variants tracked
Tools and methods that exploit this chokepoint. The list grows. The chokepoint doesn't change.
BlackBasta 2022 Legacy ▶
sc stop SophosService
sc stop veeam
sc stop MSSQLSERVER
sc stop wbengine
sc delete SophosService
sc config veeam start= disabled
- Sysmon EID 1: sc.exe with stop and security/backup service name
- Sysmon EID 1: sc.exe with delete or config start= disabled
- Windows System EID 7036: Multiple services stopped within 60 seconds
- Windows System EID 7040: Service start type changed to disabled
Alphv/BlackCat 2021 Legacy ▶
# Windows Rust binary with embedded service list:
net stop "Sophos Agent" /y
net stop "vss" /y
net stop "MSSQL$SQLEXPRESS" /y
wmic service where "name like '%backup%'" call stopservice
- Sysmon EID 1: net.exe or net1.exe with stop and service name
- Sysmon EID 1: wmic.exe with service and stopservice
- Sysmon EID 1: vssadmin.exe with delete shadows
- Windows System EID 7036: Bulk service stops
Akira 2023 Active ▶
powershell -Command "Get-Service -Name *sophos*, *veeam*, *sql*, *backup* | Stop-Service -Force"
sc config WinDefend start= disabled
net stop WinDefend /y
- Sysmon EID 1: powershell.exe with Stop-Service -Force and wildcard service names
- Sysmon EID 1: sc.exe with config WinDefend start= disabled
- Windows System EID 7036: Defender + backup services stopped
Qilin 2022 Active ▶
# Rust binary — service manipulation via Windows API, not sc.exe:
qilin.exe --kill-services --paths \\DC\SYSVOL\domain\scripts\
# ESXi variant:
esxcli vm process list
esxcli vm process kill --type=force --world-id=<id>
- Windows System EID 7036: EDR/backup services stopped without sc.exe CLI
- Sysmon EID 1: Qilin binary execution with --kill-services
- ESXi: esxcli process kill events in hostd.log
LockBit 3.0 2022 Declining ▶
# Domain-wide via Group Policy scheduled task:
schtasks /create /tn "Windows Update" /tr "C:\windows\temp\lockbit.exe" /sc once /st 00:00 /ru SYSTEM
# Kill list (50+ services):
sc stop SophosFileScanner
sc stop CrowdStrike
sc stop SentinelAgent
sc stop veeam
sc stop MSSQLSERVER
sc stop wbengine
sc stop VSS
# ... 40+ more services
vssadmin delete shadows /all /quiet
bcdedit /set {default} recoveryenabled No
- Sysmon EID 1: 50+ sc.exe stop commands in rapid succession
- Sysmon EID 1: vssadmin.exe delete shadows /all /quiet
- Sysmon EID 1: bcdedit.exe /set recoveryenabled No
- Sysmon EID 1: schtasks.exe /create with SYSTEM context
- Windows System EID 7036: 50+ services stopped in under 5 minutes
- Security EID 4698: Scheduled task created across multiple hosts
Detection Strategy
Rules organized by the chokepoint stage they detect. Each stage has one or more rules at different maturity levels.
Service stop + delete combination for security or backup services in rapid su...
Hunt
Med FP
▶
sc.exe, net.exe, powershell.exe, or taskkill.exe with CommandLine containing stop AND a service keyword (sophos, defender, veeam, backup, acronis, mssql, mysql), followed within 60 seconds by a delete or disable of the same service via sc.exe. Also fires when 3+ security/backup services stop within 5 minutes from the same process or session.
title: Multiple Security or Backup Services Stopped or Deleted in Rapid Succession
id: c5d9e1f3-a5b7-4c9d-1e3f-3a5b7c9d1e3f
status: experimental
description: >
Detects sc.exe/net.exe/taskkill.exe stopping or deleting security and backup services,
with focus on stop-then-delete sequences within 60 seconds.
references:
- https://attack.mitre.org/techniques/T1562.001/
- https://attack.mitre.org/techniques/T1489/
- https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2022/06/23093553/Common-TTPs-of-the-modern-ransomware_low-res.pdf
author: "@iimp0ster"
date: 2025/01/15
tags:
- attack.defense_evasion
- attack.t1562.001
- attack.impact
- attack.t1489
- detection.maturity.hunt
logsource:
category: process_creation
product: windows
detection:
selection_stop_tools:
Image|endswith:
- '\sc.exe'
- '\net.exe'
- '\net1.exe'
- '\taskkill.exe'
# Service stop commands targeting security/backup services
selection_stop_action:
CommandLine|contains:
- ' stop '
- ' delete '
- '/IM ' # taskkill /IM
selection_security_targets:
CommandLine|contains:
# Sophos
- 'Sophos'
- 'sophos'
- 'SAVService'
- 'SophosFileScanner'
# Windows Defender
- 'WinDefend'
- 'Sense'
- 'WdNisSvc'
- 'WdFilter'
- 'MsMpEng'
# Veeam
- 'Veeam'
- 'veeam'
# Volume Shadow Copy
- 'VSS'
- 'vss'
- 'wbengine'
# SQL / Database
- 'MSSQL'
- 'SQLWriter'
- 'MySQL'
- 'postgresql'
# Acronis
- 'Acronis'
- 'acronis'
# Generic backup patterns
- 'backup'
- 'Backup'
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
Image|endswith:
- '\placeholder_tune_for_your_env.exe'
condition: selection_stop_tools and selection_stop_action and selection_security_targets and not filter_legit_software
falsepositives:
- Planned maintenance by system administrators (compare against change management records)
- AV/EDR product uninstallation during software upgrade cycles
- IT operations during system decommissioning
level: medium
Network logon + bulk service termination targeting specific security/backup s...
Analyst
Low FP
▶
Network logon (4624 LogonType 3) or local admin session running sc.exe/net.exe/taskkill.exe stops 5+ services in 10 minutes targeting security (SophosFileScanner, SAVService, WinDefend, Sense, MsMpEng), backup (Veeam*, VeeamDeploymentService, VSS, wbengine, *acronis*), or database (MSSQL*, SQLWriter, MySQL*, postgresql*), with a service delete attempted within 2 minutes. Weight after-hours activity or unusual source IP.
title: Ransomware Pre-Encryption — Bulk Service Termination Targeting Sophos File Scanner
id: d6e0f2a4-b6c8-4d0e-2f4a-4b6c8d0e2f4a
status: experimental
description: >
Detects sc.exe stopping then deleting a named security service. Strong pre-encryption
indicator observed in Alphv/BlackCat, BlackBasta, and LockBit campaigns.
references:
- https://attack.mitre.org/techniques/T1562/001/
- https://attack.mitre.org/techniques/T1489/
- https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2022/06/23093553/Common-TTPs-of-the-modern-ransomware_low-res.pdf
- https://www.mandiant.com/m-trends
author: "@iimp0ster"
date: 2025/01/15
tags:
- attack.defense_evasion
- attack.t1562.001
- attack.impact
- attack.t1489
- detection.maturity.analyst
logsource:
category: process_creation
product: windows
detection:
selection_sc_stop:
Image|endswith: '\sc.exe'
CommandLine|contains|all:
- 'stop'
- 'SophosFileScanner'
selection_sc_delete:
Image|endswith: '\sc.exe'
CommandLine|contains|all:
- 'delete'
- 'SophosFileScanner'
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
Image|endswith:
- '\placeholder_tune_for_your_env.exe'
condition: (selection_sc_stop or selection_sc_delete) and not filter_legit_software
falsepositives:
- Sophos product uninstallation by authorized IT staff
- Sophos version upgrade process (stop old, install new)
level: high
Identify security or backup service state changes (stopped)
Research
High FP
▶
EID 7036 Stopped events where Service Name contains sophos, defender, veeam, backup, or antivirus.
title: Security or Backup Service Stopped
id: b4c8d0e2-f4a6-4b8c-0d2e-2f4a6b8c0d2e
status: experimental
description: >
Detects security and backup service state changes to stopped. Baseline rule for
understanding normal service stop patterns in your environment.
references:
- https://attack.mitre.org/techniques/T1562/001/
- https://attack.mitre.org/techniques/T1489/
- https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2022/06/23093553/Common-TTPs-of-the-modern-ransomware_low-res.pdf
author: "@iimp0ster"
date: 2025/01/15
tags:
- attack.defense_evasion
- attack.t1562.001
- attack.impact
- attack.t1489
- detection.maturity.research
logsource:
product: windows
service: system
detection:
selection_event:
EventID: 7036
# "The X service entered the stopped state."
Message|contains: 'entered the stopped state'
selection_security_services:
Message|contains:
# Sophos
- 'Sophos'
- 'sophos'
# Microsoft Defender
- 'WinDefend'
- 'Windows Defender'
- 'Sense'
- 'WdNisSvc'
# Generic AV/EDR patterns
- 'Antivirus'
- 'antivirus'
# Backup services
- 'Veeam'
- 'veeam'
- 'Volume Shadow Copy'
- 'VSS'
- 'wbengine'
- 'Acronis'
- 'acronis'
filter_legit_software:
# Tune for your environment — add legitimate software that triggers this rule
Message|contains:
- 'placeholder_tune_for_your_env'
condition: selection_event and selection_security_services and not filter_legit_software
falsepositives:
- System reboots (all services stop)
- AV/EDR product updates (service restarts)
- Maintenance windows (planned service stops)
- Backup service completion cycles (Veeam, etc. stop between jobs)
level: low
Raw Log Samples 5 samples
Real-world log events produced by this technique and which Sigma rules they trigger.
EID 1 Sysmon sc.exe used to stop a backup service - first service in rapid bulk-stop sequence ▶
EID 7036 Windows Event Log Veeam backup service stopped as part of ransomware pre-encryption service kill ▶
EID 1 Sysmon sc.exe disables service to prevent automatic restart ▶
EID 7040 Windows Event Log Backup service start type changed to disabled - prevents auto-restart ▶
EID 1 Sysmon Service deleted to remove backup infrastructure entirely ▶
Emulation
ATT&CK: T1562.001 Simulates bulk service stop, disable, and delete pattern used by ransomware pre-encryption powershell ▶
#Requires -Version 5.1
# MITRE ATT&CK: T1562.001 / T1489 — Impair Defenses / Service Stop
# Simulates ransomware pre-encryption steps: VSS deletion and backup service termination.
[CmdletBinding()]
param(
[int]$TargetCount = 3,
[switch]$TargetVss,
[switch]$CleanupOnly
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Continue'
function Write-Step ([string]$Msg) { Write-Host "[*] $Msg" -ForegroundColor Cyan }
function Write-Ok ([string]$Msg) { Write-Host "[+] $Msg" -ForegroundColor Green }
function Write-Warn ([string]$Msg) { Write-Host "[!] $Msg" -ForegroundColor Yellow }
$ServicePrefix = 'RansomTestSvc'
function Remove-Artefacts {
for ($i = 1; $i -le $TargetCount; $i++) {
$svcName = "$ServicePrefix$i"
if (Get-Service -Name $svcName -ErrorAction SilentlyContinue) {
sc.exe stop $svcName 2>&1 | Out-Null
sc.exe delete $svcName 2>&1 | Out-Null
}
}
Write-Ok "All test services cleaned up"
}
if ($CleanupOnly) { Remove-Artefacts; exit 0 }
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Write-Error "Administrator privileges required. Rerun as Administrator."
exit 1
}
Write-Host ""
Write-Host "=== Ransomware Service Manipulation Emulation ===" -ForegroundColor Magenta
Write-Host " T1562.001 + T1489 | Detection Chokepoints Project" -ForegroundColor DarkGray
Write-Host ""
Write-Step "Step 1/3 — Creating $TargetCount dummy test services"
Write-Verbose " These stand in for real targets: VeeamBackupSvc, WinDefend, VSS, SQLWriter"
# Dummy binary path (does not exist — service won't start, but can be stopped/deleted)
$DummyBin = 'C:\Windows\Temp\ransom_test_svc.exe'
for ($i = 1; $i -le $TargetCount; $i++) {
$svcName = "$ServicePrefix$i"
$result = sc.exe create $svcName binPath= $DummyBin start= auto `
displayname= "Ransom Test Service $i (SAFE TO DELETE)" 2>&1
Write-Ok "Created: $svcName — $result"
}
Start-Sleep -Milliseconds 300
Write-Step "Step 2/3 — Bulk service stop + disable (WEL 7036, 7040, Sysmon EID 1)"
Write-Verbose " Pattern: 3+ services stopped within 5-min window = Hunt trigger"
Write-Verbose " Pattern: 5+ services stopped = Analyst threshold"
$StoppedCount = 0
for ($i = 1; $i -le $TargetCount; $i++) {
$svcName = "$ServicePrefix$i"
# Stop (generates WEL 7036)
$stopOut = sc.exe stop $svcName 2>&1
Write-Ok "sc stop $svcName`: $stopOut"
$StoppedCount++
# Disable (generates WEL 7040)
$disableOut = sc.exe config $svcName start= disabled 2>&1
Write-Ok "sc config $svcName start=disabled: $disableOut"
Start-Sleep -Milliseconds 200 # rapid but observable
}
Write-Ok "Bulk stop complete: $StoppedCount services stopped in rapid succession"
if ($StoppedCount -ge 5) {
Write-Ok "Analyst threshold exceeded ($StoppedCount >= 5 services)"
} elseif ($StoppedCount -ge 3) {
Write-Ok "Hunt threshold met ($StoppedCount >= 3 services)"
}
Start-Sleep -Milliseconds 300
if ($TargetVss) {
Write-Step "Step 2b — Stopping VSS and wbengine (Volume Shadow + Windows Backup)"
Write-Warn "Stopping VSS temporarily. Will re-enable. No shadow copies will be deleted."
sc.exe stop VSS 2>&1 | ForEach-Object { Write-Ok "VSS: $_" }
sc.exe stop wbengine 2>&1 | ForEach-Object { Write-Ok "wbengine: $_" }
Start-Sleep -Milliseconds 500
sc.exe start VSS 2>&1 | Out-Null
sc.exe start wbengine 2>&1 | Out-Null
Write-Ok "VSS + wbengine re-enabled"
}
Write-Step "Step 3/3 — Service delete (sc delete — ransomware persistence removal step)"
Write-Verbose " Combined with bulk stop: meets Analyst rule criteria"
for ($i = 1; $i -le $TargetCount; $i++) {
$svcName = "$ServicePrefix$i"
$deleteOut = sc.exe delete $svcName 2>&1
Write-Ok "sc delete $svcName`: $deleteOut"
Start-Sleep -Milliseconds 100
}
Write-Host ""
Write-Host "=== Emulation Complete ===" -ForegroundColor Magenta
Write-Host ""
Write-Host "Expected detections:" -ForegroundColor White
Write-Host " [Research] WEL 7036 — service name matches security/backup keyword list" -ForegroundColor DarkCyan
Write-Host " [Hunt] EID 1 (sc.exe stop + delete) + WEL 7036/7040 within 60s window" -ForegroundColor DarkYellow
Write-Host " [Analyst] $TargetCount+ services stopped in 10 min + service deletes" -ForegroundColor DarkGreen
Write-Host ""
Write-Host "Note: Analyst rule checks service NAMES against a security/backup list." -ForegroundColor DarkGray
Write-Host " 'RansomTestSvc' names may not match — use -TargetVss for real target names (VSS/wbengine)" -ForegroundColor DarkGray
Write-Host " For highest fidelity, target WinDefend + VSS + MSSQL names (in lab with those services)" -ForegroundColor DarkGray
Write-Host ""
OSINT Pivots
behavior_processes:"sc.exe" tag:ransomware
"net stop" "sc delete" ransomware path:*.ps1 OR path:*.bat OR path:*.txt