What is defence in depth?
Defence in depth means protecting an asset with several layers of controls, so that one failure is not fatal. No single control is perfect, so a safe system never depends on only one.
A castle had a moat, a wall, a gate and guards. A shop's data needs the same idea.
By the end of this lesson
Note
I can layer controls so that one failure is not fatal.
Key words
| Word | What it means |
|---|---|
| Defence in depth | several layers of controls around one asset |
| Prevent | a control that stops harm from happening |
| Detect | a control that notices harm or an attempt |
| Respond | a control that limits harm once it is noticed |
| Recover | a control that restores things afterwards |
| Single point of failure | one part whose failure ruins the whole defence |
The cells students fill in are left blank in this preview.
Each layer catches what the last one missed
Imagine an attacker who wants a shop's customer list. They must pass a firewall, then a login, then the rights of the account, and the list may also be encrypted.
Each layer is a control that can fail. The layers are meant to fail in different ways. What gets past one is stopped by the next.
Controls prevent, detect, respond and recover
Controls do four different jobs.
To prevent is to stop the harm, like a lock. To detect is to notice it, like a log or an alarm. To respond is to limit it once noticed, like switching an account off. To recover is to restore, like a backup.
A defence with only prevention has no plan for the day it fails.
Worked example: four jobs for one asset
| Job | Control for the customer list | What it does |
|---|---|---|
| Prevent | Login with a code | Keeps strangers out |
| Detect | A log of every login | Shows who tried and when |
| Respond | A rule to lock an account after odd use | Stops further harm |
| Recover | A nightly backup | Brings the data back |
The cells students fill in are left blank in this preview.
Is the lab's backup script there and runnable?
test -x /usr/local/bin/backup.sh && echo "the backup script is there"Shown here, not run. Create a free account to press Run and type it into your own lab’s terminal.
Which backup line does the copying?
grep "^cp" /usr/local/bin/backup.shShown here, not run. Create a free account to press Run and type it into your own lab’s terminal.
A backup is a recover control
The first Run prints the backup script is there. The second prints one line, cp -a /srv/projects/. /var/backups/projects/.
That line copies the team's folder to a second place. It does not stop an attack. It means a deleted or damaged folder can be put back, which is recovery.
A common mistake
Warning
Many people think one strong control is enough, such as a very good password. A control can fail, be bypassed, or be switched off by mistake. If it is the only one, nothing else stands in the way. Check that each important asset has more than one kind of control.
Look for gaps and single points of failure
To review a defence, list the controls for one asset. Sort them into the four jobs. Any job with no control is a gap.
Then look at assets with only one kind of control. If that one control fails, nothing is left. That is a single point of failure.
Going further
Pick an asset you own, such as your photos. List every control that protects it and sort each one into prevent, detect, respond or recover.
Which job has nothing? Write one control that would fill the gap, and say what it would cost.