Skip to main content
Common Security Mistakes & Defense in Depth
Lesson 9 of 11

Common Security Mistakes & Defense in Depth

Identify frequent configuration and human-process mistakes that cause breaches, and apply defense in depth to layer independent controls so a single failure does not compromise a system.

Beginner 20 min Fundamentals

Learning objectives

  • Identify common configuration, credential, and architectural mistakes that weaken systems
  • Explain why relying on a single control or security by obscurity fails under real pressure
  • Design a defense-in-depth layout using preventive, detective, and recovery layers
  • Audit a small-office network for single points of failure and recommend practical fixes

Recommended first: The CIA Triad: Confidentiality, Integrity, AvailabilityAuthentication, Passwords, and Multi-Factor SecuritySocial Engineering, Phishing & Pretexting Defense

#Why this matters

Strong passwords, multi-factor authentication (MFA), and phishing awareness protect individual entry points, while the CIA triad defines the confidentiality, integrity, and availability goals we protect. Yet most breaches do not begin because an attacker broke modern encryption. They succeed because of everyday mistakes: a default router password, an exposed database, or a flat network where one compromised laptop reaches every server.

Security rarely fails through a single dramatic flaw. Small oversights stack until one error causes a full compromise. Defense in depth assumes any control can fail and places independent barriers behind it.

#Common security mistakes that open the door

Across small offices and enterprise networks, the same mistakes repeatedly create a single point of failure.

Mistake Concrete risk Practical fix
Default or shared credentials Anyone can log in; actions lack accountability Change defaults at install; use unique accounts
Excessive privileges One phished user becomes full admin Apply least privilege and role-based access
Flat networks Malware spreads freely to every host Separate guest, staff, and server subnets
Exposed internal services Attackers probe databases directly Bind local services to 127.0.0.1 and filter ports
Unpatched software Known flaws are exploited automatically Schedule updates and maintain asset inventory
Security by obscurity Automated scanners still find hidden URLs Enforce authentication and authorization on every route

Consider a common configuration mistake on a lab host running a web app and PostgreSQL. Checking listening sockets reveals:

Auditing listening TCP ports on a lab server
$ ss -tuln
Netid  State   Recv-Q  Send-Q  Local Address:Port   Peer Address:Port
tcp    LISTEN  0       128     0.0.0.0:22           0.0.0.0:*
tcp    LISTEN  0       128     0.0.0.0:443          0.0.0.0:*
tcp    LISTEN  0       128     0.0.0.0:5432         0.0.0.0:*

Port 443 (HTTPS) is expected on 0.0.0.0 so users can reach the web app over TLS 1.3. However, 0.0.0.0:5432 means PostgreSQL accepts connections on every network interface instead of 127.0.0.1 (localhost). Without a strict host firewall, anyone on the network can reach the database login directly.

#Defense in depth: layering controls

Defense in depth stacks independent controls across different layers of a system. Like slices of Swiss cheese, each control has small gaps, but aligning several independent layers makes it far harder for one path to pass straight through.

  1. 5Recovery & DataEncrypted offline backups, disk encryption
  2. 4Detection & LogsCentralized logs, anomaly alerts
  3. 3Host & ApplicationTimely patches, minimal ports, input validation
  4. 2Identity & AccessUnique accounts, MFA, least privilege
  5. 1Network & PerimeterFirewall allow-lists, VLANs, TLS 1.3

Strong architectures combine three control types:

  1. Preventive controls block unwanted actions beforehand (MFA, firewalls, least privilege).
  2. Detective controls reveal suspicious activity quickly (centralized logs, unusual-login alerts).
  3. Recovery controls restore operations after an incident (tested offline backups, account revocation).

#Auditing a small-office setup

You can spot high-risk flaws by tracing how traffic moves from the internet to critical data:

  1. InternetExposed router admin (default password)
  2. Office LAN 10.10.10.0/24Guest Wi-Fi, staff PCs, finance server share one subnet
  3. Shared AdminOne shared account without MFA logs into finance server
  4. BackupsNightly backup folder writable from all staff PCs

#Common mistakes when layering defenses

  • Duplicating one control: Two perimeter firewalls still leave stolen credentials and internal apps unprotected.
  • Hard shell, soft center: Guarding the perimeter while leaving the internal LAN flat lets any phished laptop roam freely.
  • Skipping detection and recovery: Without centralized logs and offline backups, breaches go unseen and recovery fails.
  • Excessive friction: Clumsy workflows without practical tools push staff toward shared accounts and sticky-note passwords.

#Summary

Most breaches stem from predictable errors: default or shared credentials, excessive privileges, flat networks, exposed services, unpatched software, and security by obscurity. Defense in depth pairs independent preventive, detective, and recovery controls across network, identity, host, and data layers so a single mistake does not become a full compromise.

Knowledge check

Sign in to take the test, complete lessons and save your progress. Log in