You now understand the threat landscape, core security principles, and network fundamentals. It's time to get into the specifics of how attacks actually work. This lesson covers the most common attack vectors and techniques used by real-world adversaries. Understanding these methods is not about becoming an attacker — it's about understanding what you're defending against so you can build better protections. All techniques discussed here should only be practiced in authorized lab environments, CTF competitions, or with explicit written permission.
Social engineering exploits human psychology rather than technical vulnerabilities. It remains the most effective attack vector because humans are often the weakest link in any security system. Phishing — sending fraudulent communications that appear to come from trusted sources — accounts for over 90% of successful cyberattacks.
The 2020 Twitter breach began with a simple phone call. Attackers called Twitter employees, posed as IT support, and convinced them to enter their credentials on a fake internal portal. This gave the attackers access to internal tools, which they used to hijack the accounts of Barack Obama, Elon Musk, and Bill Gates. No sophisticated exploit was needed — just social engineering.
Passwords remain the most common form of authentication, and attackers have developed numerous techniques to compromise them. Understanding these methods helps you implement stronger authentication controls.
| Attack Type | How It Works | Defense |
|---|---|---|
| Brute Force | Systematically trying every possible character combination | Account lockout, rate limiting, CAPTCHA |
| Dictionary Attack | Using a list of common words and passwords | Password complexity requirements, blocklists |
| Credential Stuffing | Using leaked username/password pairs from other breaches | MFA, monitoring for breached credentials |
| Password Spraying | Trying one common password against many accounts | Account lockout policies, anomaly detection |
| Rainbow Table Attack | Using precomputed hash tables to reverse password hashes | Salting passwords, using slow hash functions (bcrypt) |
| Keylogger | Malware that records keystrokes to capture passwords | Endpoint protection, MFA, on-screen keyboards |
Malware (malicious software) is any program designed to cause harm, gain unauthorized access, or perform other malicious actions. Here are the major categories you need to recognize.
Web applications are among the most targeted attack surfaces. The OWASP Top 10 is the standard awareness document for web application security and represents the most critical security risks.
# Example: SQL Injection vulnerability (DO NOT use in production)
# This shows WHY input validation is critical
# VULNERABLE CODE - Never do this:
def get_user_unsafe(username, password):
query = f"SELECT * FROM users WHERE username='{username}' AND password='{password}'"
# If attacker inputs: username = "admin' --"
# The query becomes:
# SELECT * FROM users WHERE username='admin' --' AND password=''
# The -- comments out the password check, bypassing authentication!
return database.execute(query)
# SECURE CODE - Use parameterized queries:
def get_user_safe(username, password):
query = "SELECT * FROM users WHERE username=%s AND password=%s"
# The database treats inputs as data, never as SQL code
return database.execute(query, (username, password))💡 The OWASP Top 10 (2021) includes: Broken Access Control, Cryptographic Failures, Injection, Insecure Design, Security Misconfiguration, Vulnerable Components, Authentication Failures, Software Integrity Failures, Logging Failures, and Server-Side Request Familiarity. Study this list thoroughly — it's referenced in virtually every security job interview.
In a MitM attack, the attacker secretly intercepts and potentially alters communications between two parties who believe they are communicating directly with each other. Common techniques include ARP spoofing (on local networks), DNS spoofing (redirecting domain lookups), and SSL stripping (downgrading HTTPS to HTTP).
⚠️ Public Wi-Fi networks are prime hunting grounds for MitM attacks. Always use a VPN when connecting to public Wi-Fi, verify that websites use HTTPS (look for the padlock icon), and never access sensitive accounts on untrusted networks without encryption.
Verify exercises to earn ★ 170 XP and unlock next lab level.