Malware defined

What Is Malware?

Malware is an umbrella term used to refer to a variety of forms of hostile or intrusive software. The word itself is a contraction of "malicious software". Malware is any program or code that is deliberately designed to cause harm to a computer system, network, or the data stored on it - or to gain unauthorised access for the attacker's benefit.

Malware differs from software bugs or crashes, which are unintentional errors. Malware is written with deliberate harmful intent. It encompasses many distinct types, each working in a different way and causing different kinds of damage. The three types you need to know are computer viruses, trojans, and spyware.

Malware Virus self-replicates via files Trojan disguised as legitimate Spyware secretly monitors user

Malware is an umbrella term. Virus, Trojan, and Spyware are distinct types with different methods of operation.

Three Types of Malware

Computer Virus

A computer virus is a malicious program that self-replicates by attaching itself to legitimate files. When an infected file is opened or shared, the virus copies itself to other files and programs, spreading throughout the device and potentially to other devices via shared drives, email attachments, or downloads. This self-replication is the defining characteristic that distinguishes a virus from other malware types.

Viruses can cause a wide range of damage: corrupting or deleting files, slowing down the computer, displaying unwanted messages, or acting as a delivery mechanism for other malware. A virus requires a host file to spread - it cannot travel on its own across a network (that behaviour belongs to a worm, which is a separate type).

Example: an employee downloads an infected email attachment. When they open it, the virus attaches itself to other documents on their computer. When those documents are later emailed to colleagues, the virus spreads to their machines.

Trojan

A trojan (or Trojan horse) is malware that disguises itself as legitimate, useful software. The user is tricked into installing it voluntarily, believing it to be something benign - a game, a utility tool, or a software update. Once installed, the trojan carries out its malicious payload, which could include opening a backdoor for the attacker, downloading further malware, or deleting files.

Unlike a virus, a trojan does not self-replicate. It relies entirely on the user to install it willingly. The name comes from the ancient Greek story of the Trojan horse: a gift that appeared harmless but concealed a threat inside.

Example: a student downloads what appears to be a free game from an unofficial website. Once installed, the trojan silently opens a connection to an attacker's server, allowing the attacker to access the student's files remotely.

Spyware

Spyware is malware that secretly monitors and records a user's activity without their knowledge, then transmits the collected data to a third party. It operates silently in the background, often for extended periods before being detected. Spyware can capture keystrokes (recording everything typed, including passwords), take screenshots, record browsing history, harvest saved passwords, or access the microphone and camera.

Unlike a virus or trojan, spyware's primary goal is not to damage the system but to gather information - making it particularly dangerous for privacy and security. It is often bundled with seemingly legitimate free software as a way to gain installation on a device.

Example: a user installs a free PDF reader that secretly includes spyware. Over several weeks, the spyware records every password and banking credential the user types and sends them to the attacker, who then uses them to access the user's accounts.

Protecting Against Malware

  • Anti-malware / antivirus software: scans files and programs for known malware signatures and suspicious behaviour, quarantining or removing threats before they cause damage. Must be kept up to date to recognise new threats.
  • Keeping software updated: malware often exploits known vulnerabilities in outdated software. Regular updates close these security gaps.
  • Avoiding suspicious downloads: only download software from trusted, official sources; do not open unexpected email attachments or click links from unknown senders.
  • User awareness training: users who understand how trojans and phishing work are far less likely to install malware accidentally.
  • Firewalls: help block malicious traffic and can prevent some malware from communicating with external servers.

 Key Takeaways

  • Malware is an umbrella term for hostile or intrusive software designed to cause harm or gain unauthorised access.
  • A virus self-replicates by attaching to files; it spreads when infected files are shared.
  • A trojan disguises itself as legitimate software and relies on the user installing it willingly; it does not self-replicate.
  • Spyware secretly monitors user activity and transmits the data to an attacker, without causing obvious damage.
  • Key protections: up-to-date anti-malware software, software updates, avoiding suspicious downloads, and user awareness.