Common Attacks at a Glance
Knowing the main families of attack helps you recognise what a defence is for.
| Attack | What it does | Main defence |
|---|---|---|
| Phishing | Fake messages trick people into giving up passwords or clicking | Training, email filtering, multi-factor sign-in |
| Malware / ransomware | Harmful software that steals, spies or locks files | Updates, antivirus, offline backups |
| Brute force / credential stuffing | Guessing passwords or reusing leaked ones | Strong unique passwords, lockouts, multi-factor |
| Injection (such as SQL injection) | Untrusted input is run as commands | Validate input, use parameterised queries |
| Cross-site scripting (XSS) | Attacker's script runs in another user's browser | Escape output |
| Denial of service | Overwhelm a service so real users cannot reach it | Rate limiting, capacity, traffic filtering |
| Man in the middle | Secretly reading or changing traffic | Encryption (HTTPS) |
| Social engineering | Manipulating people rather than machines | Verification habits |
Notice that many attacks target people and mistakes, not clever code. Most of this course builds the matching defences in small, runnable Python.
Examplepython
Quick check
Which defence best stops SQL injection?
Your turn: write the code
Use the dictionary to print the defence for 'ransomware'.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.