• Practice
  • About 15 min
  • 5 practice questions

Identifying malware from its behaviour: case practice

Name the type of malware from what it does and how it spread, and choose the right first response to each.

If something looks wrong, please tell us.

Malware questions give you symptoms and ask for a name, or give a name and ask for its behaviour. Two questions decide almost every case: how did it spread? and what does it do? Answer those two and the type follows.

The two-question grid

MalwareHow did it spread?What does it do?
VirusAttached to a file; a person opened or shared itDamages or deletes files; spreads to other files
WormOn its own through the networkCopies itself quickly, uses up resources
TrojanUser installed it, thinking it was usefulOpens a back door, steals data; does not copy itself
RansomwarePhishing attachment, bad download or unpatched systemEncrypts or locks files and demands payment
SpywareHidden in other software or a malicious linkSecretly collects activity and data
KeyloggerAs spywareRecords keystrokes
AdwareBundled with free softwareFloods the screen with adverts
RootkitInstalled by other malware or an attackerHides itself and the attacker's access deep in the system
Bot / botnetAny of the above routesDevice is remote-controlled, often used in DDoS attacks

Worked example 1

Case: A clerk opens an email attachment called 'Invoice'. Soon a message fills the screen: 'Your files are encrypted. Pay to get the key.' Documents will not open. Working: what it does - encrypts and demands payment. Answer: ransomware. Response: disconnect the computer from the network at once so it cannot reach shared drives, inform the IT team, do not pay, and restore from an offline backup after the system is cleaned.

Worked example 2

Case: Several computers in a college lab become slow at the same time. Nobody opened any file; the network is jammed with traffic between the machines. Working: spread by itself across the network. Answer: worm. Response: isolate the affected computers, apply the missing security update that the worm exploits, and scan all machines.

Worked example 3

Case: Kiran installed a free 'battery saver' app from a link in a message. His phone works normally, but a friend tells him that someone logged in to his email from another city. Working: installed by the user because it looked useful, then gave the attacker access - Trojan; if it recorded his typing, it also acted as a keylogger. Response: uninstall the app, scan the phone, change passwords from a clean device, and turn on 2FA.

Traps to avoid

  • 'A Trojan copies itself to other computers' - wrong; that is a worm or virus.
  • 'A worm needs a user to open a file' - wrong; that describes a virus.
  • 'Antivirus is a type of malware' - wrong; it is the defence.
  • 'Paying the ransom guarantees your files back' - wrong; there is no guarantee, and paying encourages more attacks.
  • 'Adware is harmless' - it is unwanted and can lead to more dangerous downloads.

First response for any infection

  1. Disconnect from the internet and the office network.
  2. Do not enter passwords or banking details on the affected device.
  3. Run a full scan with updated antivirus or anti-malware software.
  4. Change important passwords from a different, clean device.
  5. Restore lost files from a backup; report to the IT team or the organisation's security contact.

Ask two questions: how did it spread, and what does it do? Then isolate, scan, change passwords from a clean device, and restore from backup.

Key takeaways: the spread route separates virus (needs a user and a file), worm (spreads itself) and Trojan (installed by a fooled user). The action separates ransomware (locks and demands), spyware and keyloggers (watch and record) and adware (shows adverts). The first response is always to isolate the device.

Check your understanding

  1. 1. Computers on a network become infected one after another though no one opened any file. The malware is most likely a:

    1. Virus
    2. Trojan
    3. Worm
    4. Adware
    Show answer

    Answer: C. Spreading across a network by itself without user action is the defining behaviour of a worm.

  2. 2. Your screen shows a message demanding payment to unlock your encrypted files. What should you do first?

    1. Pay at once
    2. Disconnect the device from the network and inform IT
    3. Restart it repeatedly
    4. Email the attacker your password
    Show answer

    Answer: B. Disconnecting stops ransomware from reaching other machines and shared drives. Paying gives no guarantee.

  3. 3. Which statement about a Trojan is correct?

    1. It spreads by itself across networks
    2. It is a type of antivirus
    3. It only shows adverts
    4. It is disguised as useful software and does not copy itself
    Show answer

    Answer: D. A Trojan depends on a user installing it because it looks harmless or useful; it does not self-replicate.

  4. 4. Malware that hides itself and an attacker's access deep inside the operating system is a:

    1. Rootkit
    2. Firewall
    3. Patch
    4. Cookie
    Show answer

    Answer: A. A rootkit conceals itself and other malicious activity deep in the system.

  5. 5. After a suspected infection, from where should you change your important passwords?

    1. From the infected device, immediately
    2. From a public computer at a café
    3. From a different, clean device
    4. There is no need to change them
    Show answer

    Answer: C. If spyware or a keylogger is present, typing new passwords on the infected device could reveal them. Use a clean device.

Privacy · Terms · Refunds · Delivery