By the end of this lesson you will be able to
- List the assets in a small setup and say why each matters.
- Describe likely threats to each asset and rate the risk in simple words.
- Choose mitigations that match the biggest risks.
- Explain defence in depth and secure defaults, and use them to harden a device.
- Write a one-page threat model for a home or small shop.
Security can feel like an endless list of warnings. Professionals handle it by asking three plain questions: what am I protecting, what could go wrong, and what will I do about it? Answering them in order is called threat modelling, and you can do it on one sheet of paper. It stops you from spending effort on unlikely dangers while the obvious ones stay open. This lesson teaches the method and then the practical habit of changing risky default settings.
Thinking like a defender
Cybersecurity is the work of protecting computers, accounts and data from harm. There is no such thing as perfect security. The aim is to make harm unlikely enough, and small enough, that you can live with what is left. A bank vault and a garden shed need different locks. The sensible question is never how do I make everything impossible to attack, but what matters here and how much protection does it deserve.
Earlier lessons named a Threat as something that could cause harm, a Vulnerability as a weakness it could use, and a Risk as the chance and size of the harm. Threat modelling puts those three words to work in a fixed order.
The four questions of a threat model
A Threat model is a short written answer to four questions. Write it for a small system you know well, such as your home laptop and phone, or Joseph's shop with its till laptop and Wi-Fi.
- Step 1: AssetsWhat are we protecting?
- Step 2: ThreatsWhat can go wrong?
- Step 3: MitigationsWhat will we do?
- Step 4: ReviewDid it work?
Read this figure as text
A flow of four questions: what are we protecting, what can go wrong, what will we do, did it work.
A flow of four steps. 1 What are we protecting? List the assets. 2 What can go wrong? List the threats and rank the risk. 3 What will we do about it? Choose mitigations. 4 Did it work? Check, test and review. After step 4 you return to step 1 when something changes, for example a new device.
Step 1: assets
An Asset is anything of value that you want to protect. It may be data (customer orders, family photos), an account (email, bank), a device (the till laptop) or a service (the shop's Wi-Fi). Also note the property that matters most: confidentiality (only the right people can see it), integrity (it has not been altered) or availability (it is there when you need it). Photos need availability and confidentiality. A price list needs integrity.
Step 2: threats and risk
For each asset, list what could harm it. Include non-criminal causes: a dropped laptop, a flat battery and a spilt drink are all more common than a hacker. Then give each threat a rough rating for how likely it is and how bad the harm would be: low, medium or high. Multiply them in your head. A likely threat with a bad outcome is a high risk and goes to the top of the list.
| Asset | Threat | Likelihood | Harm | Risk |
|---|---|---|---|---|
| Order spreadsheet | Laptop fails or is lost, with no backup | Medium | High | High |
| Shop email account | Phishing message steals the password | High | High | High |
| Shop Wi-Fi | Neighbour guesses the router's default password | Medium | Medium | Medium |
| Till laptop | Visitor plugs in an unknown USB drive | Low | High | Medium |
Step 3: mitigations
A mitigation is an action that lowers a risk. Start with the high risks. For the order spreadsheet the mitigation is a tested backup. For the email account it is a strong unique password in a Password manager plus Multifactor authentication (MFA). For Wi-Fi it is changing the router's default password. Choose cheap, boring fixes first. They remove most of the risk for very little effort.
- Phishing steals email password
- No backup of orders
Act now
- Default Wi-Fi password
- Unknown USB drive
Act this month
- Rare, small annoyance
Accept or review later
Read this figure as text
Three columns for high, medium and low risk, with an action for each.
Three columns ordered by priority. High risk: likely and harmful, for example a phishing email that steals the shop's email password; act now with multifactor authentication and training. Medium risk: either likely or harmful but not both, for example the default Wi-Fi password; act this month. Low risk: unlikely and mild; accept it or review later. The point is to spend effort in the order of risk, not in the order of fear.
Defence in depth: more than one lock
No single protection is perfect, so good security uses several, one behind another. This is Defence in depth. A house has a fence, a locked door and a safe. If a thief gets past the fence, the door is still there. For an email account the layers are a strong password, multifactor authentication, a phishing-aware owner, recovery codes kept safe and a way to notice strange activity. Each layer catches what the one before it missed.
Outside
Read this figure as text
A stack of five protective layers from the person down to the data, each backed up by the next.
A stack of layers from outside to inside. People: trained to spot scams. Accounts: strong unique passwords and multifactor authentication. Devices: updated, with a screen lock. Network: router with a changed password and a firewall on. Data: encrypted where possible and backed up. If one layer fails, the next still protects the data.
Secure configuration and default settings
Many break-ins need no clever trick, only a setting that was left as it came. A Secure default is a setting that is safe from the start. Devices do not always ship that way. Routers may use a well-known administrator password printed on the label, programs may start with sharing turned on, and old accounts may still exist. Changing risky settings to safe ones is called hardening, and it reduces the Attack surface: the number of places where something could go wrong. Fewer open doors means fewer doors to guard.
| Setting | Why | Where to find it |
|---|---|---|
| Change the router's administrator password and Wi-Fi password | Default passwords are widely known, and the label can be read by anyone who enters the room | The router's settings page, reached through the address in its manual |
| Turn on automatic updates | Known weaknesses are fixed quickly | Software Updater on Ubuntu; Windows Update on Windows |
| Turn on the firewall | It blocks unwanted incoming connections | Windows Security on Windows; on Ubuntu the firewall called ufw is installed but off by default |
| Set a screen lock with a short timeout | A walk-away laptop is an open door | Settings: Privacy and Security (Ubuntu: Screen Lock; Windows: Accounts, Sign-in options) |
| Remove software and accounts you no longer use | Unused things still need updates and can be attacked | App Center or Installed apps; the account audit from the last module |
| Turn off sharing you do not need | Shared folders and remote access widen the attack surface | Settings: Sharing (Ubuntu); Settings: Network and internet, Advanced sharing settings (Windows) |
Check a few secure settings on your computer
These steps only look. Change a setting only if you understand it.
In Ubuntu 24.04 open Settings, then Privacy and Security, then Screen Lock to set a lock delay. The command ss -tuln lists the network ports on which your computer is listening for incoming connections. Each listening port is part of the attack surface. A typical desktop has few.
ss -tulnNetid State Recv-Q Send-Q Local Address:Port Peer Address:Port
udp UNCONN 0 0 127.0.0.53%lo:53 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:*Addresses starting with 127. are the computer talking to itself, so they are not open to the network. An address of 0.0.0.0 or * means the port accepts connections from outside, which is worth understanding before you leave it open.
Open Windows Security from Start, then Firewall and network protection, and check that the firewall is on for each network type. Under Settings, Accounts, Sign-in options you can set when Windows asks you to sign in again. In PowerShell, the command below lists the ports your computer is listening on, which are part of the attack surface.
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort | Sort-Object LocalPortFirewall: on
Automatic updates: on
Screen lock after 5 minutes
- Marker 1: Blocks unwanted incoming connections
- Marker 2: Fixes known weaknesses
- Marker 3: Protects an unattended laptop
Read this figure as text
A simulated settings window with firewall, automatic updates and screen lock choices marked by numbers.
A simulated settings window titled Security checklist. The body lists three rows: Firewall is on, Automatic updates are on, Screen lock after 5 minutes. Marker 1 is on the firewall row: blocks unwanted incoming connections. Marker 2 is on the updates row: fixes known weaknesses. Marker 3 is on the screen lock row: protects a laptop left unattended. A button reads Review later. This is a generic mock-up, not a real screenshot.
Common mistakes
✖ Instead of: Trying to protect everything equally.
✔ Do this: List your assets, rank the risks and fix the high ones first. Effort spent on a low risk leaves a high risk open.
✖ Instead of: Only thinking about hackers.
✔ Do this: Include accidents, loss, theft and failure. They are more common and often cause worse harm than an attack.
✖ Instead of: Leaving default settings and passwords as they came.
✔ Do this: Check what the device ships with and change risky defaults, then write down what you changed.
✖ Instead of: Turning off the firewall or antivirus to make a program work.
✔ Do this: Find out why it is blocked and allow only what you trust. Switching protection off removes a whole layer.
If something goes wrong
- I cannot think of any threats.
- Ask what happens if the device is lost, broken, stolen, or if someone gets the password. Then ask what happens if the account is locked, the internet is down or the file is changed by mistake.
ss -tulnshows many lines and I do not know what they mean.- Focus on the Local Address column. Addresses beginning with 127 are internal only. Search for the port number together with the word port before you worry or change anything.
Get-NetTCPConnectionis not recognised.- Use Windows PowerShell or PowerShell on Windows 11, not Command Prompt. In Command Prompt,
netstat -anshows a similar list. - A setting I changed stopped something working.
- Return the setting to the value you wrote down, restart, and then look up the setting before trying again.
Key terms
- Threat model
- A short written analysis of what you protect, what could go wrong and what you will do about it.
- Asset
- Anything you want to protect because it has value, such as data, a device or an account.
- Attack surface
- All the places where someone could try to get into a system, such as open services, accounts and ports.
- Secure default
- A setting that starts in the safe position, so no one has to remember to make it safe.
- Defence in depth
- Using several layers of protection so that if one fails, the others still help.
- Threat
- Something or someone that could cause harm to you or your data.
Practise it for real
Reading is not the same as being able to do it. Complete these on your own computer, then tick only what you have actually done. These ticks are your own honest record: nothing checks them for you.
Write a threat model for your own setup
On paper or in a document, make a table with columns Asset, Threat, Likelihood, Harm and Risk. List at least four assets that you really have, such as your email account, your photos, your laptop and your Wi-Fi. For each, write one threat, rate likelihood and harm as low, medium or high, and give the risk. Then choose one mitigation for each of the two highest risks and put a date next to each to do it.
Check three secure settings
On your real computer, check three settings from the hardening table: that updates are automatic, that the firewall is on (Windows Security on Windows, or note that ufw is off by default on Ubuntu) and that your screen locks after a short idle time. Run the listening-ports command and note how many ports are listening and which are open to the network. Record the result of each check as yes or no. Change only a setting that you understand.
Challenge: model a new situation
Wanjiru is setting up a small tutoring business from her bedroom. She has a laptop, a phone, a shared email address, a router from her internet provider and a folder of pupils' contact details. Without looking at the lesson, answer the four questions for her: list the assets and the property that matters most for each, three threats with a risk rating, a mitigation for each high risk and how and when she will review the plan.
Knowledge check
6 questions. You need 80% to pass. Mistakes here are part of learning, and you can retry as often as you like.
Summary
- A threat model asks four questions: what am I protecting, what can go wrong, what will I do and did it work.
- Risk is likelihood together with harm. Fix the highest risks first.
- Defence in depth uses several layers so one failure does not expose everything.
- Secure defaults and hardening reduce the attack surface.
- Write down every change so that it can be reviewed and undone.
Checklist: can you do these?
Marking a lesson as read does not prove you can do it. Skills count as demonstrated when you pass the quiz (not yet) and complete the practical tasks (not yet).
Related lessons
References and further reading
Official sources for details that can change between versions.
- Cyber security guidance for individuals and families (National Cyber Security Centre (UK))
- OWASP Threat Modeling Cheat Sheet (OWASP Foundation)
- Windows security documentation (Microsoft)