Skip to main content

CompTIA Security+View full course outline

Defense in Depth and Least Privilege(OBJ.1.1)

By Jonathon Eades — Founder & IT InstructorUpdated

10 min read

A finance clerk opens an invoice attachment that slipped past the email filter. In one company that click ends with every file server encrypted. In another it ends with an alert, a quarantined laptop and a short incident ticket. The difference is rarely a better email filter. It is what stood behind the filter.

Security people describe the difference with two principles: defense in depth, which stacks independent controls so no single failure is fatal, and least privilege, which keeps every account and process as weak as its job allows. On the CompTIA Security+ SY0-801 exam both sit under objective 1.1, which expects you to explain the core concepts behind every control. This lesson explains each principle, how they show up on real networks, how they go wrong, and how exam scenarios describe them.

Defense in depth assumes every single control will eventually fail

Defense in depth, also called layered security, means protecting an asset with several independent controls so that an attacker must defeat all of them, and a failure in one is caught or contained by another. The idea starts from an honest assumption: filters miss things, patches arrive late, users click links, and administrators make mistakes. A design that depends on any one control working every time will eventually fail.

Layers are usually described from the outside in:

Layer What it stops or catches Example controls
Physical Hands on hardware Badge readers, locked racks, cameras
Network perimeter Unwanted traffic from outside Firewalls, email filtering, IPS
Internal network Movement between systems Segmentation, internal firewalls, NAC
Endpoint Malicious code on a host EDR, patching, application control
Application Abuse of software logic Input validation, WAF, authorization checks
Data Use of data an attacker reached Encryption, DLP, backups
Identity Use of stolen or excess access MFA, least privilege, access reviews
People and policy Mistakes and manipulation Training, policies, procedures

Defense in depth is not the same as buying more products. Two antivirus engines on one laptop are a single layer twice. The principle asks for controls at different points, of different kinds, so an attacker needs a different technique for each one.

Follow one attack through the layers to see the principle work

Go back to the clerk's attachment and trace it through a well-layered network.

The email gateway checked the sender's authentication records and sandboxed the attachment, but the macro only runs after a short delay, so the sandbox saw nothing. That layer failed. Awareness training is the next layer, and the clerk opened the file anyway. Two layers down.

The next layer works. A Group Policy setting blocks macros in Office files downloaded from the internet, so the document opens with its macros disabled and a security banner instead of running code. Suppose the attacker used a different trick and code did run. The EDR agent sees Word start PowerShell, a pattern it treats as malicious, kills the process and isolates the laptop.

Suppose that failed too. The clerk works as a standard user, not a local administrator, so the malware can't install a driver, disable the EDR agent or read cached credentials from memory. Segmentation blocks workstations from reaching each other on SMB 445 and RDP 3389, and the backup network isn't reachable from the user VLAN at all. Every blocked connection attempt lands in the SIEM as an alert.

The attacker has to get through every one of those layers to reach the goal. The defenders need only one to hold, and the detective layers give them a chance to respond even while the attack is still in progress. That is the payoff of defense in depth: an incident becomes a contained event instead of a company-wide outage.

Create a free account to keep reading

The full lesson is free — no credit card required.

Continue reading free

Test yourself on this topic: free Core Security Concepts practice questions — no account needed.