Labs ICT
โญ Pro Login

Common Threats

Viruses, worms, trojans, and how the OS defends against them.

The Threat Landscape

Every computer connected to a network is a potential target. Malicious actors are constantly looking for vulnerabilities to exploit โ€” whether it's stealing data, disrupting services, or gaining unauthorized control. The operating system must defend against a wide range of threats.

Understanding these threats is the first step to defending against them. Let's look at the most common types of attacks and how operating systems protect against them.

Viruses

A virus is a piece of malicious code that attaches itself to a legitimate program and spreads when that program is executed. It's called a virus because it behaves like a biological virus โ€” it needs a host (the program) to replicate and spread.

Viruses can corrupt files, delete data, or steal information. They spread through infected files, email attachments, and downloadable programs. The OS protects against viruses through:

  • File permissions โ€” Preventing unauthorized modification of executable files.
  • Antivirus integration โ€” Modern OSes include built-in antivirus (Windows Defender, macOS XProtect) or integrate with third-party solutions.
  • User account control โ€” Requiring administrator approval before installing software.

Worms

A worm is like a virus, but it doesn't need a host program. It's a standalone program that replicates itself and spreads across networks automatically. Worms exploit vulnerabilities in network services or operating systems to spread from machine to machine.

Famous worms like WannaCry (2017) and Code Red (2001) caused billions of dollars in damage by rapidly infecting thousands of systems worldwide. The OS defends against worms by:

  • Patching vulnerabilities โ€” Regular security updates close the holes worms exploit.
  • Firewalls โ€” Blocking unnecessary network services that worms could use to spread.
  • Network segmentation โ€” Limiting the spread of worms by isolating network segments.

Trojan Horses

A Trojan horse is malicious software disguised as legitimate software. You think you're installing a useful tool, but it's actually carrying malware. Unlike viruses and worms, Trojans don't self-replicate โ€” they rely on social engineering to trick users into installing them.

The OS protects against Trojans through:

  • Verified app stores โ€” Downloading software from trusted sources reduces the risk.
  • Code signing โ€” The OS verifies that software comes from a known publisher and hasn't been tampered with.
  • Sandboxing โ€” Running untrusted applications in isolated environments that limit their access to system resources.

Denial of Service (DoS) Attacks

A DoS attack overwhelms a system with so much traffic or work that it becomes unavailable to legitimate users. A Distributed DoS (DDoS) attack uses thousands of compromised machines to launch the assault, making it much harder to defend against.

The OS defends against DoS attacks through:

  • Rate limiting โ€” Restricting the number of connections or requests from a single source.
  • Traffic filtering โ€” Identifying and blocking malicious traffic patterns.
  • Resource quotas โ€” Limiting the resources any single process or user can consume.
  • Load balancing โ€” Distributing traffic across multiple servers to absorb the impact.

The Human Factor

The most sophisticated security mechanisms are useless if users are careless. Phishing โ€” tricking users into revealing credentials or installing malware โ€” remains one of the most effective attack vectors. No amount of OS security can protect against a user who voluntarily gives away their password.

Operating systems try to help by warning users about suspicious downloads, blocking known phishing sites, and encouraging security best practices. But ultimately, security is a shared responsibility between the OS, the applications, and the user.

๐Ÿงช Quick Quiz

How does a worm differ from a virus?