Defense in depth

Why one wall is never enough

Layered protection drawn as rings: what each layer stops, how layers fail together, and how to check that your layers are real.

beginner level, 15 minutes, 16 slides.

Open the interactive deck

Defense in depth

Welcome. Layered protection drawn as rings: what each layer stops, how layers fail together, and how to check that your layers are real. This talk runs about 15 minutes.

The idea in one picture

Assume any single protection will eventually fail. Stack several, so an attacker who beats one still meets the next.

Think of a castle. There is a moat, a wall, a gate, guards and a locked room inside. Nobody believes the moat alone is enough, because someone will eventually find a way across. Read the sentence on the screen. Assume any single protection will eventually fail. Stack several, so an attacker who beats one still meets the next. Security engineering works the same way. Notice the word assume. We are not saying our tools are bad. We are saying every tool can fail on a bad day, and we plan for that. This idea is called defense in depth, and the rest of the deck unpacks it.

What the official definition says

NIST SP 800-53 Rev. 5: An information security strategy that integrates people, technology, and operations capabilities to establish variable barriers across multiple layers and missions of the organization.

  • People: training, roles, habits
  • Technology: firewalls, encryption, patching
  • Operations: monitoring, response, backups

Here is the official wording from NIST. Read it slowly, because it is dense. It talks about an information security strategy that brings together people, technology and operations. Then it talks about barriers across multiple layers. Look at the three bullets under it. People means training, roles and habits. Technology means firewalls, encryption and patching. Operations means monitoring, response and backups. Notice the three ingredients. It is not only tools. People and daily operations count as layers too. Think of a house. Locks are technology, but remembering to lock them is people, and checking the cameras is operations.

Another definition, same spirit

A second NIST source, citing ISA/IEC 62443, says the method layers different security technologies across common attack paths, so attacks missed by one technology are caught by another.

Key word: different: Five layers that all fail the same way are really one layer.

This is a second definition, with the same spirit. It says the method layers different security technologies across common attack paths, so that an attack missed by one technology is caught by another. Now look at the highlighted box. The key word is different. Imagine five locks on a door that all use the same key. Anyone who steals that one key opens all five. That is really one lock. Layers should fail for different reasons. If a single stolen password defeats all five, you do not have five layers. You have one. Keep that picture in mind, because we return to it soon.

Draw it as layers

Outermost first. The thing you protect is at the center.

  • People and policy: training, least privilege
  • Network edge: firewall, DNS filtering
  • Segmentation: zones, VLANs
  • Host: patching, hardening, EDR
  • Application: input checks, auth
  • Data: encryption, backups

Now the picture. Read from outside to inside, like peeling an onion. The outer ring is people and policy. Next is the network edge, then segmentation, then the host, then the application. In the center is the data. Each ring has its own job, and the small note under each label gives examples. Notice that data sits in the center. Everything else exists to protect it. And your last line of defence is a backup you can actually restore. If every outer ring failed, a good backup is how you recover. So when you look at the diagram, ask what each ring is protecting.

Each layer, one job

LayerStopsFails when
Edge firewallUnwanted inbound trafficRule is too open
SegmentationFree roaming insideEverything shares one zone
Host hardeningEasy local abusePatches fall behind
App authenticationAnonymous accessWeak or reused passwords
EncryptionReading stolen dataKeys sit next to data
BackupsPermanent lossNobody tested a restore

This table lists each layer, what it stops, and when it fails. Read it across, one row at a time. The edge firewall stops unwanted inbound traffic, and fails when a rule is too open. Segmentation stops free roaming inside, and fails when everything shares one zone. Host hardening stops easy local abuse, and fails when patches fall behind. Look at the last row. Backups stop permanent loss, and fail when nobody tested a restore. Every layer has a typical way of failing, and that is where the next layer earns its keep. Think of a spare tire. It only helps if you checked it before the trip.

A realistic attack path

An attacker needs every step to work. A defender needs one to hold.

  • Phishing email: layer: people
  • Stolen login: layer: MFA
  • Reaches server: layer: segmentation
  • Runs a tool: layer: host controls
  • Copies data: layer: encryption, alerts

Here is the same idea as a story. Follow the arrows from left to right. A phishing email arrives. The attacker gets a stolen login. They reach a server. They run a tool. They copy data. Under each step, the small note names the layer that could stop it. The caption says an attacker needs every step to work, and a defender needs only one to hold. Notice that we did not need a perfect defence anywhere. We needed one stage to stop them, and another to tell us. Think of a relay race where any dropped baton ends the run. The attacker has to carry it all the way.

Prevent, detect, respond

Preventive layers

  • Firewalls and ACLs
  • Least privilege
  • Patching
  • Multi-factor login

Detective and recovery layers

  • Logs and alerts
  • File integrity checks
  • Backups
  • Incident runbooks

A layer that only blocks, with no alert, hides the attack from you.

This slide compares two kinds of layers. On the left are preventive layers, the ones that try to block. Firewalls, least privilege, patching and multi-factor login. On the right are detective and recovery layers. Logs and alerts, file integrity checks, backups and incident runbooks. A runbook is just a step by step guide for what to do in an incident. Now read the callout. A layer that only blocks, with no alert, hides the attack from you. Good depth mixes both kinds. If every layer is preventive and quiet, you may be breached for months and never know. Think of a burglar alarm versus only a lock.

Layers need independent failure

    On the left, one stolen password opens every layer. On the right, each layer needs its own key.

    This is the trap, and it ties back to the same key on five locks. Look at the left side. It shows three layers, a firewall, a server and a backup, all using the same admin password. They look like three layers, but a shared password makes them one layer. Now look at the right side. Each layer has separate credentials, so one stolen password opens only one door. Read the sentence under the diagram. On the left, one stolen password opens every layer. On the right, each layer needs its own key. Separate keys keep the layers truly independent.

    Common mistakes

    • Buying a tool and calling it a layer
    • All trust placed in the network edge
    • No monitoring between layers
    • Backups on the same network, same login
    • Never testing that a layer works

    Here are five common mistakes. Read them down the list, and ask which ones you have seen. Buying a tool and calling it a layer. A tool that nobody configures is just a purchase. Placing all trust in the network edge. No monitoring between layers. Backups on the same network with the same login, so whoever reaches the data can also reach the backups. And never testing that a layer works. Most breaches in the news are not clever. They are one missing layer, or a layer that looked present and was not working. Be honest when you review your own setup, and check each one.

    Map layers to a control catalog

    LayerCIS Control
    Host hardening4 Secure Configuration of Enterprise Assets and Software
    Access6 Access Control Management
    Network12 Network Infrastructure Management
    Monitoring13 Network Monitoring and Defense
    Recovery11 Data Recovery

    You do not have to invent your layers from scratch. The CIS Controls already name them. Read the table across. Each row pairs a layer with a numbered control. Host hardening matches control four. Access matches control six. Network matches twelve. Monitoring matches thirteen. Recovery matches control eleven. Use this list as a checklist to find the gaps in your own setup. Think of it like the safety checklist a pilot reads before takeoff. You are not guessing what might be missing. You are walking through a list that other people have already put together for you.

    Test the layers, one at a time

    1. Pick a layer. Say, the host firewall.
    2. Turn it off in a test. On a lab machine you own.
    3. Ask. Did another layer stop or report the problem?
    4. Fix the gap. Add the missing detection or block.

    See what your host firewall actually allows (nftables)

    sudo nft list ruleset

    Here is how to check that your layers are real. Read the four steps down the screen. Pick a layer, say the host firewall. Turn it off in a test, on a lab machine you own. Ask whether another layer stopped or reported the problem. Then fix the gap by adding the missing detection or block. This is called removing a layer on purpose. You learn what the other layers really do, not what the diagram says. The command at the bottom lists what your host firewall actually allows. Only do this on machines you own and are allowed to change.

    Check yourself

    Check yourself: Five layers all depend on one shared admin password. How many real layers is that?

    Answer: Roughly one. One stolen password defeats all five at once, so they fail together. Layers must fail for different reasons.

    Check yourself: Which is a detective layer rather than a preventive one?

    Answer: Alerting on unusual logins. Alerts tell you something happened. Blocks stop it. You want both.

    Check yourself time. There are two questions. Read the first one carefully. Five layers all depend on one shared admin password. How many real layers is that? Think about the five locks with one key. Then the second question. Which is a detective layer rather than a preventive one? Remember that detective layers tell you something happened, and preventive layers try to stop it. Tap an answer to see the reason. If the first question surprised you, look back at the independent failure slide, the one with the red and green sides. It is worth a second look.

    Take-aways

    • Assume each layer will fail someday
    • Use different kinds of layers
    • Mix prevent, detect and recover
    • Keep credentials separate per layer
    • Test layers on purpose

    Let us finish with the take-aways. Read the five bullets. Assume each layer will fail someday. Use different kinds of layers. Mix prevent, detect and recover. Keep credentials separate per layer. And test layers on purpose. If you can say those five lines in your own words, you have understood the whole idea. Think of the castle again. Moat, wall, gate, guards and a locked room, each different, each watched, and each tested. That is the whole idea. Next in the series, we take one layer, the network, and split it into zones. See you in the next deck.

    Practise this

    Slides only get you so far. Pick one of these hands-on labs and do it today while it is fresh. Every lab is free.

    Sources

    • NIST CSRC glossary: defense in depth
    • CIS Critical Security Controls v8.1

    Every claim in this deck came from these pages, fetched and checked for this release. Read the originals.

    Hands-on labs for this deck

    Open the interactive deck or see all slide decks.

    Related