Blog
Security by Design vs Security by Default
Security by Design and Security by Default are frequently conflated, yet they represent fundamentally different approaches to system security. Security by Design is a proactive architectural philosophy—embedding security considerations throughout the development lifecycle from initial requirements through deployment. Security by Default is an implementation principle—shipping products with the most secure configuration out-of-the-box, requiring conscious decisions to reduce security rather than conscious effort to enable it. This article clarifies the distinction between these approaches, explores their historical evolution, examines real-world implementations across software development and cloud platforms, and demonstrates why organizations need both strategies working in concert. We analyze case studies where one approach succeeded while the other failed, extract practical frameworks for applying each principle, and address common misconceptions that lead to inadequate security postures. Understanding this distinction is critical for security architects, product managers, and development teams building systems that must be both secure and usable.
Introduction: The Microsoft IIS Paradox
In 2001, Microsoft Internet Information Services (IIS) was the most exploited web server on the internet. Code Red, Nimda, and countless other worms ravaged IIS installations worldwide. By 2003, Apache had displaced IIS as the dominant web server, partly due to IIS’s terrible security reputation.
Then Microsoft did something remarkable. For Windows Server 2003, they completely rethought IIS security using two principles:
- Security by Design: Architect IIS from the ground up with security as a core requirement. Implement least privilege, defense in depth, and fail-safe defaults throughout the codebase.
- Security by Default: Ship IIS in a locked-down state. Install only essential components. Disable all unnecessary features. Make administrators consciously enable functionality rather than hoping they’d consciously disable vulnerabilities.
The result? IIS 6.0 became one of the most secure web servers ever released. Vulnerabilities dropped dramatically. Exploitation attempts failed against default configurations. Microsoft transformed IIS from a security liability into a security benchmark—by applying both principles simultaneously.
“Security by Design ensures the system can be secure. Security by Default ensures the system is secure without requiring expertise to configure it.”
This article explores the distinction, why both matter, and how to implement them effectively.
Security by Design: Architectural Philosophy
Core Definition
Security by Design is the practice of architecting security into every phase of system development—from initial conception through requirements, design, implementation, testing, and maintenance. Security is not bolted on afterward; it’s foundational to the architecture.
Key Characteristics
- Proactive, Not Reactive: Security requirements are defined before the first line of code is written.
- Lifecycle Integration: Security considerations are embedded in every SDLC phase—not just a pre-deployment checkbox.
- Threat Modeling: Systematic identification of threats, attack surfaces, and vulnerabilities during design.
- Architectural Patterns: Defense in depth, least privilege, separation of duties, fail-safe defaults baked into architecture.
- Security as a Feature: Security capabilities (authentication, authorization, encryption, audit) are first-class features, not afterthoughts.
- Testability: Security properties can be tested, validated, and verified throughout development.
The Seven Touchpoints of Security by Design
Gary McGraw’s Software Security framework identifies seven critical touchpoints:
- Abuse Cases: Document how attackers might misuse functionality. Example: “Attacker floods API with requests to cause denial of service.”
- Security Requirements: Explicit statements: “All passwords must be hashed with bcrypt, minimum 12 rounds” not “passwords should be secure.”
- Architectural Risk Analysis: Threat modeling using STRIDE, PASTA, or attack trees. Identify high-risk components before implementation.
- Code Review: Security-focused code review with checklists for common vulnerabilities (OWASP Top 10, CWE Top 25).
- Security Testing: SAST, DAST, penetration testing, fuzzing. Testing security properties, not just functionality.
- Security Operations: Monitoring, incident response, vulnerability management designed into the system from the start.
- Penetration Testing: External validation of security design before production deployment.
Example: Banking Application Security by Design Requirements Phase: Define authentication requirements (MFA for all accounts over $10,000 balance), authorization model (RBAC with separation of duties), encryption standards (TLS 1.3, AES-256), audit requirements (immutable logs, 7-year retention). Design Phase: Architecture includes separate authentication service (OAuth 2.0), zero-trust network (micro-segmentation), encrypted database (TDE), HSM for key management, SIEM integration. Implementation: Secure coding standards enforced via linters. Input validation on all user input. Parameterized queries for SQL. No secrets in code (vault integration). Testing: SAST during build, DAST before deployment, penetration test before launch, continuous vulnerability scanning in production. Security was designed in from day one—not retrofitted after vulnerabilities were discovered.
Security by Default: Implementation Principle
Core Definition
Security by Default means shipping products in the most secure configuration possible out-of-the-box. Users must consciously reduce security, not consciously improve it. The default state should be secure without requiring expertise to configure.
Key Characteristics
- Secure Out-of-the-Box: No configuration changes required to achieve baseline security.
- Minimal Attack Surface: Unnecessary features disabled. Unused services not installed. Minimal ports open.
- Conscious Insecurity: Users must deliberately weaken security (e.g., disable firewall, allow weak passwords) rather than deliberately strengthen it.
- Secure Defaults, Flexible Options: Advanced users can customize, but defaults are secure for novices.
- Fail Secure: When in doubt, deny access rather than grant it. Errors should not expose data or functionality.
Practical Applications of Security by Default
Operating Systems:
- Windows: Firewall enabled by default. User Account Control (UAC) active. Automatic updates enabled. Windows Defender running.
- macOS: Gatekeeper blocks unsigned apps. FileVault available (but not default). System Integrity Protection (SIP) enabled.
- Linux (Ubuntu): UFW (firewall) inactive by default but easily enabled. SSH password authentication enabled (criticized security decision).
Web Browsers:
- Chrome: Safe Browsing enabled (blocks known malicious sites). HTTPS-first mode. Third-party cookies blocked by default (2024+).
- Firefox: Enhanced Tracking Protection enabled. DNS over HTTPS. Automatic HTTPS upgrades.
Cloud Platforms:
- AWS: S3 Block Public Access enabled by default (2018+). EBS encryption opt-in (criticized—should be default). Default VPCs isolate resources.
- Azure: Storage Service Encryption (SSE) enabled by default. HTTPS required for storage accounts. Network security groups default-deny inbound.
- GCP: All data encrypted at rest by default. Private Google Access for VPC. Default service account has minimal permissions.
💡 Key Principle: If 99% of users should have a security feature enabled, it should be the default. Requiring action to enable security means most users won’t enable it.
Security by Design vs Security by Default: Direct Comparison
| Dimension | Security by Design | Security by Default |
| Focus | Architecture & Development Process | Configuration & Deployment State |
| Question Answered | “Can this system be secure?” | “Is this system secure out-of-the-box?” |
| When Applied | Throughout SDLC (requirements → maintenance) | At deployment / first run |
| Primary Audience | Developers, Architects, Security Engineers | End Users, System Administrators |
| Implementation Cost | High upfront, lower long-term | Low (configuration decisions) |
| Examples | Threat modeling, SAST/DAST, security architecture reviews, secure SDLC | Firewall enabled, encryption on, unnecessary features disabled |
| Success Metric | Low vulnerability count, resilient architecture | % of users secure without config changes |
| Failure Mode | Architectural vulnerabilities, exploitable design flaws | Insecure defaults, users inadvertently exposed |
🔑 Critical Insight: Security by Design makes secure configuration possible. Security by Default ensures secure configuration actually happens.
Why Both Approaches Are Necessary
Security by Design Without Security by Default: WordPress Scenario
WordPress has made significant security by design improvements over the years: automatic updates, prepared statements for SQL injection prevention, nonce tokens for CSRF protection, and sanitization functions built into the core API.
However, WordPress installations are still frequently compromised. Why?
- Weak Default Passwords: No password complexity requirements enforced by default.
- XML-RPC Enabled: Legacy API endpoint enabled by default, frequently exploited for brute force attacks.
- Plugin Ecosystem: Users install poorly-coded plugins that introduce vulnerabilities.
- File Permissions: Many installations have overly permissive file system permissions.
WordPress can be made secure—but it requires expertise and conscious configuration. Most users don’t have that expertise. Security by design without security by default leaves the majority vulnerable.
Security by Default Without Security by Design: Early IoT Devices
Many early Internet of Things (IoT) devices shipped with secure-looking defaults: HTTPS enabled, admin passwords required, firewall rules configured. But the underlying design was fundamentally flawed.
- Hardcoded Credentials: Manufacturer backdoor accounts with unchangeable passwords in firmware.
- Insecure Protocols: HTTPS for web UI, but devices communicated with cloud servers via unencrypted HTTP.
- No Update Mechanism: Secure by default today, vulnerable forever once exploits are discovered.
- Unnecessary Services: Telnet, FTP, UPnP running even when disabled in UI—attack surface remained.
The Mirai botnet exploited these design failures, compromising millions of IoT devices with default or hardcoded credentials. No amount of secure-looking defaults could compensate for fundamentally insecure architecture.
“You cannot configure your way out of a design flaw. You cannot design your way out of insecure defaults. You need both.”
Real-World Implementations: Success Stories
Case Study 1: OpenBSD – Security by Design and Default
OpenBSD is arguably the most secure general-purpose operating system, applying both principles rigorously.
Security by Design:
- Code auditing: Entire codebase continuously reviewed for vulnerabilities
- Privilege separation: Services run with minimal privileges (OpenSSH pioneered this)
- Memory protections: W^X (write XOR execute), ASLR, stack protection built into compiler
- Secure APIs: Functions like strlcpy() designed to prevent buffer overflows
Security by Default:
- Minimal installation: Base system includes only essential services
- Firewall enabled: pf (packet filter) active with sensible rules
- No unnecessary daemons: Services must be explicitly enabled
- Secure defaults everywhere: SSH root login disabled, password complexity enforced
Result: Only two remote vulnerabilities in default install in over 20 years. This is extraordinary—most operating systems discover dozens or hundreds of vulnerabilities annually.
Case Study 2: Google Chrome – Secure by Design and Default
Security by Design:
- Sandboxing: Each tab runs in isolated process with restricted system access
- Site Isolation: Render processes separated per-site to prevent cross-site attacks
- Automatic updates: Silent, mandatory updates ensure users always have latest security patches
- Memory safety: V8 JavaScript engine designed to mitigate memory corruption vulnerabilities
Security by Default:
- Safe Browsing: Blocks phishing and malware sites (enabled by default)
- HTTPS-First: Warns on unencrypted connections, upgrades HTTP to HTTPS automatically
- Third-party cookie blocking: Privacy Sandbox defaults to blocking cross-site tracking
- Extension permissions: Granular permissions required, reviewed before installation
Result: Chrome dominates browser market (65%+) partly due to security reputation. Users trust Chrome to be secure without configuration.
Common Misconceptions and Pitfalls
Misconception 1: “Security by Default Is Sufficient”
Reality: Secure defaults cannot compensate for architectural vulnerabilities. SQL injection, buffer overflows, and design flaws will be exploited regardless of configuration.
Example: A web application ships with HTTPS enabled (default). But the application has SQL injection vulnerabilities throughout. Attackers bypass HTTPS entirely—they’re authenticated users exploiting code flaws.
Misconception 2: “Security by Design Means Perfect Security”
Reality: No design is perfect. Vulnerabilities will be discovered. Security by design minimizes vulnerabilities and provides mechanisms for rapid patching—it doesn’t eliminate all risk.
Example: OpenSSH was designed with security as priority #1. Yet Heartbleed (OpenSSL flaw) and other vulnerabilities still affected it. The difference: rapid patch deployment and architectural resilience limited damage.
Misconception 3: “Secure Defaults Hurt Usability”
Reality: Poorly designed secure defaults hurt usability. Well-designed secure defaults are invisible to users.
Bad example: Requiring 20-character passwords with special characters for login to a weather app (excessive friction).
Good example: Automatic HTTPS upgrades in browsers (user sees no difference, gains significant security).
Misconception 4: “We Can Add Security Later”
Reality: Retrofitting security is exponentially more expensive and less effective than designing it in from the start.
Research shows fixing vulnerabilities in production costs 30x more than fixing them during design, and 100x more than preventing them through secure architecture.
Practical Implementation Framework
For Security by Design
- Security Requirements Phase: Document explicit security requirements before design. Include compliance requirements (PCI DSS, HIPAA, GDPR).
- Threat Modeling: STRIDE or PASTA analysis during design phase. Document threats, attack vectors, and mitigations.
- Secure Architecture Review: Security architect reviews before implementation begins. Address high-risk design decisions early.
- Secure Coding Standards: OWASP guidelines, language-specific best practices enforced via linters and code review.
- Security Testing: SAST during development, DAST before deployment, penetration testing before production.
- Security Operations: Monitoring, logging, incident response integrated from launch. Vulnerability management process defined.
For Security by Default
- Minimal Installation: Install only essential components. Disable optional features until explicitly enabled.
- Encryption Enabled: Data at rest and in transit encrypted by default. Strong algorithms (AES-256, TLS 1.3).
- Strong Authentication: Enforce password complexity. Disable default accounts. Require MFA for privileged access.
- Least Privilege: Default user accounts have minimal permissions. Require explicit privilege elevation.
- Automatic Updates: Security patches installed automatically (or strongly encouraged with persistent prompts).
- Secure Communication: Disable insecure protocols (SSLv3, TLS 1.0/1.1, Telnet, FTP). Enable secure alternatives only.
- Audit Logging: Comprehensive logging enabled by default. Logs protected from tampering.
Key Takeaways
- Complementary, Not Alternatives: Security by Design and Security by Default work together. One without the other creates vulnerabilities.
- Design = Can Be Secure, Default = Is Secure: Security by Design provides the capability. Security by Default ensures it’s actually used.
- Users Shouldn’t Need Expertise: If your product requires security expertise to configure safely, most users will be vulnerable.
- Secure Defaults Cost Little, Save Much: Changing default configurations is cheap. The cost of breaches due to insecure defaults is enormous.
- Security as Proactive Architecture: Security by Design requires thinking about security from day one, not as an afterthought.
- Conscious Insecurity vs Conscious Security: Users should have to deliberately reduce security, not deliberately improve it.
- Test Both Dimensions: Penetration testing validates design. Configuration audits validate defaults.
Conclusion: Security Requires Both Principles
Security by Design and Security by Default are not competing philosophies—they’re complementary strategies that address different aspects of system security. Security by Design ensures the architecture can withstand attacks. Security by Default ensures users are actually protected without requiring expertise.
Microsoft’s transformation of IIS from security disaster to security benchmark demonstrates the power of applying both principles together. OpenBSD’s two-decade track record shows what’s achievable when organizations commit to both approaches rigorously.
“The best security is invisible security—architected so well and configured so securely that users don’t realize how protected they are.”
When building systems, ask two questions: Can this be secure? (Design) and Is this secure out-of-the-box? (Default). If you can’t answer yes to both, you’re leaving users vulnerable.
Security by Design makes secure systems possible. Security by Default makes secure systems probable. Together, they make secure systems practical.
References and Resources
- McGraw, Gary: Software Security: Building Security In
- Howard, Michael & LeBlanc, David: Writing Secure Code (Microsoft)
- OWASP: Secure Coding Practices Quick Reference
- NIST: Secure Software Development Framework (SSDF)
- Microsoft Security Development Lifecycle (SDL)
- CERT Secure Coding Standards
- CIS Benchmarks: Secure Configuration Guidelines