Data Destruction
Adversaries may destroy data and files on specific systems or in large numbers on a network to interrupt availability to systems, services, and network resources. Data destruction is likely to render stored data irrecoverable by forensic techniques through overwriting files or data on local and remote drives. Unlike simple deletion commands (del, rm) that only remove file pointers, data destruction involves overwriting file contents with random data, zeroes, or image files to prevent forensic recovery. Real-world examples include Shamoon (overwrites with image files), WhisperGate (corrupts first 1MB with 0xCC bytes), HermeticWiper (recursive folder wiping via FSCTL_MOVE_FILE), Industroyer (clears registry keys and overwrites ICS configuration files), and Olympic Destroyer (overwrites local and remote shares). Adversaries commonly pair file destruction with Volume Shadow Copy deletion and boot recovery disabling to maximize irrecoverability. In cloud environments, adversaries may delete storage objects, VM images, database instances, and backup vaults to damage an organization's operational continuity.
What is T1485 Data Destruction?
Data Destruction (T1485) maps to the Impact tactic — the adversary is trying to manipulate, interrupt, or destroy your systems and data in MITRE ATT&CK.
This page provides production-ready detection logic for Data Destruction, covering the data sources and telemetry it touches: Process: Process Creation, Command: Command Execution, Microsoft Defender for Endpoint. The queries below are rated critical severity at high confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Impact
- Technique
- T1485 Data Destruction
- Canonical reference
- https://attack.mitre.org/techniques/T1485/
let LookbackWindow = 24h;
let DestructionTools = dynamic(["sdelete.exe", "sdelete64.exe", "cipher.exe", "eraser.exe", "wipe.exe"]);
let VSSDestructionPatterns = dynamic(["delete shadows", "shadowcopy delete", "delete catalog", "resize shadowstorage"]);
let PowerShellDestructionPatterns = dynamic([
"Clear-Content",
"[IO.File]::WriteAllBytes",
"[System.IO.File]::WriteAllBytes",
"Remove-Item -Recurse -Force",
"Remove-Item -Force -Recurse",
"-Recurse -Force -ErrorAction SilentlyContinue"
]);
DeviceProcessEvents
| where Timestamp > ago(LookbackWindow)
| where (
// Known secure deletion tools
FileName in~ (DestructionTools)
// cipher.exe /w overwrites free space to prevent recovery of previously deleted files
or (FileName =~ "cipher.exe" and ProcessCommandLine has "/w")
// VSS and backup catalog destruction — near-zero legitimate use
or (FileName in~ ("vssadmin.exe", "wmic.exe", "wbadmin.exe") and ProcessCommandLine has_any (VSSDestructionPatterns))
or (FileName =~ "wbadmin.exe" and ProcessCommandLine has "delete")
// Boot/recovery configuration destruction
or (FileName =~ "bcdedit.exe" and ProcessCommandLine has_any ("/set {default} recoveryenabled no", "/deletevalue", "/delete"))
// Disk format command
or (FileName =~ "format.exe" and ProcessCommandLine matches regex @"[A-Za-z]:")
// Unix/Linux wipers — dd targeting /dev/zero or /dev/urandom as input
or ProcessCommandLine has_any ("dd if=/dev/zero", "dd if=/dev/urandom", "shred -", "wipe -rf")
// PowerShell file overwrite and mass deletion
or (FileName in~ ("powershell.exe", "pwsh.exe") and ProcessCommandLine has_any (PowerShellDestructionPatterns))
// Mass deletion via cmd.exe (/f /s /q flags combined)
or (FileName =~ "cmd.exe" and ProcessCommandLine has "del" and ProcessCommandLine has "/s" and ProcessCommandLine has "/f")
)
| extend IsVSSDestruction = (
ProcessCommandLine has_any (VSSDestructionPatterns)
or (FileName in~ ("vssadmin.exe", "wbadmin.exe") and ProcessCommandLine has "delete")
or (FileName =~ "wmic.exe" and ProcessCommandLine has "shadowcopy" and ProcessCommandLine has "delete")
)
| extend IsSecureDelete = (
FileName in~ (DestructionTools)
or (FileName =~ "cipher.exe" and ProcessCommandLine has "/w")
)
| extend IsBootConfigDestruction = (
FileName =~ "bcdedit.exe"
and ProcessCommandLine has_any ("/set {default} recoveryenabled no", "/deletevalue", "/delete")
)
| extend IsUnixWiper = (
ProcessCommandLine has_any ("dd if=/dev/zero", "dd if=/dev/urandom", "shred -", "wipe -rf")
)
| extend IsPowerShellDestruction = (
FileName in~ ("powershell.exe", "pwsh.exe")
and ProcessCommandLine has_any (PowerShellDestructionPatterns)
)
| extend IsMassDeletion = (
(FileName =~ "cmd.exe" and ProcessCommandLine has "del" and ProcessCommandLine has "/s" and ProcessCommandLine has "/f")
or (FileName =~ "format.exe" and ProcessCommandLine matches regex @"[A-Za-z]:")
)
| extend RiskScore =
toint(IsVSSDestruction) * 3
+ toint(IsSecureDelete) * 2
+ toint(IsBootConfigDestruction) * 3
+ toint(IsUnixWiper) * 2
+ toint(IsPowerShellDestruction) * 2
+ toint(IsMassDeletion) * 1
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
IsVSSDestruction, IsSecureDelete, IsBootConfigDestruction,
IsUnixWiper, IsPowerShellDestruction, IsMassDeletion, RiskScore
| sort by RiskScore desc, Timestamp desc Detects data destruction activity using Microsoft Defender for Endpoint DeviceProcessEvents. Monitors for known secure deletion tools (sdelete, cipher /w, eraser), Volume Shadow Copy deletion via vssadmin/wmic/wbadmin, boot configuration destruction via bcdedit, disk formatting, Unix/Linux wipers (dd targeting /dev/zero or /dev/urandom, shred), PowerShell file overwrite patterns (WriteAllBytes, Clear-Content, Remove-Item -Recurse -Force), and mass deletion via cmd.exe. Each indicator category is scored independently with VSS destruction and bcdedit tampering weighted highest (3) as they have near-zero legitimate use outside of specific administrative contexts.
Data Sources
Required Tables
False Positives
- Backup software (Veeam, Commvault, Windows Server Backup) that uses vssadmin to manage shadow copy storage size and delete oldest snapshots as part of configured retention policies
- IT administrators running sdelete or cipher /w as part of approved data sanitization procedures before hardware decommission or secure disposal
- System administrators using bcdedit to configure dual-boot environments, change default OS entries, or modify boot settings during authorized OS maintenance windows
- Security testing tools and penetration testing engagements running data destruction simulations on designated test systems with change management approval
- Automated disk imaging and OS provisioning workflows that use format.exe or diskpart as part of system reimaging pipelines on known build servers
Sigma rule & cross-platform mapping
The detection logic for Data Destruction (T1485) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for T1485
References (9)
- https://attack.mitre.org/techniques/T1485/
- https://www.symantec.com/connect/blogs/shamoon-attacks
- https://blog.talosintelligence.com/2018/02/olympic-destroyer.html
- https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/03/07180722/Report_Shamoon_StoneDrill_final.pdf
- https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
- https://www.crowdstrike.com/blog/technical-analysis-of-whispergate-malware/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1485/T1485.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/process_creation
- https://www.justice.gov/usao-ndca/pr/san-jose-man-pleads-guilty-damaging-cisco-s-network
Testing Methodology
Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1VSS Shadow Copy Deletion via vssadmin
Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\vssadmin.exe, CommandLine='delete shadows /all /quiet'. Microsoft-Windows-VSS/Operational Event IDs 8193/8194 recording the deletion. Security Event ID 4688 (if command line auditing enabled) with the vssadmin command. Sysmon Event ID 1 may also show the VSS writer service responding.
- Test 2Boot Recovery Disabled via bcdedit
Expected signal: Two Sysmon Event ID 1 entries: first with Image=bcdedit.exe CommandLine='/set {default} recoveryenabled no', second with CommandLine='/set {default} bootstatuspolicy ignoreallfailures'. Security Event ID 4688 for both executions. No file system events are generated as bcdedit writes to the BCD store (boot configuration database).
- Test 3Secure Delete with SDelete (Sysinternals)
Expected signal: Sysmon Event ID 1: Process Create with Image=sdelete.exe (or sdelete64.exe). Sysmon Event ID 11: Multiple FileCreate/FileModified events on the target file representing overwrite passes. Sysmon Event ID 23: FileDelete event after overwriting. Security Event ID 4688 for the sdelete process creation if command line auditing is enabled.
- Test 4Cipher.exe Free Space Overwrite (Built-in LOLBin)
Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\cipher.exe, CommandLine='/w:C:\Users\<user>\AppData\Local\Temp'. Multiple Sysmon Event ID 11 entries in the target directory as cipher.exe creates temporary overwrite files (EFSTMPWP). Security Event ID 4688 for process creation.
- Test 5PowerShell Mass File Overwrite and Delete (Wiper Simulation)
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'WriteAllBytes' and 'Remove-Item'. Sysmon Event ID 11: 10 FileCreate events (initial file creation) followed by 10 FileModified events (WriteAllBytes overwrite pass). Sysmon Event ID 23: 10 FileDelete events. The entire sequence completes within 2 minutes, triggering the write-then-delete hunting query at OverwriteDeleteCount > 10.
Response Playbook
Triage
- Immediately assess scope — is this a single endpoint or multiple systems showing simultaneous destruction activity? Query DeviceProcessEvents or Sysmon logs across the environment for the same process hash, command pattern, or initiating parent within the past hour. Simultaneous hits across multiple devices indicate a worm or centrally-deployed wiper requiring network-level response.
- Determine VSS status on the affected host: run 'vssadmin list shadows' or check Microsoft-Windows-VSS/Operational Event IDs 8193 and 8194 for recent deletion errors. If no shadows exist on a host that previously had regular backups, recovery options are severely limited — treat this as a critical escalation trigger regardless of other findings.
- Examine the full process chain — what spawned the destruction process? Malicious chains include: document viewer (Word, Acrobat) spawning cmd/PowerShell (macro delivery), service accounts executing wiper binaries (lateral movement deployment), and scheduled tasks detonating wipers (time-delayed or trigger-based payloads). Note the InitiatingProcessFileName and trace back two additional generations.
- Check the user context and timing: was this during business hours by an interactive user session, or off-hours by a service account with no concurrent login? Correlate with Active Directory logon events (Event ID 4624) to determine if the user was actively working. Off-hours destruction from a service account with no corresponding change ticket is a strong malicious indicator.
- For sdelete/cipher detections: determine if pre-authorized by correlating with helpdesk tickets, hardware decommission requests, or data sanitization schedules. Verify the target path — system directories (C:\Windows\, C:\Program Files\) or user document paths are suspicious; dedicated decommission staging folders may be legitimate.
- Check for combined ransomware preparation indicators within the same 10-minute window on the same host: vssadmin delete shadows + bcdedit /set recoveryenabled no + net stop (stopping backup or AV services). All three together is a near-certain indicator of ransomware or wiper deployment requiring immediate isolation.
Containment
- Immediately isolate the endpoint from the network using EDR network isolation or VLAN quarantine. Data wipers like Shamoon and Olympic Destroyer propagate destruction to network shares via SMB — network isolation prevents lateral spread to file servers, NAS devices, and other endpoints.
- Suspend or disable the initiating user account in Active Directory (Set-ADUser -Enabled $false) and revoke all active Kerberos tickets (klist purge on all domain controllers for that account). If a service account was used, rotate the service account password immediately to prevent reuse on other systems.
- Block the initiating process hash at the EDR level with an enterprise-wide block policy to prevent the same wiper binary from executing on other systems. If the binary is an LOLBin (vssadmin, bcdedit, cipher), focus blocking on the parent process hash instead.
- If cloud infrastructure deletion is suspected: immediately review and restrict IAM permissions for the compromised account. Enable S3 Object Lock versioning, Azure Blob soft-delete, or GCP Object Versioning if not already active — recently deleted objects within the retention window may still be recoverable.
- Halt any actively running vssadmin, wbadmin, bcdedit, or sdelete processes on affected systems using the EDR kill-process capability. Check if the same parent process, service, or user session is active on other systems and terminate those instances proactively.
- Preserve forensic state before any remediation: capture a full memory image (WinPmem or Magnet RAM Capture) of affected systems. Do NOT reboot — active wiper processes may complete destruction on reboot, and volatile memory may contain keys, configuration, or target lists that are lost after shutdown.
Evidence Collection
- Volume Shadow Copy audit: run 'vssadmin list shadows' on the affected host and document current shadow inventory. Check Microsoft-Windows-VSS/Operational (Event IDs 8193, 8194) and System log (Event ID 8224 from VSS provider) to establish exact timestamp of any VSS deletion.
- MFT and USN Journal: use forensic tools (FTK Imager, Autopsy, The Sleuth Kit) to extract and parse the $MFT and $UsnJrnl ($Extend\$UsnJrnl:$J). These NTFS structures retain file metadata and change records even after file content has been overwritten — critical for enumerating what was destroyed and when.
- Prefetch files: collect C:\Windows\Prefetch\SDELETE*.pf, CIPHER*.pf, VSSADMIN*.pf, BCDEDIT*.pf. Prefetch files contain execution timestamps and file paths accessed by each binary, establishing a precise destruction timeline even if logs are cleared.
- Windows Event Logs: collect Security (Event ID 4688 process creation if command line auditing enabled), System (Event IDs 7034/7036 for service stops), Microsoft-Windows-VSS/Operational, and Sysmon Operational (Event IDs 1, 11, 23) from a ±3 hour window around the suspected destruction event.
- Sysmon file delete archive: if Sysmon is configured with an archiveDirectory (commonly C:\Sysmon\), Event ID 23 (FileDelete) may have preserved copies of deleted files before they were overwritten. Check the archive directory before remediation.
- Process memory: if the wiper process is still running, capture a full process memory dump with ProcDump ('procdump.exe -ma <PID> <output.dmp>'). Memory dumps may contain target file lists, encryption keys (if paired with ransomware), C2 configuration, and in-progress overwrite buffers.
- Network captures: collect NetFlow records and, if available, packet captures from the affected endpoint in the 2 hours preceding the destruction event. Look for SMB traffic to other internal hosts (lateral propagation to shares), outbound connections (C2 or data exfiltration before destruction), and authentication events.
- Registry forensics: collect SYSTEM hive (C:\Windows\System32\config\SYSTEM) for ShimCache (AppCompatCache) and SOFTWARE hive for AmCache.hve (C:\Windows\AppCompat\Programs\Amcache.hve). These record SHA1 hashes and execution timestamps for all binaries, enabling identification of novel wiper tools not detected by EDR.
Escalation Criteria
- ! VSS deletion confirmed on any production system — this indicates active ransomware or wiper deployment. Escalate to IR team lead immediately and initiate enterprise-wide threat hunt for the same indicators.
- ! Multiple endpoints (3 or more) showing simultaneous or near-simultaneous destruction patterns (within 15 minutes) — indicates automated worm propagation requiring network isolation at the switch or firewall level, not just individual host isolation.
- ! Destruction activity detected on backup servers, domain controllers, file servers, or NAS devices containing shared organizational data — blast radius extends to entire organization's data availability and business continuity.
- ! Evidence of pre-destruction reconnaissance in the same user session within the preceding 24 hours: net view, Get-ADComputer, nltest /dclist, or SMB enumeration to identify share targets before destruction. Indicates deliberate targeted attack rather than accidental execution.
- ! Wiper binary not recognized by any EDR vendor (zero detections, unknown hash) — may indicate novel nation-state tooling (Shamoon variants, AcidRain-style firmware wipers). Isolate and submit sample to threat intelligence team and AV vendors.
- ! Cloud infrastructure deletion events affecting production databases, VM disk images, backup vaults, or key vaults simultaneously — potential customer-facing service outage requiring immediate executive notification and SLA-driven response procedures.
Investigation Guide
Forensic Artifacts
- >
MFT ($MFT): The NTFS Master File Table retains file metadata (name, timestamps, size, parent directory) even after files are deleted or overwritten. Parse with MFTECmd (Eric Zimmermann) or Autopsy to enumerate destroyed files and reconstruction paths targeted by the wiper. - >
USN Journal ($UsnJrnl): The NTFS change journal records all file system operations chronologically. Even after content is overwritten, the journal retains operation records with timestamps. Extract with 'fsutil usn readjournal C:' or forensic tools — provides a complete timeline of file modifications and deletions. - >
Windows Event Log — VSS: Microsoft-Windows-VSS/Operational contains Event IDs 8193 (VSS operation failed), 8194 (VSS error), and records of shadow copy deletion events with precise timestamps and the process responsible. - >
Prefetch files: C:\Windows\Prefetch\ — executables used in destruction leave .pf files containing execution count, last execution timestamp, and file paths referenced during execution. SDELETE.EXE-*.pf, VSSADMIN.EXE-*.pf, BCDEDIT.EXE-*.pf are key artifacts for establishing timeline. - >
ShimCache (AppCompatCache): HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache records execution of binaries including wipers. Parse with AppCompatCacheParser. Persists even if the wiper binary itself is deleted after execution. - >
AmCache.hve: C:\Windows\AppCompat\Programs\Amcache.hve records SHA1 hash, file path, and first execution time for every executed binary. Critical for identifying unknown wiper tools not in threat intelligence databases. Parse with AmcacheParser. - >
Sysmon Event ID 23 archive: if Sysmon is configured with ArchiveDirectory, deleted files are copied to the archive before deletion. Check C:\Sysmon\ (or configured path) for preserved copies of destroyed documents, scripts, or wiper artifacts. - >
LNK files and JumpLists: C:\Users\*\AppData\Roaming\Microsoft\Windows\Recent\ and C:\Users\*\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\ may reference files that were subsequently destroyed, providing evidence of what data was targeted.
Tuning Guidance
The most frequent false positive source is backup software managing VSS snapshots — Veeam, Commvault, and Windows Server Backup all call vssadmin regularly as part of snapshot rotation. Build a service account allowlist by identifying the exact account name and expected command pattern from your backup solution (e.g., 'vssadmin delete shadows /for=C: /oldest' from SVCACCT-BACKUP during the backup maintenance window). For sdelete and cipher /w, correlate with your IT asset management system's hardware decommission workflow — create an exclusion tied to the decommission staging server hostname and the specific service account used. The mass file deletion hunting query (>50 files in 10 minutes) will generate noise from software uninstallers and some log rotation tools. Run the hunting query over 7 days in your environment, establish a baseline maximum, and set the threshold to 3 standard deviations above the mean. For Linux environments, be aware that dd is legitimately used for disk cloning, backup, and benchmarking — restrict detection to dd commands where the input source (if=) is /dev/zero or /dev/urandom (destruction), not where these are the output target. For cloud hunting queries, exclude known maintenance accounts and CI/CD service principals that routinely create and destroy infrastructure as part of automated deployment pipelines.
Hunting Queries
Hunt for processes generating anomalously high file deletion volumes within a rolling 10-minute window. Legitimate processes rarely delete more than 50 files in 10 minutes outside of software uninstallers or temp file cleanup. High UniqueDirectories combined with high FileCount indicates recursive directory traversal characteristic of wipers like HermeticWiper and DEADWOOD that loop through the filesystem. This catches volume-based destruction not covered by the main process name/argument detection.
// Hunt: Mass file deletion by process — identify processes deleting unusually high file volumes
let TimeWindow = 10m;
DeviceFileEvents
| where Timestamp > ago(7d)
| where ActionType == "FileDeleted"
| summarize
FileCount = count(),
UniqueDirectories = dcount(FolderPath),
UniqueExtensions = dcount(tolower(tostring(split(FileName, ".")[-1]))),
EarliestEvent = min(Timestamp),
LatestEvent = max(Timestamp),
SampleFiles = make_set(FileName, 5)
by DeviceName, InitiatingProcessFileName, InitiatingProcessAccountName, bin(Timestamp, TimeWindow)
| where FileCount > 50
| extend DeletionRatePerMin = round(todouble(FileCount) / 10.0, 1)
| project EarliestEvent, DeviceName, InitiatingProcessFileName, InitiatingProcessAccountName,
FileCount, UniqueDirectories, UniqueExtensions, DeletionRatePerMin, SampleFiles
| sort by FileCount desc index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=23
| bin _time span=10m
| stats
count as FileCount,
dc(TargetFilename) as UniqueFiles,
values(TargetFilename) as SampleFiles
by _time, host, Image, User
| where FileCount > 50
| eval DeletionRatePerMin=round(FileCount/10, 1)
| table _time, host, User, Image, FileCount, UniqueFiles, DeletionRatePerMin, SampleFiles
| sort - FileCount Hunt for the write-then-delete pattern characteristic of sophisticated secure wipers — files that are written or modified and then deleted within a 2-minute window at high volume. Used by Kazuar, PowerDuke, Lazarus Group custom wipe functions, and WhisperGate (overwrites then deletes). Legitimate applications almost never overwrite and immediately delete more than 20 files in 2 minutes. This pattern catches wipers that overwrite file content to prevent forensic recovery, which is more thorough than simple deletion and not covered by the main process-name detection.
// Hunt: Write-then-delete pattern — file overwritten immediately before deletion (secure wipe)
let OverwriteWindow = 2m;
let FileWrites = DeviceFileEvents
| where Timestamp > ago(7d)
| where ActionType in ("FileCreated", "FileModified")
| project WriteTime = Timestamp, DeviceName, FilePath = strcat(FolderPath, "\\", FileName),
WritingProcess = InitiatingProcessFileName, WritingAccount = InitiatingProcessAccountName;
let FileDeletions = DeviceFileEvents
| where Timestamp > ago(7d)
| where ActionType == "FileDeleted"
| project DeleteTime = Timestamp, DeviceName, FilePath = strcat(FolderPath, "\\", FileName),
DeletingProcess = InitiatingProcessFileName;
FileWrites
| join kind=inner FileDeletions on DeviceName, FilePath
| where DeleteTime > WriteTime and DeleteTime <= WriteTime + OverwriteWindow
| summarize
OverwriteDeleteCount = count(),
SamplePaths = make_set(FilePath, 5)
by DeviceName, WritingProcess, WritingAccount
| where OverwriteDeleteCount > 20
| sort by OverwriteDeleteCount desc index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" (EventCode=11 OR EventCode=23)
| eval EventType=if(EventCode=11, "write", "delete")
| eval FilePath=coalesce(TargetFilename, TargetObject)
| bin _time span=2m
| stats values(EventType) as EventTypes, count as TotalEvents, dc(FilePath) as UniqueFiles, values(Image) as Processes by _time, host, FilePath
| where mvfind(EventTypes, "write")>=0 AND mvfind(EventTypes, "delete")>=0
| stats count as OverwriteDeletePairs, dc(FilePath) as UniqueFilePaths, values(Processes) as Processes by _time, host
| where OverwriteDeletePairs > 20
| table _time, host, Processes, OverwriteDeletePairs, UniqueFilePaths
| sort - OverwriteDeletePairs Hunt for bulk cloud infrastructure deletion covering storage accounts, virtual machines, databases, backup vaults, recovery services vaults, and key vaults. Covers LAPSUS$-style cloud destruction, insider threat scenarios (Cisco incident involving deletion of 456 VMs), and compromised service principal abuse. A single actor successfully deleting more than 5 critical cloud resources within an hour is a strong indicator of intentional destruction. Prioritize deletion events affecting backup vaults, recovery services vaults, and key vaults as these directly impact both data availability and decryption capability.
// Hunt: Cloud infrastructure bulk deletion — storage, VMs, databases, backups, key vaults
AuditLogs
| where TimeGenerated > ago(7d)
| where OperationName has_any ("Delete", "Remove", "Purge", "Destroy", "Terminate")
| where TargetResources has_any (
"storageAccounts", "virtualMachines", "databases", "backupVaults",
"recoveryServicesVaults", "snapshots", "disks", "keyVaults",
"blobServices", "sqlServers", "managedInstances"
)
| extend
ActorUpn = tostring(InitiatedBy.user.userPrincipalName),
ActorApp = tostring(InitiatedBy.app.displayName),
TargetResource = tostring(TargetResources[0].displayName),
ResourceType = tostring(TargetResources[0].type),
OperationResult = Result
| where OperationResult == "success"
| summarize
DeleteCount = count(),
ResourceTypes = make_set(ResourceType, 10),
Resources = make_set(TargetResource, 10),
FirstDeletion = min(TimeGenerated),
LastDeletion = max(TimeGenerated)
by ActorUpn, ActorApp, bin(TimeGenerated, 1h)
| where DeleteCount > 5
| sort by DeleteCount desc index=azure sourcetype="azure:monitor:aad" OR sourcetype="azure:activity"
| where match(operationName, "(?i)(delete|remove|purge|destroy|terminate)")
| rex field=resourceType "(?i)(?P<ResourceCategory>storageAccounts|virtualMachines|databases|backupVaults|snapshots|disks|keyVaults|sqlServers)"
| where ResourceCategory!=""
| where resultType="Success" OR status="Succeeded"
| bin _time span=1h
| stats
count as DeleteCount,
dc(resourceId) as UniqueResources,
values(ResourceCategory) as ResourceTypes,
values(caller) as Callers
by _time, ResourceCategory
| where DeleteCount > 5
| table _time, Callers, ResourceCategory, DeleteCount, UniqueResources, ResourceTypes
| sort - DeleteCount Atomic Red Team Tests
Deletes all Volume Shadow Copies using vssadmin, the most common pre-ransomware and pre-wiper step performed by malware including Shamoon, REvil, Storm-0501, WhisperGate, and virtually all modern ransomware families. This simulates the VSS destruction component that removes the primary local recovery mechanism. Requires local administrator privileges. WARNING: This irreversibly deletes backup recovery points — run only on disposable test systems.
Command
vssadmin delete shadows /all /quiet Cleanup
No cleanup possible — shadow copies must be recreated by running a manual backup. To verify deletion: vssadmin list shadows Expected Telemetry
Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\vssadmin.exe, CommandLine='delete shadows /all /quiet'. Microsoft-Windows-VSS/Operational Event IDs 8193/8194 recording the deletion. Security Event ID 4688 (if command line auditing enabled) with the vssadmin command. Sysmon Event ID 1 may also show the VSS writer service responding.
Expected Detection
Alert fires on vssadmin.exe with 'delete shadows' pattern. KQL: IsVSSDestruction=true, RiskScore=3. SPL: IsVSSDestruction=1, RiskLevel contains 'HIGH - Backup/Recovery Destruction'. If combined with bcdedit test, RiskLevel escalates to CRITICAL.
Uses bcdedit to disable Windows Recovery Environment and set the boot status policy to ignore failures — steps taken by WhisperGate, Olympic Destroyer, and ransomware families to prevent automatic recovery after destruction. Combined with VSS deletion, this represents the classic ransomware preparation pattern. Requires local administrator privileges.
Command
bcdedit /set {default} recoveryenabled no && bcdedit /set {default} bootstatuspolicy ignoreallfailures Cleanup
bcdedit /set {default} recoveryenabled yes && bcdedit /set {default} bootstatuspolicy DisplayAllFailures Expected Telemetry
Two Sysmon Event ID 1 entries: first with Image=bcdedit.exe CommandLine='/set {default} recoveryenabled no', second with CommandLine='/set {default} bootstatuspolicy ignoreallfailures'. Security Event ID 4688 for both executions. No file system events are generated as bcdedit writes to the BCD store (boot configuration database).
Expected Detection
Alert fires on bcdedit.exe with '/set {default} recoveryenabled no'. KQL: IsBootConfigDestruction=true, RiskScore=3. SPL: IsBootDestruction=1, RiskLevel='HIGH - Backup/Recovery Destruction'. When run after the vssadmin test on the same host within 10 minutes, combined RiskLevel escalates to 'CRITICAL - Ransomware/Wiper Prep Pattern'.
Uses Sysinternals SDelete to securely overwrite and delete a test file by overwriting it with random data across multiple passes. This simulates the secure deletion behavior used by Kazuar, PowerDuke, and Lazarus Group custom wipe functions that overwrite file content before deletion to prevent forensic recovery. SDelete must be available in PATH or current directory (download from Sysinternals).
Command
echo df00tech-destruction-test > %TEMP%\df00tech-wipe-test.txt && sdelete.exe -p 3 -s -q %TEMP%\df00tech-wipe-test.txt Cleanup
del /f %TEMP%\df00tech-wipe-test.txt 2>nul Expected Telemetry
Sysmon Event ID 1: Process Create with Image=sdelete.exe (or sdelete64.exe). Sysmon Event ID 11: Multiple FileCreate/FileModified events on the target file representing overwrite passes. Sysmon Event ID 23: FileDelete event after overwriting. Security Event ID 4688 for the sdelete process creation if command line auditing is enabled.
Expected Detection
Alert fires on sdelete.exe FileName match in DestructionTools list. KQL: IsSecureDelete=true, RiskScore=2. SPL: IsSecureDelete=1, DestructionScore >= 1, RiskLevel='HIGH - Secure Wiper Execution'.
Uses the built-in Windows cipher.exe utility with the /w flag to overwrite unallocated free disk space in the TEMP directory, preventing recovery of previously deleted files. This is a LOLBin technique requiring no additional tools. Adversaries use cipher /w after deleting sensitive data to ensure it cannot be recovered forensically. Note: This operation writes temporary files to disk and may take several minutes depending on free space.
Command
cipher.exe /w:%TEMP% Cleanup
No cleanup needed — cipher /w only overwrites free space, not existing files. Temporary files created by cipher.exe are automatically removed when it completes. Expected Telemetry
Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\cipher.exe, CommandLine='/w:C:\Users\<user>\AppData\Local\Temp'. Multiple Sysmon Event ID 11 entries in the target directory as cipher.exe creates temporary overwrite files (EFSTMPWP). Security Event ID 4688 for process creation.
Expected Detection
Alert fires on cipher.exe with '/w' in CommandLine. KQL: IsSecureDelete=true (cipher.exe + /w branch), RiskScore=2. SPL: IsSecureDelete=1, DestructionScore >= 1.
Simulates a PowerShell-based file wiper that creates test files, overwrites each with null bytes using [System.IO.File]::WriteAllBytes (similar to WhisperGate's 0xCC overwrite of the first 1MB), then deletes them. Replicates the write-then-delete pattern used by sophisticated wipers to ensure forensic irrecoverability. This generates both the process-based detection alert and triggers the write-then-delete hunting query.
Command
powershell.exe -Command "$testDir = Join-Path $env:TEMP 'df00tech-wipe-sim'; New-Item -ItemType Directory -Force $testDir | Out-Null; 1..10 | ForEach-Object { $f = Join-Path $testDir \"file$_.txt\"; Set-Content -Path $f -Value 'test content df00tech' }; Get-ChildItem $testDir -File | ForEach-Object { [System.IO.File]::WriteAllBytes($_.FullName, [byte[]]::new(4096)); Remove-Item $_.FullName -Force }; Remove-Item $testDir -Force -ErrorAction SilentlyContinue" Cleanup
Remove-Item -Path "$env:TEMP\df00tech-wipe-sim" -Recurse -Force -ErrorAction SilentlyContinue Expected Telemetry
Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'WriteAllBytes' and 'Remove-Item'. Sysmon Event ID 11: 10 FileCreate events (initial file creation) followed by 10 FileModified events (WriteAllBytes overwrite pass). Sysmon Event ID 23: 10 FileDelete events. The entire sequence completes within 2 minutes, triggering the write-then-delete hunting query at OverwriteDeleteCount > 10.
Expected Detection
Alert fires on '[IO.File]::WriteAllBytes' and 'Remove-Item' patterns in PowerShell CommandLine. KQL: IsPowerShellDestruction=true, RiskScore=2. SPL: IsPowerShellDestruction=1, DestructionScore >= 1. Write-then-delete hunting query also fires with OverwriteDeleteCount >= 10.