Security controls & defence in depth
Layer preventive, detective and corrective controls so one failure does not mean a breach.
By Invicly Tech, , in Cyber Security Fundamentals. About 8 minutes to read.
In short
Defence in depth layers independent controls so that one failure does not become a breach. Controls are grouped by type (technical, administrative, physical) and by function (preventive, detective, corrective). Least privilege and zero trust push this idea further.
Explained simply
Defence in depth means never relying on a single protection. You stack several, so if one fails, another still stands. Attackers then have to beat many different things, and defenders get more chances to notice them.
A medieval castle is the classic picture: a moat, high walls, a gate, guards, and a locked treasure room. Crossing the moat does not get you the gold. In computers, the layers might be a firewall, updated software, antivirus, strong logins, encrypted data and someone watching the logs.
Controls can be grouped in two ways. By type: technical (software and hardware), administrative (policies and training) and physical (locks and badges). By function: preventive controls stop bad things, detective controls notice them, and corrective controls clean up and restore.
Two ideas push this further. Least privilege gives every person and program only the access it truly needs. Zero trust means no request is trusted just because it comes from inside the office network. Each request must prove who it is and that it is allowed.
Press Play on a diagram to walk through it one step at a time.
- 1Policy & training
Administrative controls and awareness.
- 2Perimeter
Firewalls and network segmentation.
- 3Endpoint
Hardening, patching and EDR.
- 4Application
Secure code and input validation.
- 5Data
Encryption and access control.
- 1Email filter
Blocks most bad mail (preventive).
- 2Trained user
Spots and reports it (administrative).
- 3EDR on laptop
Blocks or flags the payload (preventive and detective).
- 4Least privilege
Stolen account can reach little.
- 5SIEM alert
Analyst sees odd login (detective).
- 6Restore and reset
Backups and password reset (corrective).
In depth
Layers must be independent
Stacking layers only helps if they fail for different reasons. Two firewalls from the same vendor with the same rule set are really one layer, because one mistake or one bug affects both.
Good layering mixes kinds of controls. A phishing email might pass the email filter (technical), but the user has had training and reports it (administrative). If they click anyway, the endpoint protection blocks the download (technical, different system). If that fails, the account has least privilege so the damage is limited, and the SIEM raises an alert (detective). Each layer catches different mistakes.
- Mix technical, administrative and physical controls
- Avoid layers that share the same weakness
- Always include at least one detective layer
More control functions than three
Beyond preventive, detective and corrective, many frameworks add three more. Deterrent controls discourage attempts, like warning banners or visible cameras. Compensating controls stand in when the ideal control is not possible, for example extra monitoring on an old machine that cannot be patched. Directive controls tell people what to do, like an acceptable use policy.
A single tool can serve several functions. EDR software prevents some malware from running, detects suspicious behaviour, and can isolate a host to correct the situation.
- Preventive
- Stops it happening
- Detective
- Spots it happening
- Corrective
- Fixes the damage
- Deterrent
- Warning banners
- Visible cameras
- Compensating
- Extra monitoring on an unpatchable host
- Directive
- Acceptable use policy
Least privilege in practice
Least privilege applies to people, services and machines. A help desk worker can reset passwords but cannot change firewall rules. A web app's database account can read and write its own tables but cannot drop them or read other databases. A backup server can read files but cannot log in interactively.
It limits the blast radius, which is how much damage one compromised account can do. Most serious breaches involve an attacker gaining an account with too many rights, then using those rights to spread.
Zero trust without the buzzwords
Old networks worked like a hard shell with a soft centre: once inside, you could reach almost anything. Zero trust removes the soft centre. Every request is checked using who the user is, the health of their device, and what they want to reach.
Practical first steps are MFA everywhere, a single sign-on system that checks device status, segmenting the network so laptops cannot talk directly to servers they do not need, and logging every access decision. Zero trust is a direction you move towards, not a product you buy.
- Inside the network means trusted
- Laptops can reach most servers
- Login checked once at the edge
- Few access decisions logged
- Every request is checked
- Identity + device health + target
- Segments block unneeded paths
- Every access decision logged
Learn it in 4 short steps
About 40m each. Track them with a timer in your plan.
- 1Classify controls by type and function~40m
- 2Explain defence in depth layers~40m
- 3Apply least privilege and zero trust ideas~40m
- 4Map controls to a sample network~40m
Key points
- No single control is trusted to never fail.
- Controls are preventive, detective or corrective.
- Least privilege gives each account only what it needs.
- Zero trust verifies every request instead of trusting the network.
Key terms
Tap a card to flip it. 0/4 known
Examples
Layering controls around a customer database
Step 1 Network: the database sits in its own segment and accepts connections only from the app servers. Step 2 Host: the server is patched monthly and has only needed services running. Step 3 Identity: admins use separate admin accounts with MFA; the app uses a limited account. Step 4 Data: disks and backups are encrypted, and card numbers are tokenised. Step 5 Detection: database logins and unusual large queries are sent to the SIEM. Step 6 Recovery: daily backups, with a restore test each quarter. If any one layer fails, the others still protect or reveal the problem.
Classifying controls in a small office
Take a list of controls and sort each by type and function. This habit shows gaps quickly. In this office, most controls are preventive. There is little detection, so an attack that slips through might go unnoticed for weeks. The fix is to add log monitoring and alerts.
Control | Type | Function
Firewall default deny | Technical | Preventive
Security awareness course | Administrative | Preventive
Badge door to server room | Physical | Preventive
CCTV in reception | Physical | Deterrent, detective
Antivirus on laptops | Technical | Preventive, detective
Nightly backups | Technical | Corrective
Gap: no log review | - | Detective missingQuick reference
- Layers only help if they fail for different reasons
- Types: technical, administrative, physical
- Functions: preventive, detective, corrective, plus deterrent, compensating, directive
- Least privilege shrinks the blast radius of a stolen account
- Zero trust: verify user, device and request every time; location alone proves nothing
- If every control you list is preventive, you have a detection gap
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
List the security controls on your own laptop or phone and label each as preventive, detective or corrective.
- Exercise 2medium
A small company has a firewall, antivirus and a password policy. Propose four more controls so that every function (preventive, detective, corrective) and every type (technical, administrative, physical) is covered.
- Exercise 3hard
Design least-privilege access for a web shop with three staff roles (support, warehouse, developer) and one app service account. Say what each can and cannot do, and how admin access is handled.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- Is antivirus still worth having if I have a firewall?
- Yes. They protect against different things. A firewall controls network connections, while antivirus or EDR checks what runs on the device, which matters when malware arrives by email or USB.
- Is zero trust a product I can buy?
- No. Vendors sell parts of it, but zero trust is a design approach: verify identity and device for every request and limit access. You reach it step by step.
- How many layers are enough?
- There is no magic number. A useful test is to imagine each control failing in turn and ask whether something else would still stop or detect the attack.