Security

What Is Ransomware? How It Works and How to Protect Yourself

Ransomware is malware that encrypts the files on a computer or network so you can't open them, then demands a payment for the key to decrypt them. Many attackers also copy your data first and threaten to publish it, so a working backup doesn't fully end the threat.

CISA's definition is short: ransomware is "a form of malware designed to encrypt files on a device, rendering any files and the systems that rely on them unusable", after which "malicious actors then demand ransom in exchange for decryption". It is one of several types of malware, distinguished by what it does rather than how it spreads.

How a ransomware attack works

Microsoft separates two kinds of attack:

  • Commodity (automated) ransomware spreads like other malware, through phishing emails and malicious downloads, and hits whichever device runs it.
  • Human-operated ransomware is run by people with their hands on the keyboard. They get into an organisation, raise their privileges, move from machine to machine, steal data, and only then deploy the encryption to the systems that will hurt most.

Microsoft lists the stages of a human-operated attack as initial compromise, persistence and defence evasion, lateral movement, credential access, data theft, and impact. The encryption you notice is the last step of a break-in that may have been going on for days. That is also why Microsoft warns that, unlike commodity ransomware, a human-operated attack "will continue to threaten your business operations after the initial encounter" until the attacker is fully removed.

How ransomware gets in

CISA groups its prevention advice by the initial access routes attackers use most:

Entry pointWhat it looks likeMain defence
PhishingAn email attachment or link that installs malware or harvests a passwordTraining, email filtering, treating unexpected attachments as suspect
Compromised credentialsReused or leaked passwords used to sign in to VPN, email or remote accessUnique passwords and two-factor authentication
Exposed remote accessRemote Desktop (RDP) reachable from the internetCISA: "Do not expose services, such as remote desktop protocol, on the web."
Unpatched internet-facing systemsVPN appliances, firewalls and servers with known vulnerabilitiesPrompt patching, especially for anything reachable from the internet

The UK NCSC points to the same remote-access weak spots: exposed services such as Remote Desktop Protocol and unpatched remote access devices.

What double extortion means

CISA describes how attackers "have also exfiltrated victim data and pressured victims to pay by threatening to release the stolen data", and says "the application of both tactics is known as 'double extortion'". In some cases attackers skip the encryption entirely and extort the victim with stolen data alone. For you, this changes what a backup can do: restoring files gets you working again, but it doesn't stop a leak of data that was already copied out.

Should you pay the ransom?

Law enforcement and government agencies advise against it. The NCSC states that "law enforcement do not encourage, endorse, nor condone the payment of ransom demands", and gives the reasons:

  • Paying doesn't guarantee you get your data or access back. Microsoft makes the same point: even when paid, attackers "might never" hand over the key.
  • Your computer is still infected after you pay.
  • The money funds criminal groups, and the NCSC warns that paying makes you more likely to be targeted again.

The No More Ransom project, run with Europol and the Dutch National Police, says the same and offers free decryption tools for some ransomware families. Its Crypto Sheriff tool is the starting point for victims looking for help. Check there before treating encrypted files as lost, but expect that most modern ransomware has no free decryptor; the NCSC notes that most encrypted files can typically only be decrypted by the attacker.

The backups that actually protect you

Backups are the main reason a ransomware attack becomes an inconvenience instead of a disaster, but only certain backups survive one. CISA warns that "many ransomware variants attempt to find and subsequently delete or encrypt accessible backups". Its first recommendation is to "maintain offline, encrypted backups of critical data" and test them regularly. The NCSC adds detail:

  • Keep at least one backup offline, separate from your network, ideally off site, or use a cloud service built for backups.
  • Make multiple copies using different backup methods and storage locations. Two copies on one external drive, or several copies in one cloud account, don't count as separate.
  • Test restores regularly so you know the backup works before you need it.

For a home user, that can be as simple as an external drive you plug in for the backup and then disconnect, plus a cloud backup service with version history. A drive that stays plugged in all the time gets encrypted along with everything else.

Other protections that matter

  • Install updates promptly, starting with anything exposed to the internet: routers, VPNs, remote access tools.
  • Turn on two-factor authentication everywhere it's offered, so a stolen password isn't enough to get in. Use a unique password per account; the password generator makes random ones locally in your browser.
  • Don't use an administrator account for everyday work. CISA's version: "Do not use root access accounts for day-to-day operations." Ransomware running as a normal user can reach far less.
  • Keep remote desktop off the internet. If you need remote access, put it behind a VPN with two-factor authentication.

What to do if ransomware hits

CISA's response checklist begins with these steps:

  1. Isolate affected systems immediately. Unplug the network cable and turn off Wi-Fi. CISA advises powering devices down only if you can't disconnect them from the network.
  2. Work out what's affected and which systems matter most to restore first.
  3. Preserve evidence. CISA recommends taking a system image and memory capture of a sample of affected devices before rebuilding, if you have the means.
  4. Report it. In the US, CISA suggests reporting to CISA, your local FBI field office, or the FBI's Internet Crime Complaint Center at ic3.gov.
  5. Rebuild and restore from clean backups, and change passwords from a clean device. CISA warns that the malware that delivered the ransomware may still be present, so find and remove it before restoring, or the attack starts again.

Photograph the ransom note and keep a copy of one encrypted file before you wipe anything. Both help with the report and with checking whether a decryptor exists.

Frequently asked questions

Can ransomware be removed without paying?
The malware itself can usually be removed, but removing it does not decrypt files that are already encrypted. Recovery normally means restoring from a backup the attacker could not reach. For some older ransomware families, free decryption tools exist on the No More Ransom site, run by Europol, the Dutch police and security companies; check there before assuming files are lost.
Does antivirus stop ransomware?
It helps but is not enough on its own. Human-operated attacks often begin with stolen passwords or exposed remote access rather than a malicious file, and attackers work to evade detection once inside. Updates, two-factor authentication, not exposing remote desktop to the internet, and offline backups cover the gaps.
Is cloud storage like OneDrive or Google Drive a ransomware backup?
Not by itself. A synced folder copies encrypted files to the cloud just as faithfully as good ones. It helps only if the service keeps previous versions you can roll back to, and the UK NCSC advises against relying on multiple copies inside a single cloud service. Keep at least one copy that the infected computer cannot reach or change.
Should I report a ransomware attack?
Yes. In the US, CISA recommends reporting to CISA, your local FBI field office or the FBI's Internet Crime Complaint Center (ic3.gov). Elsewhere, report to your national police cybercrime unit or national cyber security agency. Reports also give investigators a chance to help with containment and recovery.

Sources