If you get ransomware, disconnect the computer from the network immediately, unplug any external drives, and do not pay or contact the attackers yet. Then record what you can see, identify the ransomware, remove the malware and restore your files from a clean backup. Staying calm and working through the steps in order gives you the best chance of getting your files back.
The sections below follow that order. Most of the steps work the same on Windows 10 and Windows 11.
Step 1: Isolate the PC
- Unplug the Ethernet cable, or turn off Wi-Fi from the network icon on the taskbar. On a laptop, switching on Airplane mode is quickest.
- Unplug USB drives, external hard drives and any NAS connections.
- If other computers share folders with this one, disconnect them from the network too until you know how far it has spread.
- Pause any cloud sync (OneDrive, Dropbox, Google Drive) from its taskbar icon, so encrypted copies do not overwrite good copies online.
Step 2: Record the evidence
Before you change anything, collect information you will need later:
- Photograph the ransom message with your phone, including any payment address, email address or "victim ID".
- Note the new file extension on encrypted files (for example
.lockedor a random string). - Keep one ransom note file and a couple of encrypted sample files. Do not delete them.
- Write down when you first noticed problems and anything unusual you did beforehand, such as opening an attachment.
Report the attack. In the US, report it to the FBI's Internet Crime Complaint Center (IC3). Elsewhere, use your national police or cyber-crime reporting service. Businesses may also have legal duties to report a breach involving personal data.
Step 3: Identify the ransomware
Some older ransomware families have known weaknesses, and free decryption tools exist for them. The No More Ransom project, run by law enforcement and security companies, offers a tool where you can upload a ransom note or sample file to identify the strain and check for a free decryptor. Use another, clean device to do this. If a decryptor exists, it will save you a great deal of work; if not, move on to restoring from backup.
Step 4: Remove the ransomware
Encrypted files are not dangerous in themselves, but the program that encrypted them may still be on the PC, along with any trojan that let it in. Removing it is essential before you restore anything, or your restored files may be encrypted again.
- Keep the PC offline.
- Run a Microsoft Defender Offline scan: open Windows Security > Virus & threat protection > Scan options, choose Microsoft Defender Offline scan and click Scan now. The PC restarts and scans before Windows loads.
- After it restarts, run a Threat Eraser Full Scan of every drive and quarantine anything it finds. Our guide on how to remove a virus from Windows walks through the clean-up.
- Check Task Manager > Startup apps and Settings > Apps > Installed apps for anything you do not recognise, especially remote-access tools.
For a business PC, or if you have any doubt the system is clean, the safest option is to wipe the drive and reinstall Windows. Our guide on removing malware without reinstalling Windows explains when a clean-up is enough and when it is not.
Step 5: Restore your files
| Recovery option | Where to find it | Notes |
|---|---|---|
| Offline external backup | The backup drive you unplugged earlier | Best option, if it was not connected during the attack |
| OneDrive file restore | OneDrive website > Settings > Options > Restore your OneDrive | Available to Microsoft 365 subscribers; rolls files back to an earlier date |
| File History | Control Panel > System and Security > File History | Only if the backup drive was not encrypted too |
| Previous Versions | Right-click a folder > Properties > Previous Versions | Most ransomware deletes these, but it is worth checking |
Scan your backup drive before restoring from it, then restore only once the PC is confirmed clean. Reconnect to the network last.
Step 6: Should you pay?
Paying is a last resort, and law enforcement agencies advise against it. There is no guarantee you will get a working decryption key, and payment can mark you as a willing target. Our full guide on whether you should pay a ransomware ransom covers the risks in detail.
Step 7: Afterwards
- Change passwords for email, banking and work accounts from a clean device, because many attacks also steal credentials.
- Install all Windows updates and update your browser and other software.
- Set up a backup that is disconnected when not in use.
How Threat Eraser helps after a ransomware attack
Threat Eraser is a virus and malware scanner and remover built for exactly this clean-up. Keep the PC offline and run a Full Scan: it checks every fixed drive for known ransomware, trojans and backdoors using file-hash matching, byte-pattern signatures and malware detection rules, and it looks inside ZIP archives and flags suspicious file names such as double extensions. Files are scanned on your PC and never uploaded. With a license you can move detected files into quarantine, where they cannot run, erase them permanently, and export a scan report as HTML, CSV or text for your records or your IT support.
Once you are back up and running, the licensed Ransomware Early Warning watches your chosen folders and warns you if many files are renamed or rewritten quickly, known ransomware extensions appear, or ransom notes are created. It cannot decrypt files that are already locked, which is why a disconnected backup remains essential.
Find out more about Threat Eraser for Windows.
Frequently asked questions
Can I get my files back without paying?
Often, yes, from an offline backup, cloud version history or a free decryptor for some older strains. Recovery is harder if no backup exists.
Will removing ransomware decrypt my files?
No. Removal stops further damage, but encrypted files stay encrypted until restored from backup or unlocked with a working decryptor.
Should I reinstall Windows after ransomware?
It is the safest option, especially for business PCs. At minimum, run several thorough scans before restoring files or reconnecting to the network.
