What Is Ransomware and How Does It Work? A 2026 Guide

Computer screen showing locked files and a ransom demand message with a red padlock symbol

What Is Ransomware and How Does It Work? A 2026 Guide

Computer screen showing locked files and a ransom demand message with a red padlock symbol

One morning, every file on your computer is locked. Your photos, documents, and work projects all show strange extensions, and a message on your screen demands payment in cryptocurrency. You have just met ransomware, the most feared form of malware on the internet today.

Ransomware does not steal your files and run. It locks them in place and charges you for the key. It targets individuals, schools, hospitals, and companies alike, and it has grown into an organised industry. This guide explains what ransomware is, how it works, and how to protect yourself.

In short, ransomware is malicious software that encrypts your files or locks your device and demands a ransom for restoring access. Most attacks start with a phishing email, a stolen password, or unpatched software, and the damage spreads fast once the malware is inside.

What Is Ransomware? The Short Answer

Ransomware is a type of malware built for extortion. It scrambles your files with encryption, so they become unreadable, and then demands payment, usually in cryptocurrency, in exchange for the decryption key. Without that key, recovering the files is practically impossible.

There are two main kinds. Crypto ransomware encrypts your files, leaving the device working but the data useless. Locker ransomware blocks access to the whole device, so you cannot use it at all. Crypto ransomware is far more common today because it is harder to defeat.

Paying does not guarantee recovery. Attackers may take the money and disappear, send a key that does not work, or demand a second payment. That is why security experts and law enforcement advise against paying, and why backups are the real defence.

Digital illustration of files being encrypted with a padlock chain wrapping around folders
Five Key Takeaways

  • Ransomware is extortion software: it encrypts your files and demands payment for the key.
  • Most attacks start with phishing emails, stolen credentials, or unpatched software.
  • Attackers now steal your data before encrypting it, so they can threaten to publish it too.
  • Paying the ransom does not guarantee recovery and can invite a second attack.
  • Offline backups following the 3-2-1 rule are the most reliable protection.

How a Ransomware Attack Unfolds

A ransomware attack is not one event. It is a chain of steps, and the earlier you catch it, the less damage it does. Understanding the chain helps you see where to break it, because every step is an opportunity to stop the attack.

The attack usually begins quietly. The malware arrives through a phishing email attachment, a malicious link, or a compromised download. It may also enter through a stolen password or a vulnerability in software that has not been updated.

Step 1: Delivery and entry

Delivery is the moment the malware reaches your device. The most common route is a phishing email that looks like an invoice, a delivery notice, or a message from your bank. Opening the attachment or clicking the link starts the infection, often with no visible warning.

Other entry points include infected USB drives, compromised public charging ports, and remote desktop services left exposed on the internet. On a work network, a single employee clicking one bad link can open the door for the whole organisation.

Step 2: Quiet spreading and preparation

Once inside, the malware rarely encrypts anything right away. First it hides, maps the network, and finds the most valuable files: documents, photos, databases, and shared drives. It may also copy those files to the attacker’s own servers, a step called data theft.

This quiet phase can last hours or weeks. The attackers study backup locations and try to disable or delete them, because a good backup would make the ransom pointless. They also look for other connected machines to infect.

Step 3: Encryption and the ransom note

When the preparation is done, the malware encrypts the files one by one, using strong encryption that only the attacker’s key can reverse. File names change, extensions change, and the files become unreadable. A ransom note then appears on the screen or in every folder.

The note sets a deadline and a payment amount, usually in bitcoin or another cryptocurrency, with instructions on how to contact the attackers. Some notes threaten to delete files, or publish stolen data, if the deadline passes.

Step 4: The aftermath and the decision

If you pay, the attackers might send a working decryption key, or they might not. Some victims pay and recover nothing. Others receive a key that restores only part of their data. There is no customer service, and no guarantee, when dealing with criminals.

The safer path is recovery from backups made before the attack, followed by a full clean-up of infected machines. It is slower and more work, but it does not fund the next attack, and it leaves you in control of your own data.

External hard drive and cloud backup symbols protecting documents from a malware threat
Types of Ransomware

Ransomware comes in several forms, and knowing the type helps you understand the threat. The main split is between crypto ransomware, which encrypts files, and locker ransomware, which blocks the device. Most modern attacks are crypto ransomware, often combined with data theft.

Scareware is a lighter variant: it shows alarming pop-ups claiming your computer is infected and demands payment for a fake fix. It is annoying rather than destructive, but it uses the same fear and urgency as real ransomware.

Some strains target specific systems. Mobile ransomware locks phones and tablets, while attacks on hospitals and schools aim at systems where downtime is dangerous, because pressure to pay is highest. Learn more in our guide to the biggest cybersecurity threats businesses face today.

Double Extortion, Triple Extortion, and Ransomware-as-a-Service

Modern ransomware is not just encryption. Double extortion means the attackers steal your data before locking it, then threaten to publish it if you refuse to pay. Even with perfect backups, the threat of a leak creates pressure to pay.

Triple extortion adds a third lever: attackers contact your customers, patients, or partners and threaten them too, or launch a denial-of-service attack to increase the chaos. The goal is the same in every case: make paying feel easier than refusing.

Ransomware-as-a-Service, or RaaS, explains why attacks keep rising. Developers build the malware and the payment infrastructure, then rent them to other criminals who carry out the attacks and share the proceeds. It works like a subscription business, which lowers the skill needed to launch an attack.

Ransomware vs Other Malware

Malware typeWhat it doesGoalRecovery
RansomwareEncrypts files or locks devices, demands paymentExtortionBackups or decryption key
VirusAttaches to files and spreads, damages or corrupts dataDamage or disruptionAntivirus removal, restore files
Trojan horseDisguises itself as legitimate software to gain accessSteal data or open a backdoorRemove malware, change passwords
SpywareSecretly monitors activity and steals informationSurveillance, theftRemove spyware, reset credentials
WormSelf-replicates across networks without user actionSpread, overload systemsPatch, isolate, clean network

The table shows why ransomware is different. A virus damages your files, but ransomware holds them hostage. That hostage dynamic, combined with the threat of publishing stolen data, is what makes ransomware the most expensive and stressful form of malware to face.

How to Protect Yourself From Ransomware

Protection starts with backups. Follow the 3-2-1 rule: keep three copies of anything important, on two different types of storage, with one copy kept offline or offsite where ransomware cannot reach it. Test your backups regularly, because a backup you have never restored is only a hope.

Keep your software updated. Many attacks exploit vulnerabilities that already have fixes available. Turn on automatic updates for your operating system, browser, and apps, and remove software you no longer use. For a broader foundation, read what cybersecurity is and why it is important.

Use strong, unique passwords and turn on two-factor authentication everywhere it is available. A password manager helps, and our guide to the best password managers for security can help you choose one. Be cautious with email attachments and links, especially unexpected invoices or delivery notices.

What to Do in the First Hour After an Attack

If you see a ransom note, act fast but stay calm. Disconnect the infected device from the network and from Wi-Fi, so the malware cannot spread to other machines or shared drives. Do not turn the device off and on repeatedly, and do not delete files.

Take a photo of the ransom note and note the time you discovered it. Contact your IT team or a trusted security professional, and report the attack to local police and your national cybercrime reporting service. Do not pay the ransom before getting professional advice.

Check whether a free decryptor exists for your strain. Security companies sometimes release decryptors when law enforcement seizes attacker servers. If you have clean offline backups, you can wipe the infected machines and restore from them, which is the safest recovery path.

Checklist: Ransomware Readiness

  • Backups: three copies, two media types, one offline, tested every month.
  • Updates: automatic updates on for your operating system, browser, and apps.
  • Passwords: unique password for every account, stored in a password manager.
  • Two-factor authentication: enabled on email, banking, and cloud accounts.
  • Email caution: verify unexpected attachments and links before opening them.
  • Antivirus: reputable security software installed and kept current.
  • Plan: know who to call and what to disconnect in the first hour.
  • Training: everyone in your household or team knows the phishing warning signs.

Frequently Asked Questions

What is ransomware?

Ransomware is malicious software that encrypts your files or locks your device and demands payment, usually in cryptocurrency, for restoring access. It is extortion software: the attacker holds your data hostage until you pay, and payment does not guarantee recovery.

How does ransomware get on my computer?

The most common route is a phishing email with a malicious attachment or link. It can also arrive through stolen passwords, unpatched software, infected USB drives, or malicious downloads. Once one machine is infected, some strains spread across the local network by themselves.

Should I pay the ransom?

Security experts and law enforcement advise against paying. There is no guarantee you will get a working decryption key, and paying funds future attacks and marks you as a willing payer. Recovery from offline backups is the safer path, and free decryptors exist for some strains.

Can ransomware infect Macs and phones?

Yes. Most devices are susceptible, including PCs, Macs, Android phones, and iPhones, although Windows computers are the most common target. Mobile ransomware usually locks the screen rather than encrypting files, and can often be removed by resetting the device.

What is double extortion ransomware?

Double extortion means the attackers steal a copy of your data before encrypting it. If you refuse to pay, they threaten to publish the stolen files. This makes backups alone insufficient, because the leak threat remains even when your files are recoverable.

How can I recover files without paying?

Restore from backups made before the attack, after wiping the infected machines. Check for a free decryptor from a security company for your specific strain. If neither is available, keep an encrypted copy of your files: a decryptor may be released later when law enforcement seizes attacker infrastructure.

Is ransomware the same as a computer virus?

No. Both are malware, but a virus damages or corrupts files, while ransomware encrypts them and demands payment for the key. Ransomware is defined by extortion, and it is often delivered by a virus or Trojan, which is why the terms are sometimes confused.

Conclusion

Ransomware works because it attacks what every person and organisation depends on most: their files. It arrives quietly, spreads quickly, and demands payment under a deadline. The defence is unglamorous but effective: backups, updates, strong passwords, and caution with email.

Make your backup today, test it this month, and share this guide with your family or team. For deeper protection, read our guide on what ransomware is and how you can prevent it and our comparison of backup and recovery tools for ransomware.

on this page