Securing Devices ยท 4.1

๐Ÿฆ  Malware: Types & Detection

Seven types of malicious software and how to detect eachโฑ ~2 min

๐ŸŽญMalware is the umbrella term โ€” the attacker picks the right tool for the job

A carpenter doesn't use the same tool for every task. An attacker wanting to steal passwords uses different malware than one wanting to extort money. Understanding malware types means understanding attacker goals โ€” which tells you what defenses matter. 'Malware' just means 'malicious software.' The type tells you everything else.

Seven Malware Types โ€” Know Each One

TypeSpreads HowWhat It DoesGoalDefense
VirusHides in legitimate files; spreads when you open/execute the infected fileDamages files, steals data, delivers payloads when triggeredDamage, theft, persistenceDon't open unknown attachments; antivirus; keep OS updated
WormSelf-spreads across networks automatically โ€” no user action neededConsumes bandwidth/CPU; drops additional malware; recruits into botnetsSpread, DDoS platformPatch systems; firewalls; network segmentation
TrojanDisguised as legitimate software (game mod, free app, fake update)Once installed: steals passwords, installs ransomware, creates backdoorAccess, theft, controlOnly download from official sources; verify checksums; antivirus
RansomwarePhishing, trojan, unpatched vulnerabilities, RDP brute forceEncrypts files; displays ransom note demanding crypto paymentFinancial extortionOffline backups; MFA; patch management; email filtering
Spyware/KeyloggerBundled with free apps, malicious browser extensions, trojansRecords keystrokes, screenshots, clipboard; monitors browsingCredential theft, surveillanceDownload only from official stores; review extensions; antivirus
AdwareFree software bundles, fake plugin updates, shady websitesDisplays unwanted ads, redirects searches, tracks browsingAd revenue, tracking, doorway to worse malwareTrusted sources only; ad blockers; custom installs
Bot / BotnetPhishing, worms, weak passwords on IoT/routersAttacker remotely controls your device for DDoS, spam, cryptominingPlatform for attacksChange default passwords; update all devices including IoT; MFA

Malware Detection Methods

  • โ€ขSignature-based detection โ€” matches malware code against a database of known patterns. Fast and precise, but misses brand-new malware ('zero-day')
  • โ€ขBehavioral detection โ€” monitors what programs do, not what they look like. If a process suddenly encrypts thousands of files, flag it regardless of signature
  • โ€ขHeuristic analysis โ€” examines code structure for suspicious patterns even without a signature match
  • โ€ขSandboxing โ€” runs suspicious files in an isolated virtual environment, observing behavior without risking real systems
  • โ€ขSIEM correlation โ€” connects anomalies across multiple systems; C2 traffic + privilege escalation + file encryption = active ransomware

Why Updates Are Your Best Defense

Most malware doesn't exploit unknown vulnerabilities โ€” it exploits known ones that already have patches available. WannaCry ransomware (2017) exploited EternalBlue, a Windows vulnerability Microsoft patched 2 months earlier. Organizations that hadn't applied the patch were wiped out. The NHS, FedEx, and over 200,000 other organizations had the patch available and didn't install it.

โ˜… FactIn 2024, ransomware hit record levels: 5,414 publicly known ransomware attacks (Corvus Insurance report), up 68% from 2023. Healthcare and education were the most targeted sectors. The average ransom payment reached $2.73 million. 70% of ransomware victims paid the ransom โ€” and 46% of those who paid still didn't fully recover their data. Offline backups (3-2-1 rule: 3 copies, 2 media types, 1 offsite) are the only reliable defense.
๐Ÿ”’ SecurityThe 5-Tuple for network forensics โ€” a key skill for identifying compromised hosts: Source IP, Destination IP, Source Port, Destination Port, Protocol. By analyzing NetFlow/packet captures filtered on the 5-tuple, analysts isolate suspicious connections (e.g., workstation making thousands of connections to external IP on port 443 at 3 AM) that indicate malware C2 communication.
๐Ÿง Quick Checkfirst try = +5 XP

A hospital's IT team notices that one workstation is generating unusually high network traffic at 3 AM, connecting to an IP address in Eastern Europe on port 443. The workstation's antivirus shows no alerts. The user reports that files on their shared drive are 'corrupted' and no longer openable. Their desktop shows a message: 'Your files are encrypted. Pay 5 BTC to recover them.' What type of malware is this, and why didn't antivirus catch it?

โญ 0 XP๐Ÿ”ฅ 0 days