Topic 5 · The internet and its uses (cyber security)

Types of malware

Video lesson: Types of malware▶ Watch the video lessonShort, exam-focused explanation of this topic on the CS with Aamir YouTube channel.

Malware (malicious software) is any software designed to damage a computer, steal data or disrupt a system. You need to know six types and be able to describe what each one does.

The six types of malware

MalwareHow it worksWhat it can do
VirusAttaches itself to another file or program and copies itself when that file is runDeletes or corrupts files, fills up storage, makes the computer crash
WormA standalone program that copies itself and spreads across a network on its own, without the user running anythingUses up network bandwidth and slows networks down; can carry other malware
Trojan horseDisguised as legitimate, useful software, so the user installs it themselvesOnce installed, can let other malware in, such as spyware, or give a hacker access
SpywareSecretly monitors what the user does, for example by recording key presses (key logging)Sends passwords, bank details and other personal data to a third party
AdwareDisplays unwanted adverts, often as pop-ups, and may redirect the browserAnnoys the user, slows the computer down, can lead to harmful websites
RansomwareEncrypts the user's files so they cannot be openedDemands a payment (ransom) for the key to decrypt the files

Virus or worm? The key difference

A virus needs a host file and only spreads when that infected file is run. A worm does not need a host file or any action by the user – it spreads through the network by itself. This is a very common exam question.

How to protect against malware

Exam tips

Want the full topic notes, slides and worksheets? See Notes & Slides, practise with the free CS with Aamir Quiz App, or order the O Level Computer Science Study Guide.