What is ransomware?

Malware that locks or scrambles your files, then demands money to unlock them.

Ransomware is malware that locks your files, usually by encrypting them, and then asks you to pay to get them back. A note on screen or in each folder says what to pay and how. Paying doesn’t guarantee your files return.

How it gets onto a computer

Ransomware needs you, or someone on your network, to run it. The usual routes are an email attachment, a cracked or fake app, a command a web page asks you to paste into Terminal (ClickFix), or a stolen password used to log in remotely. Some groups first copy your files with an infostealer and threaten to publish them as well.

On a Mac

Mac ransomware is rare compared with Windows, but it exists. macOS checks apps before they open with Gatekeeper and scans for known malware with XProtect, so most attacks need you to approve the app or bypass those checks.

The best protection is a backup that the ransomware can’t reach. Turn on Time Machine in System Settings > General > Time Machine, and keep the backup disk unplugged when you’re not backing up. Ransomware locks the files it can reach, and that includes a disk that’s plugged in.

What to do if your files are locked

  1. Disconnect from Wi-Fi and Ethernet so it can’t spread or send more files.
  2. Don’t pay yet. Photograph the note.
  3. Restore from a backup after the Mac has been wiped and reinstalled.

On Windows

Windows is the main target. It has the same kinds of attack, and Microsoft Defender includes a feature that limits which programs can change files in protected folders.

How to check

Our guide on how to tell if your Mac has a virus lists the signs, and how to scan a Mac for malware covers the free tools.

Every term in the glossary