• Foundation
  • About 15 min
  • 5 practice questions

Cyber security basics: the CIA triad and types of malware

State the three goals of cyber security and tell viruses, worms, trojans, ransomware and spyware apart by how they spread and what they do.

If something looks wrong, please tell us.

Every digital tool in this course - payments, cloud storage, smart devices - is only as useful as it is safe. Cyber security is the practice of protecting computers, phones, networks and data from attack, damage and unauthorised access. It starts with knowing what you are protecting and what you are protecting it from.

The three goals: the CIA triad

GoalMeaningExample of a breach
ConfidentialityOnly authorised people can see the dataA stranger reads your bank statement
IntegrityData stays accurate and is not changed without permissionSomeone alters marks in a result file
AvailabilityData and services are there when neededA website is flooded with fake traffic and goes down

Good security protects all three. Encryption mainly protects confidentiality, hashes and checks protect integrity, and backups and spare capacity protect availability.

The CIA triad

  • Confidentiality
    • Only authorised people see the data
    • Protected mainly by encryption
  • Integrity
    • Data stays accurate and unchanged
    • Protected by hashes and checks
  • Availability
    • Data and services there when needed
    • Protected by backups and spare capacity

Malware: malicious software

Malware is any software written to harm a device, steal data or take control without the owner's consent. The main types differ in how they spread and what they do:

TypeHow it spreadsWhat it does
VirusAttaches itself to a file or program; spreads when the infected file is opened or sharedCorrupts or deletes files, slows the system
WormCopies itself across networks on its own, with no host file and no user actionSpreads very fast, uses up network and system resources
Trojan (Trojan horse)Disguised as useful or harmless software that the user installsOpens a hidden 'back door', steals data; does not copy itself
RansomwareUsually through phishing emails, infected downloads or unpatched systemsEncrypts or locks files and demands payment to unlock them
SpywareHidden inside free software or installed by a malicious linkSecretly watches activity and sends information to the attacker
KeyloggerA kind of spywareRecords every key pressed, capturing passwords
AdwareBundled with free softwareShows unwanted advertisements

Two related terms: a botnet is a network of infected computers controlled remotely by an attacker, often used to flood a website in a DDoS (Distributed Denial of Service) attack, which strikes at availability. A rootkit hides deep in the system to keep an attacker's access secret.

Signs a device may be infected

  • It becomes very slow or crashes often for no clear reason.
  • Pop-up adverts appear even when no browser is open.
  • Files are missing, renamed or cannot be opened, or a ransom note appears.
  • Unknown apps or toolbars appear; the browser home page changes by itself.
  • Friends receive messages or emails you never sent.
  • Mobile data or battery is used up unusually fast.

Worked example 1: virus or worm?

Case A: an infected file is copied to a pen drive and, when a colleague opens it on another computer, that computer becomes infected. The malware needed a host file and a person's action - a virus. Case B: malware enters one office computer and, within an hour, every computer on the network is infected without anyone opening anything. It spread itself across the network - a worm.

Virus or worm?

  • Virus
    • Attaches to a host file
    • Spreads when the file is opened or shared
    • Needs a person's action
  • Worm
    • Needs no host file
    • Copies itself across networks
    • Needs no user action

Worked example 2: the free game

Rohit downloads a 'free' cracked game from an unknown site. The game works, but soon his social media password is stolen. The malware came disguised as something he wanted and opened access for the attacker - a Trojan. If it had quietly recorded his typing, the part doing that would be a keylogger, a kind of spyware. Had his files been locked with a demand for payment, it would be ransomware.

Virus needs a host and a user; worm spreads by itself; Trojan pretends to be useful; ransomware locks and demands; spyware watches.

Key takeaways: cyber security protects confidentiality, integrity and availability. Malware types are told apart by how they spread and what they do: viruses attach to files, worms self-replicate across networks, Trojans disguise themselves, ransomware holds files hostage and spyware secretly collects information.

Check your understanding

  1. 1. Which type of malware spreads across a network by itself, without attaching to a file or needing a user to open anything?

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

    Answer: D. A worm self-replicates across networks on its own. A virus needs a host file and a user action.

  2. 2. Malware that locks or encrypts your files and demands payment is called:

    1. Ransomware
    2. Spyware
    3. Adware
    4. Firmware
    Show answer

    Answer: A. Ransomware encrypts or locks data and demands a ransom for the key.

  3. 3. A program that looks like a useful free tool but secretly opens a back door for an attacker is a:

    1. Worm
    2. Trojan
    3. Firewall
    4. Patch
    Show answer

    Answer: B. A Trojan horse disguises itself as harmless or useful software; it does not copy itself.

  4. 4. A website is made unavailable by a flood of fake traffic from many infected computers. Which goal of the CIA triad is attacked?

    1. Confidentiality
    2. Integrity
    3. Availability
    4. Authenticity
    Show answer

    Answer: C. A DDoS attack stops the service from being available to genuine users, so it attacks availability.

  5. 5. Software that secretly records every key you press is a:

    1. Keylogger
    2. Compiler
    3. Browser
    4. Router
    Show answer

    Answer: A. A keylogger is spyware that records keystrokes, often to capture passwords.

Privacy · Terms · Refunds · Delivery