01 / 20

Core Security
Principles

Master the three foundational pillars of cybersecurity: Least Privilege, Defense in Depth, and Secure by Default.

Cyber Security

Why Do Security Principles Matter?

Every system you use: your phone, your school network, your banking app: was built by humans. Humans make mistakes. Security principles are the design rules that limit the damage when mistakes happen.

The Three Pillars of Secure Design

Least Privilege
Give every user and program only the minimum access they need: nothing more.
Defense in Depth
Layer multiple independent security controls so no single failure is catastrophic.
Secure by Default
Ship systems in their most restrictive configuration out of the box.

From Theory to the Real World

In 2017, the Equifax breach exposed 147 million records. A single unpatched server with overly broad access led to the breach. If least privilege had limited that server's reach, and defense in depth had added internal firewalls, the damage could have been contained.

Principle 1: Least Privilege

User Needed Resources ✕ All Resources ✓ Least Privilege ✕ Over-Privileged

Principle 2: Defense in Depth

Physical Security Network Firewalls Application Controls Critical Data Attacker

Principle 3: Secure by Default

Insecure Default All ports open Admin password: "admin" Debug mode ON Encryption OFF ✕ Secure Default Ports closed by default Unique password required Debug mode OFF Encryption ON ✓

Key Distinctions Between the Principles

Least Privilege Defense in Depth Secure by Default
Focus Access scope Layer count Initial state
Answers "Who can do what?" "How many barriers?" "What happens day one?"
Failure mode Over-permission Single point of failure Unsafe configuration
Analogy Key to one room Castle with moat + walls Doors locked at install

How to Apply These Principles

1
Inventory access. List every user, service, and process along with the resources they currently access.
2
Trim to minimum. Remove any permission not actively needed. Apply least privilege to every entry.
3
Layer controls. For each critical asset, ensure at least two independent security layers guard it (defense in depth).
4
Audit defaults. Check that new installs ship with restrictive settings. Disable unnecessary features. Apply secure by default.
5
Review regularly. Permissions drift over time. Schedule quarterly audits to re-verify all three principles.

Example 1: School Network

A school gives every student full admin access to the network. A student accidentally installs malware that spreads to the grading system.

Student Admin Access Malware Network No layers Spreads Grades Compromised

Example 2: Online Store

An e-commerce site protects its database with only a firewall. An attacker finds a firewall bypass. With no other defenses, they extract all customer credit cards.

Atk Firewall Bypassed Database Exposed Fixed Firewall + IDS/IPS + Encryption + Access Controls 4 Layers

Example 3: New Wi-Fi Router

A family buys a new router. Out of the box, the admin panel is accessible with the password "password", WPS is enabled, and the firewall is off. No one changes the defaults.

Insecure Default
Password: "password", WPS ON, firewall OFF. A neighbor runs an automated scanner and gains full control in under 30 seconds.
Secure Default
Unique random password on label, WPS OFF, firewall ON. The same scanner finds nothing exploitable. The family never had to change a setting.

How the Principles Reinforce Each Other

Secure by Default Least Privilege Defense in Depth Defaults set minimal access Defaults enable all layers Each layer uses minimal rights

Least Privilege: In Practice

1
Role-Based Access Control (RBAC): Assign permissions to roles, not individuals. A "Student" role gets read access; a "Teacher" role gets read + write.
2
Time-Limited Privileges: Grant elevated access only for the duration needed. An IT admin gets root access for 2 hours to patch, then it expires automatically.
3
Separation of Duties: No single person should control an entire critical process. The person who writes code should not be the person who deploys it.

Common Mistakes

✕ "Just Give Admin"
Granting admin to everyone "so nothing breaks" violates least privilege and creates a massive attack surface.
✕ Single Layer Thinking
Relying on only a firewall or only a password. If that one layer fails, the entire system is exposed.
✕ Ignoring Defaults
Deploying software without reviewing its default configuration. Default credentials and open ports are the first thing attackers check.

Summary Comparison

Least Privilege Defense in Depth Secure by Default
Core Question What is the minimum access? How many barriers exist? Is the initial state safe?
Key Technique RBAC, time-limited access Firewalls, IDS, encryption Hardened configs, deny-all
Prevents Lateral movement Single point of failure Misconfig exploits
Who Benefits Every user and process The entire organization Non-technical end users

Question 1 of 5

A company gives every employee full database access instead of limiting it by role. Which security principle is being violated?

Question 2 of 5

An organization protects its server room with a keycard lock, security cameras, a network firewall, and encrypted storage. Which principle does this best demonstrate?

Question 3 of 5

A new router ships with a unique random password, the firewall enabled, and remote management disabled. This is an example of:

Question 4 of 5

A developer is given temporary root access for 2 hours to deploy a patch, then the access automatically expires. This technique supports which principle?

Question 5 of 5

Which of the following is NOT a valid example of Defense in Depth?