This article is free to read. Creating a lesson uses your daily or stored credits; review the language and settings before starting.
How does ransomware work?
Quick answer
Ransomware is malware that encrypts a victim's files and demands payment for the decryption key. It spreads via phishing, exposed services, or software flaws, then locks data and often threatens to leak it. Victims must choose between paying, restoring from backups, or losing data.
Ransomware is malicious software that secretly encrypts a victim's files, making them unreadable until a payment is made. It spreads through phishing emails, software vulnerabilities, or exposed remote access, then demands cryptocurrency for the decryption key.
Step by step
- Infection: Ransomware enters through a phishing email, malicious download, or exposed network service.
- Execution: The code runs, often disabling security tools and establishing persistence.
- Discovery: It scans the system and network to find valuable files and backups.
- Encryption: Files are locked using strong encryption, and shadow copies are deleted.
- Extortion: A ransom note demands cryptocurrency payment for the decryption key.
- Aftermath: Even if paid, victims may not recover files, and data may be leaked.
Key things to understand
- Ransomware typically arrives via phishing emails with malicious attachments or links, or by exploiting unpatched software vulnerabilities.
- Once inside, it quietly maps the network and escalates privileges to reach as many files and backups as possible.
- The malware then encrypts files using strong algorithms, often deleting shadow copies to prevent easy recovery.
- A ransom note appears, demanding payment in cryptocurrency in exchange for a decryption key, with a deadline.
- Even after payment, victims may not get a working key, and some ransomware steals data first to threaten leaks.
Labelled diagram
- Delivery
Phishing email or exploit delivers the ransomware payload to the target system.
- Execution
Malware runs, disables defenses, and gains persistence on the machine.
- Encryption
Files are locked with strong encryption; backups and shadow copies are deleted.
- Ransom Note
A message demands cryptocurrency payment for the decryption key.
- Payment/Recovery
Victim pays but may not get a working key, or restores from backups.
Real-world examples
- In 2017, the WannaCry ransomware infected over 200,000 computers in 150 countries, exploiting a Windows vulnerability.
- The 2021 Colonial Pipeline attack forced the shutdown of a major US fuel pipeline, leading to panic buying and a multimillion-dollar ransom payment.
- A small business without offline backups may lose years of financial records after a ransomware attack.
- Hospitals have been targeted, causing delays in patient care when digital records are encrypted.
Common mistake
✗ Myth: Paying the ransom guarantees you get your files back.
✓ Fact: Many victims who pay never receive a working decryption key, and some are targeted again. Payment also funds criminal groups and may violate laws.
People also ask
How does ransomware encrypt files?
What happens if you don't pay ransomware?
How to protect against ransomware?
Can I recover my files without paying the ransom?
How do ransomware attackers choose their targets?
Does paying the ransom encourage more attacks?
What is the difference between ransomware and other malware?
Part of the guide: How the Internet Works →

