Beginner-Friendly Topic
Take your time - it's perfectly normal to re-read this topic 2-3 times. Try the interactive code editor below to run code yourself. Use the Q&A section to check your understanding before moving on.You've got this!
Lesson 4 of 11
Types of Cyber Threats
Understanding the taxonomy of cyber threats is essential for building effective defenses. Each threat category has distinct characteristics, attack vectors, indicators of compromise, and appropriate mitigations.
Malware Categories
- Virus: Attaches to legitimate files, executes when the host file runs, spreads through file sharing. Example: ILOVEYOU worm (2000) infected 50M machines via email attachments
- Ransomware: Encrypts victim files, demands cryptocurrency payment. WannaCry (2017) exploited EternalBlue (NSA exploit) to encrypt 230,000 systems in 150 countries in 24 hours
- Trojan: Malicious software disguised as legitimate software - named after the Trojan Horse. Example: banking trojans that inject malicious code into browser sessions to steal credentials
- Spyware/Keylogger: Silently records keystrokes, screenshots, clipboard content. Often used in targeted attacks against executives or high-value targets
- Rootkit: Hides its presence deep in the OS (kernel-level). Extremely hard to detect; often requires re-imaging the system to remove
- Botnet: Network of compromised machines (bots) controlled by a command-and-control (C2) server. Used for DDoS, spam, cryptomining, and credential stuffing
Social Engineering Attacks
- Phishing: Mass email campaigns impersonating trusted brands to steal credentials. 91% of data breaches start with a phishing email
- Spear Phishing: Highly targeted phishing using personal information about the victim - researched via LinkedIn, social media, company websites
- Vishing: Voice phishing - attackers call victims pretending to be IT support, banks, or government agencies
- Smishing: SMS phishing - fraudulent text messages with malicious links or urgent calls to action
- Business Email Compromise (BEC): Attacker impersonates a CEO or finance director to authorize fraudulent wire transfers. BEC caused $2.9 billion in losses in 2023 (FBI IC3 Report)
- Pretexting: Creating a fabricated scenario (pretext) to manipulate someone into sharing information or taking an action
Network-Based Attacks
- DDoS (Distributed Denial of Service): Overwhelming a target with traffic from thousands of compromised machines. GitHub 2018: 1.35 Tbps attack via memcached amplification
- Man-in-the-Middle (MitM): Intercepting communication between two parties - possible on unencrypted networks or via ARP spoofing on LANs
- SQL Injection: Injecting malicious SQL into input fields to manipulate database queries - responsible for breaches of Yahoo (500M accounts), LinkedIn, Adobe
- DNS Poisoning: Corrupting DNS cache to redirect users from legitimate sites to attacker-controlled servers
- Pass-the-Hash: Stealing hashed credentials and reusing them for authentication without cracking the plaintext password
Advanced Persistent Threats (APTs)
APTs are sophisticated, long-term attacks typically conducted by nation-states or well-funded criminal groups. Unlike quick smash-and-grab attacks, APT actors spend months inside a network - silently exfiltrating data, mapping infrastructure, and establishing persistence.
The foundational security model: Confidentiality (privacy), Integrity (trust), and Availability (uptime).
APT Characteristics
- Patience: Attackers may wait months before acting, studying the target environment
- Stealth: Use living-off-the-land techniques (built-in OS tools) to avoid detection by security tools
- Multiple entry points: Spear phishing, supply chain compromise, zero-day exploits, insider threats
- Persistence: Establish multiple backdoors in case one is discovered and removed
- Real examples: SolarWinds (Russia/APT29 - 18,000 organizations compromised via software supply chain), Operation Aurora (China - targeted Google, Adobe, 34 companies)
Common Mistakes
- Assuming threats only come from outside - insider threats (malicious or negligent employees) cause ~20% of breaches
- Treating all phishing as identical - spear phishing requires different training and defenses than generic phishing
- Only focusing on technical threats while underestimating social engineering, which bypasses all technical controls
Tip
Tip
Practice Types of Cyber Threats in small, isolated examples before integrating into larger projects. Breaking concepts into small experiments builds genuine understanding faster than reading alone.
Practice Task
Note
Practice Task - (1) Write a working example of Types of Cyber Threats from scratch without looking at notes. (2) Modify it to handle an edge case (empty input, null value, or error state). (3) Share your solution in the Priygop community for feedback.
Quick Quiz
Common Mistake
Warning
A common mistake with Types of Cyber Threats is skipping edge case testing - empty inputs, null values, and unexpected data types. Always validate boundary conditions to write robust, production-ready cybersecurity code.
Key Takeaways
- Understanding the taxonomy of cyber threats is essential for building effective defenses.
- Virus: Attaches to legitimate files, executes when the host file runs, spreads through file sharing. Example: ILOVEYOU worm (2000) infected 50M machines via email attachments
- Ransomware: Encrypts victim files, demands cryptocurrency payment. WannaCry (2017) exploited EternalBlue (NSA exploit) to encrypt 230,000 systems in 150 countries in 24 hours
- Trojan: Malicious software disguised as legitimate software - named after the Trojan Horse. Example: banking trojans that inject malicious code into browser sessions to steal credentials
Finished this lesson?