GGCSE Revision Hub

3.6.2.2 Malicious code (malware)

AQA Computer Science 8525Topic 3.6 — Cyber securityFoundation & Higher

Cyber security is the set of processes, practices and technologies that protect networks, computers, programs and data from attack, damage or unauthorised access. This topic works in two directions: first the threats, which is what an attacker does to you, and then the defences, which is what you do about it. Almost every mark in this topic is a definition and a justification, so learn the terms precisely — the vocabulary of a threat and of a defence is the vocabulary the mark scheme uses.

What you need to know

What malware is

Define the term malware. Malware is an umbrella term used to refer to a variety of forms of hostile or intrusive software. The word 'umbrella' matters: it covers many different types, and the specification asks you to be able to describe the specific forms as well as define the general term.

Key fact: Malware is an umbrella term covering a variety of forms of hostile or intrusive software.

Describing it and defending against it

Describe what malware is and how it can be protected against. The defences are: anti-malware software kept up to date, not running software from untrusted sources, scanning downloads and removable media, restricting what users can install, and backups so that the damage can be undone. Defence in depth matters because new variants appear constantly and signature-based detection will always be behind.

Key fact: Malware is defended against with up-to-date anti-malware software, care over downloads, restricted install rights and backups.

The computer virus

A computer virus is a piece of code that attaches itself to a program or file and spreads when that program or file is run, copying itself into other programs or files. The key ideas are that it needs a host and that it replicates. That is why a virus on its own does nothing — it is dormant until the host program is executed.

Key fact: A virus attaches to a host program or file, replicates into others, and does nothing until the host runs.

The trojan

A trojan masquerades as a legitimate program or file, so the user installs it willingly. Unlike a virus it does not replicate, and unlike a worm it does not spread on its own; it relies entirely on the user being tricked into running it. Once it is running it can do anything the user can — open a back door, install more malware, or steal data.

Key fact: A trojan pretends to be legitimate software so the user installs it, but does not replicate itself.

Spyware

Spyware is software that secretly gathers information about the user or the machine and sends it to somebody else — browsing habits, keystrokes, passwords, screen contents. Unlike a virus it does not usually damage anything, so it can stay installed unnoticed for a long time, which makes it the hardest of the three to notice without deliberately looking.

Key fact: Spyware secretly collects information about the user or machine and sends it away, usually without doing visible damage.

Telling them apart

The three forms differ in how they get in and what they do. The virus needs a host and spreads by itself. The trojan needs the user's deception and does not spread. The spyware needs the user's deception and does not spread either, but its purpose is to collect information rather than to damage the system. A virus is about spread, a trojan about trust, and spyware about secrecy.

Key fact: A virus spreads through a host, a trojan relies on deception, and spyware relies on secrecy.

Flashcards

Exam questions

Written in the style of AQA Computer Science, with a mark scheme for each one. No question here is a real past paper question.

mcq1 mark

Which statement correctly describes a trojan?

  • It attaches itself to a program and replicates into other files
  • It secretly records the user's keystrokes and sends them away
  • It masquerades as legitimate software so that the user installs it
  • It spreads across a network by itself

Mark scheme: 1 mark for identifying that a trojan masquerades as legitimate software so the user installs it willingly. 'It attaches itself to a program and replicates into other files' describes a virus, 'It secretly records the user's keystrokes and sends them away' describes spyware and 'It spreads across a network by itself' describes a worm.

short3 marks

Explain in English how a computer virus differs from a trojan, and how a virus gets onto a computer in the first place.

Mark scheme: 1 mark for stating that a virus attaches itself to a host program or file and replicates, while a trojan masquerades as legitimate software and does not replicate. 1 mark for explaining that the virus needs the host to be run before the malicious code executes. 1 mark for explaining how it arrives, for example in a downloaded file, an email attachment or a removable memory device.

six6 marks

Explain in English the different forms of malware, how each spreads or installs itself, and how systems are protected against them.

Mark scheme: Level 1 (1-2 marks): A short answer defining malware and naming two forms. Level 2 (3-4 marks): A structured answer describing each of the three forms. Level 3 (5-6 marks): A detailed answer giving the umbrella definition of malware, describing the virus as needing a host and replicating, the trojan as relying on the user's deception without replicating, and spyware as collecting information silently, explaining the different installation routes for each, and setting out the defences — up-to-date anti-malware software, care with downloads and removable media, restricted install rights and backups — while noting that new variants appear constantly so defence in depth is needed.

Other sections in this topic

Practise these questions

Answer them in the interactive view and they get marked against the same mark scheme, one mark at a time, with the reason for each mark.

Open the interactive topic →