Insights

Shadow Copies Deleted Before Ransomware Hit? Find the vssadmin Command in Event Logs

November 27, 2026
0:00
You open System Restore or the Previous Versions tab on an encrypted Windows server and find nothing there. vssadmin list shadows comes back empty, even though you are fairly sure snapshots existed last week. In most ransomware cases this is deliberate. The attacker deleted the Volume Shadow Copies (the point-in-time snapshots Windows keeps through the Volume Shadow Copy Service, or VSS) before starting encryption, and that delete command is one of the best timestamps you will get for when they had admin control of the box. MITRE ATT&CK lists this behavior as Inhibit System Recovery, T1490, and MITRE's analytic CAR-2021-01-009 points to the same two places to look: Security Event ID 4688 and Sysmon Event ID 1. Both record process creation, which means a new program starting, along with the program's command line and the process that launched it. This guide walks through checking those logs from the command line, in an order that keeps the evidence intact.
The built-in tools get used because they are already on every server and look like normal admin activity. These are the patterns worth searching for:
  • vssadmin delete shadows /all /quiet deletes every shadow copy without a prompt.
  • vssadmin resize shadowstorage shrinks the storage area until Windows drops existing snapshots. This removes copies without any "delete" verb in the command, which is why the CAR analytic covers resize as well.
  • wmic shadowcopy delete does the same deletion through WMI.
  • PowerShell calls against the Win32_ShadowCopy WMI class, often looping over each copy and calling its delete method.
  • wbadmin delete catalog and bcdedit changes that turn off Windows recovery often appear right next to the shadow copy deletion.
On a hosting VPS or a dedicated Windows box, this matters for a practical reason. When a customer asks whether you can "just roll back", the answer depends on whether any snapshot survived, and the follow-up question is always whether the backup you restore predates the attacker. The deletion timestamp helps answer both.
Export the logs first and work on the copies. If the attacker still has a foothold, the live logs can be cleared, and some ransomware variants clear them as part of their run. Write exports to external or network storage, not to the encrypted volume. If you have not isolated the server yet, do that first, keeping it powered on so memory is preserved.
POWERSHELL
# Run from an elevated prompt. E:\case is an example path on external storage.
wevtutil epl Security E:\case\Security.evtx
wevtutil epl System E:\case\System.evtx
wevtutil epl Microsoft-Windows-Sysmon/Operational E:\case\Sysmon.evtx
wevtutil epl Microsoft-Windows-PowerShell/Operational E:\case\PowerShell.evtx

# Current shadow copy state (read-only)
vssadmin list shadows
vssadmin list shadowstorage

# Was the Security log cleared? Event ID 1102 records that.
Get-WinEvent -FilterHashtable @{Path='E:\case\Security.evtx'; Id=1102} -ErrorAction SilentlyContinue |
  Select-Object TimeCreated, Message
The Sysmon export fails if Sysmon was never installed, which is common on smaller servers. That is fine. It tells you which of the next two sections you can use. If you find a 1102 event, note its time. Process events from before that point are gone from this log, and you will need to rely on whatever survived: Sysmon, a SIEM or log forwarder, or the PowerShell log. System Event ID 104 is the equivalent indicator for other logs being cleared.
Event 4688 only exists if the "Audit Process Creation" policy was enabled before the incident. Even then, the command line is missing unless the separate "Include command line in process creation events" policy was turned on. Without the command line you can still see that vssadmin.exe ran, but you cannot tell list from delete.
POWERSHELL
$pattern = 'vssadmin|wmic|shadowcopy|shadowstorage|wbadmin|bcdedit|Win32_ShadowCopy'

Get-WinEvent -FilterHashtable @{Path='E:\case\Security.evtx'; Id=4688} |
  Where-Object { _.Message -matchpattern } |
  Sort-Object TimeCreated |
  Format-List TimeCreated, Message
In each matching event, read these fields:
  • New Process Name and Process Command Line: what ran, with its arguments.
  • Creator Process Name and Creator Process ID: what launched it.
  • Account Name and Logon ID in the Subject section: which account ran it, in which logon session.
4688 shows process IDs in hexadecimal, so convert before comparing them with tools that show decimal. Creator Process Name only appears on newer Windows versions. On older ones you have to search for an earlier 4688 whose New Process ID matches the Creator Process ID. The Logon ID is the most useful field here. Search the same Security log for Event ID 4624 with that Logon ID, and you get the logon that started the session: the time, the logon type, and for remote sessions the source IP. If that logon was RDP, the method in finding the entry point from Event ID 4624 and 4625 in RDP logs picks up from there.
Sysmon (System Monitor, a free Microsoft Sysinternals driver and service) logs process creation with more context than 4688, including the parent's full command line and a ProcessGuid that stays unique even when Windows reuses process IDs. Whether it captured your events depends on the Sysmon configuration that was installed, since some configs filter out common binaries.
POWERSHELL
Get-WinEvent -FilterHashtable @{Path='E:\case\Sysmon.evtx'; Id=1} |
  Where-Object { _.Message -matchpattern } |
  ForEach-Object {
    $d = @{}
    ([xml]_.ToXml()).Event.EventData.Data | ForEach-Object {d[_.Name] =_.'#text' }
    [pscustomobject]@{
      UtcTime           = $d.UtcTime
      User              = $d.User
      CommandLine       = $d.CommandLine
      ParentImage       = $d.ParentImage
      ParentCommandLine = $d.ParentCommandLine
      ParentProcessGuid = $d.ParentProcessGuid
    }
  } | Format-List
This reuses $pattern from the previous block, so run both in the same PowerShell session. To go one level up, change the filter to match events whose ProcessGuid equals the ParentProcessGuid you just found, and repeat until you reach something that clearly is not attacker-controlled, such as explorer.exe in a user session or a Windows service host. The parent chain tells you how the attacker ran the command. A few rough patterns help with reading it, though none of them is proof on its own:
  • cmd.exe launched by an unfamiliar executable in a temp, ProgramData, or user folder usually points to the ransomware binary itself running the cleanup.
  • wmiprvse.exe as the parent suggests the command came through WMI, possibly from another machine on the network.
  • services.exe spawning a randomly named service binary is typical of remote execution tools that install a temporary service.
  • powershell.exe as the parent means the PowerShell Operational log, and script block logging (Event ID 4104) if enabled, may hold the actual script.
Keep in mind that Sysmon records UtcTime in UTC, while TimeCreated in Get-WinEvent output is shown in the local time zone of the machine you query from. Mixing the two is an easy way to build a timeline that is off by several hours.
With the deletion event identified, you have a fixed point. Work outward from it in both directions:
  1. Before the deletion: the 4624 logon tied to the Logon ID, any new accounts (Event ID 4720), and earlier process events from the same session. The first suspicious event in that session is the earliest confirmed attacker activity, not necessarily the initial access.
  2. Around the deletion: the wbadmin and bcdedit commands, service installs, and the start time of the ransomware binary.
  3. After the deletion: file modification times on encrypted files and the creation time of the ransom note show when encryption actually ran.
The gap between the logon and the deletion matters for recovery. If the attacker had access for days before wiping snapshots, a backup taken one day before encryption may already contain their tools or accounts. Pick a restore point from before the earliest confirmed activity, and check that your backup copies could not have been deleted with the same admin rights, as covered in checking whether an admin can still delete an immutable copy.
An empty result is common, and it usually means the logging was never there, not that nothing happened. Check what the server was configured to record before drawing conclusions. auditpol /get /subcategory:"Process Creation" shows whether 4688 was being logged, and reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\Audit /v ProcessCreationIncludeCmdLine_Enabled shows whether command lines were included (a value of 1 means on; a missing value usually means off). Also check the Security log's maximum size. On a busy server a small log can roll over within hours, which pushes the deletion event out before anyone looks. The same two commands are your verification step after hardening. Once both policies are enabled on the rebuilt server, run a harmless vssadmin list shadows, then query the newest 4688 event. If it shows the full command line, the parent process, and the Logon ID, the next incident will leave the evidence this one did not. The practical habit is simple. Export the logs before touching anything, search 4688 and Sysmon 1 for the deletion command, follow the Logon ID and parent chain back to the session that ran it, and use that session's start time, not the encryption time, to choose which backup to restore.

Join My Newsletter & Get Updates!

Get notified whenever a new technical guide, server infrastructure breakdown, or personal reflection goes live, plus a curated weekly digest.