Back

C5: Secure By Default Configurations - Overview

What is this control?

Secure By Default Configurations is the proactive control of shipping and running systems that are safe out of the box. A default deployment—one where nobody has yet applied any special hardening—should already be in a secure state. Security is the starting position, and relaxing it is a deliberate, visible, and rare exception rather than the norm.

This is the defensive counterpart to Security Misconfiguration. Misconfiguration is what happens when insecure defaults are left in place; this control is the discipline of making sure the defaults were never insecure to begin with, and that any drift back toward insecurity is caught automatically. The governing principle is deny by default: features, ports, accounts, and permissions are off unless a specific need turns them on.

Core Concept

Insecure default (must be hardened later, and usually isn't):
  Deployment    -> "works out of the box", every feature enabled
  Access        -> allow by default, broad permissions
  Accounts      -> vendor default credentials still active
  Errors        -> verbose stack traces, debug mode on
  Headers       -> no security headers set
  Storage       -> buckets public, encryption optional
  Surface       -> sample apps, demo pages, unused services running

Secure default (safe with no extra hardening):
  Deployment    -> only what is needed is enabled; the rest is off
  Access        -> deny by default, least privilege granted explicitly
  Accounts      -> no default credentials; unique secrets required at setup
  Errors        -> generic messages in prod; detail only in server logs
  Headers       -> HSTS, CSP, X-Content-Type-Options, frame denial preset
  Storage       -> private by default, encryption on by default
  Surface       -> minimal image, no samples, no demo accounts

Two audiences: what you build and what you deploy

The control applies in two directions, and both matter:

Why This Control Matters

Business Impact of Getting It Right

Technical Impact

Core Practices

Secure By Default Configurations is made of a handful of reinforcing habits:

Secure Defaults Across the Stack

LayerInsecure default (harden later)Secure default (safe now)
Application frameworkDebug on, verbose errors, wildcard CORSDebug off, generic errors, allow-listed CORS
Web server / proxyVersion banner on, directory listing, all methodsBanner off, listing off, only needed methods
TLS / transportLegacy protocols allowed, no HSTSModern TLS only, HSTS preset
DatastoreBinds to all interfaces, auth optionalBinds to localhost/private, auth required
Container imageRuns as root, full OS, secrets baked inNon-root, minimal image, secrets injected
Cloud storagePublic-capable, encryption optionalPrivate by default, encryption on
Identity / IAMBroad roles, wildcardsLeast privilege, scoped roles

Real-World Incident Classes

These are recurring classes of incident that secure defaults are designed to prevent. They are described as patterns, not specific vulnerabilities.

Class 1: Exposed no-auth datastores

Databases and search engines that historically shipped listening on all interfaces with authentication disabled were deployed straight to the internet. Entire datasets were read, tampered with, or wiped. Vendors later changed the default to bind to localhost precisely because the insecure default caused so many incidents—a direct illustration of this control.

Class 2: Public cloud storage buckets

Object-storage buckets left readable by "everyone" or "any authenticated user" exposed backups and customer records across many organisations. Providers responded by adding block-public-access defaults, moving the safe state into the default.

Class 3: Open administrative and orchestration dashboards

Management consoles and cluster dashboards deployed with no authentication and reachable from the internet were hijacked to mine cryptocurrency and to pivot into internal resources. A secure default keeps management planes closed and authenticated.

Class 4: Default and sample credentials

Devices, appliances, and applications shipped with well-known credentials (the admin/admin family) are compromised at scale by automated tools, with no exploit required. Shipping with no usable default credential removes the class entirely.

Common Misunderstandings

Myth 1: "We'll harden it after deployment"

Reality: post-deployment hardening is manual, frequently forgotten, and drifts over time. The window between "deployed" and "hardened" is exactly when systems are attacked. Secure defaults remove that window.

Myth 2: "Secure defaults slow developers down"

Reality: the opposite, when done well. A paved-road template where the safe option is already selected is faster than researching and hand-configuring security on every project.

Myth 3: "The vendor default must be reasonable"

Reality: many vendor defaults optimise for "starts on first try", not "safe in production". Debug flags, sample accounts, and open management ports are common defaults you must change.

Myth 4: "It's internal, so defaults are fine"

Reality: internal systems are reached through SSRF, compromised dependencies, and pivots. Deny-by-default and least privilege apply just as much inside the perimeter.

Myth 5: "Setting a secure baseline once is enough"

Reality: configuration drifts as people make changes. Without automated validation and drift detection, a secure baseline silently erodes back to insecure.

How This Control Relates to Security Misconfiguration

AspectSecurity Misconfiguration (the risk)Secure By Default Configurations (the control)
NatureA weakness left in placeA practice that prevents the weakness
Default postureInsecure until hardenedSecure until deliberately relaxed
Effort modelSomeone must remember to fix itSafety is inherited automatically
Failure modeForgotten hardening, driftExplicit, reviewed opt-out

Key Takeaways

  1. Secure is the starting state—a fresh deployment is safe before anyone hardens it.
  2. Deny by default—features, ports, accounts, and permissions are off unless needed.
  3. It applies to what you build and what you deploy—both must default to safe.
  4. Codify and automate—secure baselines plus drift detection keep the default from eroding.
  5. Make safe the easy path—developers should get security by choosing the default, not by extra work.

Self-Assessment Checklist

Next Steps