What do I check first after a ransomware attack on Windows?
A study guide for the first hours after files on Windows computers were encrypted. It shows what to keep before it is lost, what to look at first, and how to find out how the attacker got in. On a real incident, follow your organisation's response plan and involve its incident response team. Do not run the ransomware program.
This workflow was written from the tools' documentation and published references. It has not yet been checked step by step on the practice data. If a step does not match what you see, please report it.
What you will be able to answer
- Which evidence is most likely to be lost and must be kept first
- Which ransomware family it appears to be
- When the attack started and how files were encrypted
- Whether shadow copies and backups were attacked, and whether logs were cleared
- How the attacker probably got in and which other systems were touched
What you need
- Approval to act: a real case needs the owner's permission and your organisation's plan
- A clean external drive with enough space for a memory capture and a triage collection
- Administrator access on the affected computer, and a trusted copy of your collection tools on removable media
- A separate analysis computer or VM for Hayabusa, Chainsaw, Timeline Explorer and Volatility 3
- A hash tool and a place to keep a written log of every action
Steps
- 1
Stop, write down, isolate
Start a written log: time, time zone, who did what. Do not run or open the ransomware file, and do not open attachments. Cut the affected computers off the network by unplugging the cable or turning off Wi-Fi, or at the switch. CISA advises to power a device down only if it cannot be isolated another way, because shutdown loses what is in memory. Decisions about payment, reporting and law enforcement belong to the responsible people and your local law.
Use a phone or another channel the attacker cannot read when you plan the response.
- 2
Capture memory first
Memory is the most volatile evidence. If the computer is still on, capture it before you do anything else, using a tool such as WinPmem, Magnet DumpIt or FTK Imager. Write the capture to an external drive, not to the affected disk. Hash the file afterwards and record the tool and version. Running tools changes the system a little, so write down what you ran and when.
- 3
Collect triage artifacts and logs
Use KAPE or the Velociraptor offline collector to copy key artifacts: event logs, the $MFT, registry hives, Prefetch, Amcache and user data. Run as administrator. KAPE's !SANS_Triage target is a common starting point. Velociraptor's offline collector runs when you start it without arguments and writes a zip file. Choose encryption with the server certificate, as its documents advise. Export the event logs early, before they roll over. Image disks of a sample of affected computers when you can.
kape.exe --tsource C: --tdest E:\evidence\kape_out --target !SANS_Triage
- 4
Keep the ransom note and a few encrypted files
Copy the ransom note and a small number of encrypted files, with their original names and time stamps, to your evidence drive. Note the new file extension and the note's file name. The ID Ransomware web service can name a family from a note or sample, but it may keep uploads, and it may share email and Bitcoin addresses it finds. Check policy before using it and remove private data. No More Ransom lists decryptors for some families.
- 5
Check shadow copies and backups
Many ransomware programs delete shadow copies and backups first. From an elevated prompt, vssadmin list shadows shows what still exists. Search process creation logs (event 4688, or Sysmon event 1 if installed) and PowerShell logs for vssadmin, wmic, wbadmin and bcdedit. Find out whether your backups are offline, intact or unknown before anyone starts a restore. Listing shadows changes nothing.
vssadmin list shadows /for=C:
- 6
Build a first timeline from the event logs
Run Hayabusa over the exported logs and open the result in Timeline Explorer. Sort by alert level, then look at the time just before the first encryption. Chainsaw can hunt with Sigma rules, and its analyse gaps command points to missing stretches in a log. Check for event 1102 (Security log cleared), event 104 (System log cleared), 7045 (service installed), 4698 (scheduled task created) and 5140 (network share access).
hayabusa.exe dfir-timeline -d .\logs -o timeline.csv -w
chainsaw hunt .\logs -s sigma/ --mapping mappings/sigma-event-logs-all.yml
Older Hayabusa versions call the first command csv-timeline.
- 7
Look at the memory capture
Open the capture with Volatility 3. Start with windows.pslist and windows.pstree to see processes and parents, then windows.cmdline for command lines and windows.netscan for network connections. Look for a program in an odd folder, an unusual parent, command lines that mention encryption or deleting backups, and connections to unknown addresses. Memory is a lead, not a full record.
python3 vol.py -f memory.raw windows.pslist
python3 vol.py -f memory.raw windows.pstree
python3 vol.py -f memory.raw windows.cmdline
- 8
Find how they got in and how far they spread
Start with the earliest encrypted or suspicious computer and work backward in time. Common entry points are a phishing email, remote access such as RDP or VPN, stolen valid accounts, an exposed application, or a trusted supplier. Look at logons, new services and tasks, and share access on other computers. Mark each computer as encrypted, touched or clean, with the evidence for each.
- 9
Write the hand-over notes
Record every action, each hash, each tool and version, the time zone, the list of computers and their status, and what you did not examine. Keep evidence on write-protected or access-controlled storage. Passing this to the incident lead matters more than finishing alone. Do not wipe or rebuild a computer until its evidence is kept and the owner agrees.
Where the evidence is stored
Ransom noteFiles dropped into many folders (names often include words such as README or DECRYPT)Family hints, contact details and the extension used. The creation time shows when encryption reached the folder.
Memory imageCapture taken from the running computerRunning processes, command lines, network connections and loaded code that disk data may not show
Security event logWindows\System32\winevt\Logs\Security.evtxLogons (4624), process creation (4688, if enabled), share access (5140), task creation (4698) and log clearing (1102)
System event logWindows\System32\winevt\Logs\System.evtxNew services (7045) and log clearing (104)
Volume shadow copiesVolume Shadow Copy Service, listed with vssadmin list shadowsWhether earlier versions of files still exist or were deleted
$MFT and file timesNTFS master file tableBursts of renamed or modified files and the order in which folders were hit
Prefetch and AmcacheWindows\Prefetch and Windows\appcompat\Programs\Amcache.hveEvidence that the ransomware, tools and remote access programs ran, with times
Remote access logsVPN, RDP gateway, firewall and sign-in logsWhere the attacker came in from and which accounts they used
Check your result
- Compare the process and time seen in memory with a Prefetch or Amcache entry for the same program on disk.
- Check each Hayabusa alert against the raw event in the log, using EvtxECmd output or Event Viewer on a copy.
- Compare Hayabusa and Chainsaw results for the same logs. Explain any alert that only one of them shows.
- Check the time of the first ransom note file in the $MFT against the first encryption events in the logs.
Common mistakes
- Shutting the computer down at once. This throws away the memory, which is the most volatile evidence.
- Saving the memory capture or tool output onto the affected disk.
- Running the ransomware file, or opening attachments, on a normal computer to see what it does.
- Rebuilding or wiping computers before logs, memory and images are kept.
- Looking only at the computer with the ransom note. It is often not the first one that was reached.
Write it up
A short, careful way to state this kind of finding in a report. Change the details to match your own results.
Memory from [computer] was captured at [time, UTC] with [tool and version] (SHA-256 [hash]). The logs show [event, for example Security log cleared] at [time] and a new service [name] at [time]. Encrypted files carry the extension [ext] and the note [file name]. The family is [name or unknown] and the entry point is [probable route or not yet established]. Backups were [status].
What this does not prove
- Capturing memory and running tools changes the live system. Write down every action.
- If the computer was shut down, the memory evidence is gone. Disk evidence may still help.
- Attackers often clear logs or delete backups. Missing records do not mean nothing happened.
- Event 4688 and PowerShell logging are only present if they were switched on before the attack.
- Triage tools cannot decrypt files. Whether a decryptor exists depends on the family, so check with a trusted source.
- Evidence rules, reporting duties and law enforcement contact differ by country and organisation. This guide is not legal advice.
Practise on public data
Hayabusa sample event logs (attack logs, no full ransomware case)
A public repository of sample Windows event log (.evtx) files for testing detection rules. The files are logs, not programs. Its README says antivirus software may flag the repository because of keywords. We could not confirm that it holds a complete ransomware case, and there is no answer key. We found no public ransomware disk image we could verify.
Your task. Run Hayabusa on the folder with the command shown in step 6, open the CSV in Timeline Explorer, sort by level, and list the five most common alert titles. Run Chainsaw hunt on the same folder and compare. Write three sentences on what happened and which events you would look for in a ransomware case.
The DFRWS 2023 manual (see the links) describes how to build your own simulated ransomware lab with Sysmon, KAPE and Hayabusa. The CryptoWall exercise of 2015-07-24 on malware-traffic-analysis.net is network traffic from a real infection. Treat its files as live malware.
Where to go next
- What was running on this computer? A first look at a RAM dump Examine the memory capture in more detail
- Who logged in to this Windows computer, and when? Follow the logons around the attack
- How does malware or an intruder stay on this Windows computer? Hunt for new services and tasks the attacker left
- Is this suspicious email a phishing attempt? Examine the email that may have started it
Sources and further reading
- CISA: #StopRansomware Guide
- Velociraptor documentation: Offline collections
- Hayabusa documentation: dfir-timeline command
- Chainsaw on GitHub (WithSecure)
- DFRWS 2023: Ransomware simulations, hands-on case studies (manual)
A study guide written in our own words. It is not a legal or laboratory procedure. Follow your own lab's approved method on real cases. Last reviewed 24 Nov 2026.