Defense in Depth
why security never relies on just one wall
Defense in depth means protecting something with several independent layers, so that when one fails, another still stands in the way.[1] No control is perfect: passwords get phished, firewalls get misconfigured, patches arrive late. Layering turns "one mistake equals a breach" into "an attacker has to get past many things".
The castle idea
A castle did not rely on one wall. It had a moat, a wall, a gatehouse, inner doors and guards. Each slows the attacker, gives defenders time to notice, and limits how far they get.
Typical layers
- Policies, training and people: rules, awareness and a culture where reporting is easy.
- Physical: locks, badges, cameras.
- Identity and access: strong authentication, MFA and least privilege.
- Network: firewalls, segmentation, intrusion detection and prevention.
- Host / endpoint: patching, hardening, endpoint protection (EDR).
- Application: secure coding, input validation, web application firewalls.
- Data: encryption, classification, backups, data loss prevention.
- Monitoring and response: logging, a SIEM, an incident response plan.
Three kinds of control, working together
- Preventive controls try to stop an attack (MFA, patching).
- Detective controls notice one in progress (logs, alerts).
- Corrective controls limit damage and recover (backups, isolation, restore).
A strong design has all three. Prevention fails sometimes, so detection and recovery matter just as much.
Make the layers genuinely different
Two layers that fail for the same reason are really one layer. If both your firewall and your intrusion prevention rely on the same signature feed, a gap in that feed is a gap in both. Diversity of approach, vendor and failure mode is what gives depth real value.
Things to watch
- Complexity: every extra layer needs configuring and monitoring. Badly managed layers create gaps and noise.
- False confidence: "we have a firewall" is not a strategy.
- Cost: put the most layers around the most valuable assets.
A quick example
An attacker sends a phishing email. The email filter might catch it (layer 1). If not, MFA limits stolen passwords (layer 2). If an account is taken over, least privilege limits what it can reach (layer 3). Unusual behavior triggers an alert (layer 4), and backups allow recovery (layer 5). No single layer had to be perfect.
Sources
Test yourself
My notes
Private — saved only on this device, never sent anywhere.