Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Common Threats and How to Defend  ›  Lesson

How Malware Works and Its Main Types

Learn how Malware works and Types 12 minMalware must get in, run and stay to do harm, whether it is a virus, worm, trojan, ransomware or spyware, so defences should block each of those steps.

How Malware Works and Its Main Types

Leo plugs in a USB stick he found in the car park to see whose it is. It is a classic way for malicious software to arrive. Malware is any program designed to harm, spy or take control, and knowing its main kinds tells you what to protect and how.

The rule

Malware must get in, run, and stay. Block each step.

Nearly all malware needs three things:

  1. Get in — an attachment, a download, a USB stick, a flaw in unpatched software.
  2. Run — someone opens it, or a flaw lets it start by itself.
  3. Stay and act — it hides, survives restarts and does its job.

The main types, named mostly by how they spread or what they do:

  • Virus — attaches to other files and spreads when they are opened.
  • Worm — spreads by itself across networks, through unpatched flaws, with no one clicking.
  • Trojan — pretends to be something useful, like a free tool or a fake invoice.
  • Ransomware — encrypts files and demands payment to unlock them.
  • Spyware and keyloggers — secretly watch activity or record keystrokes, such as passwords.
  • Botnet malware — quietly makes the machine part of a network controlled by criminals.

Many real samples combine types: a trojan that installs ransomware, for example.

The shortcut

Instead of memorising every family, map your defences onto the three steps: stop it getting in, stop it running, limit what it can do.

Defending the shop's laptopsStep 1 of 4
  1. Stop it getting in

    Email filtering, installing only from real sources, patches for known flaws, and a rule: unknown USB sticks go to Priya unopened.

The trap is relying on antivirus alone. It catches a lot, but new malware can slip past, which is why the other steps exist.

Drills

Answer fast — trust the rule.

quick drill

Which type of malware spreads across a network by itself, with no one clicking anything?

quick drill

A "free invoice viewer" that secretly installs spyware is best described as what?

quick drill

What does ransomware usually do?

quick drill

Which defence most limits what malware can do once it is running?

Remember

  • Malware must get in, run, and stay. Block each step.
  • Map defences to the steps: keep it out, stop it running, limit its reach, and notice it.
  • Trap: trusting antivirus alone, and plugging in unknown USB sticks.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainBlock each step

Explain the three steps malware needs, name two types of malware and how they differ, and give one defence for each step that Hollow Oak Books could use.