Course contentsShow
← Security
Lesson 1406 of 3,05229. Operating System Security - HardeningFree lesson

Default Deny and Allowlisting

Implementing security policies that block everything by default and explicitly permit only known-good configurations.

Default Deny and Allowlisting

What you'll learn: How to harden systems by blocking everything by default and only permitting explicitly trusted items.

The Core Concept

Default deny is a security stance where the operating system or application blocks all actions, connections, or executables unless they're explicitly permitted. Allowlisting (also called whitelisting) is the mechanism that defines what is permitted.

Think of it like an exclusive nightclub with a strict bouncer: only people whose names appear on "the list" get in—everyone else is turned away, no exceptions. There's no "maybe" or "looks harmless enough"—if you're not explicitly allowed, you're denied.

This approach inverts traditional security models where everything is permitted except known-bad items (denylisting/blacklisting). Attackers constantly create new malware variants, making denylists perpetually incomplete. Allowlists, by contrast, define a finite set of trusted items.

Common Allowlisting Applications

Application control: Only approved executables can run on the system. Tools like Windows AppLocker or Linux's fapolicyd enforce this. If a binary isn't on the allowlist (verified by hash, path, or signature), it won't execute.

Network firewall rules: Block all inbound/outbound traffic except specific IP addresses, ports, and protocols explicitly defined as necessary.

File system permissions: Mount directories as read-only by default; only specific processes get write access.

USB device control: Disable all removable media except specific, registered device IDs.

The Trade-off

Allowlisting requires upfront effort to identify legitimate software and workflows. It's stricter and may initially disrupt operations, but drastically reduces attack surface by eliminating unknown or unauthorized code execution—a primary vector for malware and exploitation.

Key Takeaway: Default deny with allowlisting creates a "guilty until proven innocent" security posture that prevents unauthorized code execution and access, dramatically reducing your attack surface at the cost of increased administrative overhead.