Windows Disk & System
windows.system
Protects against catastrophic Windows disk/system operations: `vssadmin delete shadows` / `wmic shadowcopy delete` / `Win32_ShadowCopy` deletion through WMI or CIM (Volume Shadow Copy destruction), `wbadmin delete` (backup recovery points), `diskpart`, `Format-Volume`, `Clear-Disk`, `Remove-Partition`, `Remove-VirtualDisk`, `Initialize-Disk`, `Reset-PhysicalDisk`, `cipher /w`, `bcdedit /delete`, and destructive `fsutil` file/volume operations.
- 14blocking rules
- 3safe patterns
- 8Critical
- 6High
[packs]
enabled = ["windows.system"]Evaluated when a command contains vssadmin, VSSADMIN, wmic, WMIC, shadowcopy, ShadowCopy, SHADOWCOPY, Win32_ShadowCopy, win32_shadowcopy, WIN32_SHADOWCOPY.
Blocking rules
Each rule ID is windows.system:<name>. Use it in allowlists and [policy.rules].
Criticalclear-diskClear-Disk removes all partitions and data from a disk.
Explanation
`Clear-Disk` wipes a whole physical disk — with `-RemoveData -RemoveOEM` it deletes every partition (including recovery/OEM) and all data. A wrong disk number destroys the wrong drive irreversibly. Safer alternatives: - Get-Disk: confirm the disk number and that it is the intended target - Back up before clearing; consider removing a single partition instead
Criticalformat-volumeFormat-Volume erases a volume's filesystem and data.
Explanation
`Format-Volume` re-creates the filesystem on a volume, destroying all data on it. A wrong drive letter or disk number formats the wrong volume. There is no Recycle Bin for a format. Safer alternatives: - Get-Volume / Get-Partition: confirm the exact target first - Back up the volume before any format
Criticalremove-partitionRemove-Partition deletes a partition and its data.
Explanation
`Remove-Partition` deletes a partition and everything on it. Targeting the wrong disk or partition number destroys live data with no undo. Safer alternatives: - Get-Partition: confirm the disk/partition numbers first - Back up the partition's data before removing it
Criticalremove-virtualdiskRemove-VirtualDisk deletes a Storage Spaces virtual disk and all data on it.
Explanation
`Remove-VirtualDisk` deletes a Storage Spaces virtual disk: the volume on it and every file it holds are gone, with no undo. A wrong friendly name destroys a live data volume. Safer alternatives: - Get-VirtualDisk: confirm the exact disk and that its data is backed up - Add -WhatIf to preview
Criticalvssadmin-delete-shadowsvssadmin delete shadows destroys Volume Shadow Copies (System Restore + backups).
Explanation
`vssadmin delete shadows` deletes the Volume Shadow Copies on a volume — the snapshots that back System Restore, Previous Versions, and many backup tools. With `/all /quiet` it removes every shadow copy with no prompt. This is one of the first things ransomware does, and run by accident it silently removes the main local recovery path. Safer alternatives: - vssadmin list shadows: review what exists before deleting anything - Take a fresh backup (wbadmin / your backup tool) instead of deleting recovery points
Criticalwbadmin-deletewbadmin delete destroys Windows backup recovery points or the backup catalog.
Explanation
`wbadmin delete backup` / `delete systemstatebackup` removes Windows Server Backup and system-image recovery points (with `-keepVersions:0`, all of them), and `wbadmin delete catalog` erases the catalog that makes the remaining backups restorable. Like `vssadmin delete shadows`, it is a standard ransomware step and an irreversible loss of recovery. Safer alternatives: - wbadmin get versions: list the recovery points first - Take a fresh backup before pruning old versions
Criticalwmi-shadowcopy-deleteDeleting Win32_ShadowCopy instances destroys Volume Shadow Copies.
Explanation
Piping `Win32_ShadowCopy` (from `Get-WmiObject` / `Get-CimInstance`) into `Remove-WmiObject` / `Remove-CimInstance`, or calling `.Delete()` on its instances, deletes Volume Shadow Copies exactly like `vssadmin delete shadows`: the snapshots behind System Restore, Previous Versions and many backup tools. It is a standard ransomware step and an irreversible loss of local recovery. Safer alternatives: - Get-CimInstance Win32_ShadowCopy / vssadmin list shadows: inspect first - Back up before removing any recovery points
Criticalwmic-shadowcopy-deletewmic shadowcopy delete destroys Volume Shadow Copies.
Explanation
`wmic shadowcopy delete` is an alternate way to destroy Volume Shadow Copies (the same snapshots that back System Restore and backups). Like `vssadmin delete shadows` it is a common ransomware step and an irreversible loss of local recovery. Safer alternatives: - wmic shadowcopy list / vssadmin list shadows: inspect first - Back up before removing any recovery points
Highbcdedit-deletebcdedit /delete removes a boot configuration entry.
Explanation
`bcdedit /delete` (and `/deletevalue`) removes Boot Configuration Data entries. A wrong entry can leave the machine unbootable. Boot config should be changed deliberately, not as part of a cleanup. Safer alternatives: - bcdedit /enum: review the current boot entries first - Export with `bcdedit /export` before modifying anything
Highcipher-wipecipher /w overwrites free space, making deleted files unrecoverable.
Explanation
`cipher /w:<path>` overwrites all free space on the volume, permanently destroying the recoverability of any previously deleted files. It is slow, irreversible, and usually run by mistake when a simple delete was intended. Safer alternatives: - If you only need to remove a file, delete it normally - Reserve free-space wiping for decommissioning, after backups are confirmed
Highdiskpartdiskpart with clean/delete/format/script reconfigures or wipes disks and partitions.
Explanation
`diskpart` is the low-level disk-partitioning tool. Driven by a script (`/s file.txt`) or with `clean`/`delete partition`/`delete volume`/`format`, it wipes partition tables and volumes — a wrong disk number destroys the wrong drive irreversibly. A non-interactive agent has no confirmation prompt. Safer alternatives: - diskpart -> `list disk` / `list volume`: confirm the exact target first - Use Get-Disk/Get-Partition to inspect before any clean/delete
Highfsutil-setzerodatafsutil file setzerodata zeroes a byte range of a file in place.
Explanation
`fsutil file setzerodata offset=<n> length=<n> <file>` overwrites that range with zeroes directly on disk. The previous contents are gone with no confirmation, no recycle bin and no backup — the same act as zeroing a file on POSIX, which is already denied. Pointed at a database, a VHD or a log, it destroys the region without the file changing size, so the damage is not obvious afterwards. Safer alternatives: - Confirm the target and range first: `fsutil file queryvaliddata <file>` - Copy the file aside before modifying it - To reclaim space, delete the file normally and let the filesystem free it
Highfsutil-volume-dismountfsutil volume dismount forcibly dismounts a volume, invalidating open handles.
Explanation
`fsutil volume dismount <drive>` forces the volume offline. Every open handle is invalidated, so processes writing to it lose buffered data and can leave files half-written; on a system or data volume this is an outage, not a cleanup step. It is the Windows neighbour of a forced unmount, which is already denied. Safer alternatives: - Stop the services using the volume first, then dismount - `fsutil volume diskfree <drive>` / `mountvol` to inspect without dismounting
Highinitialize-or-reset-diskInitialize-Disk / Reset-PhysicalDisk wipe disk metadata and data.
Explanation
`Initialize-Disk` re-initializes a disk's partition style and `Reset-PhysicalDisk` resets a physical disk — both discard existing partitioning/data on the target. On a disk that already holds data this is destructive and easy to point at the wrong disk. Safer alternatives: - Get-Disk: confirm the disk is empty / the intended target first - Back up before initializing or resetting
Safe patterns
Checked first. A command that matches one is never blocked by this pack.
vssadmin-listdiskpart-liststorage-whatif