Malware 101: Types, How They Spread, and How to Protect Yourself

Malware — short for malicious software — is any program designed to harm, disrupt, or gain unauthorized access to systems. Understanding the different types and how they spread is the first step to protecting yourself effectively.

Common Types of Malware

Ransomware

Ransomware encrypts your files and demands payment (usually in cryptocurrency) for the decryption key. It’s the most financially damaging malware category — the average ransomware payment hit $1.5 million in 2023.

How it spreads: Phishing emails with malicious attachments, drive-by downloads, vulnerable RDP connections, compromised software.

Real example: The WannaCry ransomware in 2017 infected over 230,000 computers in 150 countries, including the UK’s National Health Service, by exploiting an unpatched Windows vulnerability (EternalBlue).

Trojans

A Trojan disguises itself as legitimate software. Once installed, it creates a backdoor for the attacker or drops additional malware.

# Example: Fake software installers
# User downloads "VLC Player v4.0" from a third-party site
# The installer actually contains a remote access trojan (RAT)
# After install, attacker has full control of the system

# Prevention:
# Only download software from official sources:
# ✓ vlc.videolan.org (official VLC site)
# ✗ vlc-player-download.net (suspicious third-party)

Spyware and Keyloggers

Spyware silently monitors your activity and sends data to the attacker. Keyloggers specifically record every keystroke — capturing passwords, credit card numbers, and private messages as you type.

Adware

Adware injects unwanted advertisements into your browser and tracks your online behavior. Often bundled with free software installers — look carefully for pre-checked boxes during installation.

Rootkits

Rootkits hide deep in the operating system (sometimes at the kernel level) to conceal other malware from detection tools. They’re difficult to detect and remove because they can hide from the very tools you’d use to find them.

Worms

Unlike viruses, worms spread automatically through networks without needing to attach to a file. They exploit network vulnerabilities to copy themselves to other machines.

How Malware Gets on Your System

  1. Email attachments — Malicious .docx, .pdf, .exe, .zip files
  2. Malicious links — Drive-by downloads from compromised or fake websites
  3. Software bundling — PUPs (Potentially Unwanted Programs) bundled with free software
  4. USB drives — Found or given USB devices containing autorun malware
  5. Exploit kits — Automated tools that exploit vulnerabilities in browsers or plugins when you visit a malicious site
  6. Fake software updates — Pop-ups claiming your Flash Player or Java needs updating

Protecting Yourself from Malware

Keep Everything Updated

# Enable automatic updates:

# Windows:
Settings > Windows Update > Advanced Options
> Enable "Receive updates for other Microsoft products"
> Set Active Hours to avoid restart interruptions

# macOS:
System Settings > General > Software Update
> Enable "Install macOS updates" and "Install app updates"

# Critical: Update browsers separately!
# Chrome: Help > About Google Chrome (triggers update check)
# Firefox: Help > About Firefox

Use Antivirus/EDR Software

# Windows 11: Windows Defender is excellent and free
# Enable Real-time protection:
# Windows Security > Virus & threat protection > Manage settings

# Additional free options:
# Malwarebytes Free — excellent second-opinion scanner
# Download from malwarebytes.com/mwb-download

# Run a scan:
# Malwarebytes: Scan > Threat Scan > Start Scan
# If threats found: Quarantine All > Apply Actions

# For businesses — consider EDR solutions:
# CrowdStrike Falcon, SentinelOne, or open-source Wazuh

Download Software Safely

# Rules for safe software downloads:
# 1. Use official websites only (google the software, check URL carefully)
# 2. Verify downloads with checksums when provided:
#    Windows:
Get-FileHash .installer.exe -Algorithm SHA256
#    Linux:
sha256sum downloaded_file.exe
# Compare output with the hash listed on the official site

# 3. Use package managers (always safer than downloading executables):
#    Windows: winget install vlc (Microsoft's official package manager)
#    macOS: brew install vlc (Homebrew)
#    Linux: apt install vlc / dnf install vlc

Enable Browser Security Features

# Chrome Safe Browsing (enhanced mode):
# Settings > Privacy and security > Security
# > Select "Enhanced protection"

# Enable click-to-play for plugins (reduces drive-by infections):
# Chrome: Settings > Privacy and security > Site Settings > Additional content settings
# > Insecure content: Block

What to Do If You’re Infected

  1. Disconnect from the network immediately — Prevents spread to other devices and data exfiltration
  2. Don’t pay ransomware demands — Payment doesn’t guarantee decryption and funds criminal operations. Check nomoreransom.org for free decryptors first.
  3. Boot from a clean USB drive — Use a bootable antivirus scanner (Kaspersky Rescue Disk, Bitdefender Rescue) to scan without booting the infected OS
  4. Change all passwords from a clean device
  5. Restore from backups — Ideally from an offline backup made before the infection

Wrap Up

Malware protection is a layered approach: keep systems updated, use endpoint security, download only from trusted sources, and maintain offline backups. No single tool catches everything — defense in depth is the strategy.