Ransomware: what to do and how to avoid it

Ransomware encrypts your files and demands payment, often in cryptocurrency, for a key that may or may not work. U.S. agencies such as CISA and the FBI generally advise against paying: it doesn’t guarantee you’ll get your files back, and it funds more crime. The best defense is a backup the ransomware can’t reach.

TimeVaries
LevelBeginner
TopicViruses, scams & security

Written for Windows 11. The same ideas usually work on Windows 10 and, where noted, on a Mac.

Step by step

  1. Disconnect the computer from the network

    Turn off Wi-Fi or unplug the Ethernet cable so the ransomware is less likely to spread to other computers or a connected backup drive. Don’t start deleting everything in a panic.

  2. Don’t pay as your first move, and don’t trust a pop-up “unlock” tool

    Payment rarely comes with a reliable customer-service department. Don’t download a decryptor from an unofficial site that appears in the ransom note’s ads. If you later look for a decryptor, use a trusted project such as the official No More Ransom site, which law-enforcement and security companies maintain.

  3. Note the ransom message (don’t rush to wipe it)

    Photograph or write down the name of the ransomware and any ID the note shows. That information can help a professional or a decryptor site. Then you can get help from a technician or, for a business, from a responder you hire — not from a company that cold-called you after the attack (see also recent fraud cases involving fake “ransomware help” firms).

  4. Restore from a backup that wasn’t connected

    The useful backup is one the attack couldn’t encrypt: a drive you unplug when you’re not backing up, or a cloud backup with version history. After a clean scan or a rebuilt PC, restore files from that copy. See the backup guide so the next incident is less of a disaster.

  5. Prevent the next one

    Keep Windows and browsers updated, be careful with email attachments and macros, use unique passwords and two-factor authentication, and run Windows Security. Be wary of unofficial cracks and pirated software, which are a common way ransomware arrives.

What not to do

  • Paying in a hurry because a timer is on the screen.
  • Plugging in your only backup drive to “check it” while the infected PC is still running and connected — you can encrypt the backup too.

When to get more help

  • You’re a business, a school, or you handle other people’s data — get professional incident help and consider legal or regulatory duties.
  • Home users who can’t restore files may still want a shop to image the drive before a wipe, in case recovery is possible later.
A reminder

These steps are general information for home users. Menus can vary a little by Windows version and PC maker. If something looks unsafe, or the hardware may be failing, stop and get a professional. We’ll never ask you for a password or remote access from this site.

Related guides