Find a course

Module 3: Social Engineering and MalwareLesson 6 of 1213 min

Malware and Ransomware

Tell viruses, worms, trojans, spyware and ransomware apart, follow a ransomware attack step by step, and defend with patching and 3-2-1 backups.

Step 1 of 12Learn

A family of malicious software

Malware is any software built to harm, spy on or take control of a system. The categories describe how it spreads and what it does:

  • A virus attaches itself to a legitimate file or program and spreads when that file is run or shared.
  • A worm spreads on its own across networks by exploiting vulnerabilities, with no user action needed. In 2017, the WannaCry worm infected hundreds of thousands of computers in about 150 countries within days, using a Windows flaw that had been patched two months earlier.
  • A trojan pretends to be something useful, such as a free game, a cracked app or a fake invoice, so the user installs it willingly.
  • Spyware and keyloggers quietly record activity, keystrokes and passwords.
  • Infostealers grab saved browser passwords, session cookies and crypto wallets, and send them to the attacker within seconds. Stolen session cookies can even let attackers bypass MFA.
  • A rootkit hides deep in the operating system to conceal other malware.
  • A botnet is a network of infected devices, often including poorly secured cameras and routers, controlled remotely to send spam or flood websites.
  • Ransomware encrypts files and demands payment.

Real attacks mix these. A phishing email delivers a trojan, which installs an infostealer, which steals an admin password, which the attacker then uses to deploy ransomware across the network.

Step 2 of 12Practice · Match the pairs

Match each type of malware to how it behaves.

Tap an answer, then tap the place where it belongs (or drag it there).

  1. Worm
  2. Trojan
  3. Keylogger
  4. Botnet
  5. Ransomware
  6. Rootkit

Step 3 of 12Flashcards

Malware types

Tap a card to flip it.

Step 4 of 12Learn

How a ransomware attack unfolds

Modern ransomware is rarely a single click that encrypts one laptop. It's usually a planned operation that unfolds over days or weeks.

  1. Initial access. The attackers get in through a phishing email, stolen VPN credentials, or an unpatched internet-facing server. Some buy access from specialists called initial access brokers.
  2. Establishing a foothold. They install remote-control tools and create hidden accounts so they can return.
  3. Privilege escalation and lateral movement. They steal administrator credentials and spread across the network, mapping file servers, databases and backups.
  4. Data theft. They quietly copy sensitive data out. This enables double extortion: pay, or we publish your data.
  5. Sabotaging recovery. They delete or encrypt backups and shadow copies they can reach.
  6. Encryption. Often at night or on a holiday weekend, they encrypt as many systems as possible at once and leave ransom notes.

Every stage is a chance for defenders. MFA blocks stolen credentials at step 1. Patching closes the server hole. Least privilege slows step 3. Monitoring can spot unusual data transfers in step 4. Offline backups survive step 5.

Should victims pay? Law enforcement agencies generally advise against it: payment funds criminals, doesn't guarantee working decryption keys, and doesn't guarantee stolen data will be deleted. Some payments may also break sanctions laws. Organizations that can restore from good backups are in a far stronger position.

Step 5 of 12Practice · Put in order

Put the typical stages of a ransomware attack in order.

Drag the items, or use the arrow buttons, to put them in order.

  1. Attacker installs remote access tools for a foothold
  2. Phishing email gives the attacker initial access
  3. Sensitive data is copied out for double extortion
  4. Files are encrypted and ransom notes appear
  5. Attacker steals admin credentials and moves across the network
  6. Reachable backups are deleted

Step 6 of 12Diagram

The ransomware timeline, stage by stage

Each stage is a chance to catch the attackers before encryption. Tap a stage to see which control can stop it.

The ransomware timeline, stage by stageProcess diagram: Initial access → Spread and escalate → Steal data → Destroy backups → Encrypt and extort.Initial accessSpread and escalateSteal dataDestroy backupsEncrypt and extort

Tap a shape with to see more.

Initial access

Stopped by MFA, patching internet-facing systems and phishing awareness.

Spread and escalate

Stopped by least privilege, segmentation and EDR alerts.

Steal data

Large outbound transfers can be spotted by network monitoring.

Destroy backups

Offline or immutable backups survive even with stolen admin credentials.

Encrypt and extort

By now prevention has failed; recovery depends on clean backups and a tested plan.

Step 7 of 12Learn

Patching and the 3-2-1 backup rule

Two unglamorous habits stop a huge share of malware damage.

Patching. Software updates fix vulnerabilities that attackers are already scanning for. After a vendor publishes a patch, attackers often study it to build an exploit within days. Organizations that patch critical internet-facing systems quickly, and keep everything else on a regular cycle, remove most of the easy ways in. Turn on automatic updates for operating systems, browsers and apps on personal devices. Replace devices and software that no longer receive security updates, because their holes will never be fixed.

Backups. The 3-2-1 rule is a classic guideline:

  • Keep 3 copies of important data (the original plus two backups),
  • on 2 different types of storage (for example, an internal drive and a cloud service),
  • with 1 copy offsite.

Against ransomware, add one more requirement: at least one copy must be offline or immutable, meaning it can't be changed or deleted from the network, even by an administrator account. A backup drive that's always plugged in gets encrypted along with everything else. Many teams now describe the goal as 3-2-1-1-0: one offline or immutable copy, and zero errors when restores are tested.

That last part matters. A backup you've never tried to restore is only a hope. Test restores regularly and measure how long they take.

Step 8 of 12Try the calculator

Backup storage planner

Estimate the storage needed for a 3-2-1 backup plan with daily incremental backups kept for a set number of days.

Size of one full backup plus daily changes
800 GB
Total across the two backup copies
1,600 GB

Step 9 of 12Note

Step 10 of 12Practice · What would you do?

What would you do?

A small design studio keeps all project files on one office server. Every night a script copies everything to a USB drive that stays plugged into that same server. The owner says this means they are protected against ransomware.

Step 11 of 12Practice · True or false

A worm needs a user to open an infected file before it can spread to another computer.

Step 12 of 12Practice · Choose one

Which backup approach best protects against ransomware that has stolen administrator credentials?