01 / 20

Secure Configuration
& Hardening

Learn how to reduce attack surfaces, establish security baselines, and protect systems by removing unnecessary services and enforcing strong defaults.

Cyber Security

What Is Secure Configuration?

Every device, server, and application ships with default settings designed for ease of use, not security. Secure configuration is the process of adjusting those settings so that only what is needed is enabled, and everything else is locked down.

What Is System Hardening?

Hardening goes a step further than basic configuration. It is the systematic process of reducing the attack surface of a system by eliminating unnecessary software, accounts, ports, and permissions.

Remove
Uninstall unused software, services, and protocols
Restrict
Limit user privileges, close open ports, disable remote access
Reinforce
Enable logging, apply patches, enforce strong passwords

Why Hardening Matters

Unhardened System Default admin password 23 open ports Unused FTP service No logging enabled Hardened System Unique strong password 3 required ports only FTP removed Full audit logging

The Security Baseline

A security baseline is a documented set of minimum configuration standards that every system in an organization must meet. It defines what "secure enough" looks like before a system goes live.

Security Baseline Patch Level Access Controls Firewall Rules Logging Policy Disabled Services Encryption Stds

Principle of Least Functionality

The core rule behind all hardening: a system should provide only the capabilities required for its intended function, and nothing more. Every extra feature is a potential entry point for attackers.

Understanding the Attack Surface

The attack surface is the total number of points where an unauthorized user could try to enter or extract data from a system. Hardening shrinks this surface.

Before Hardening SSH FTP Telnet HTTP SMTP RDP DNS After Hardening SSH HTTPS

Hardening vs. Secure Configuration

These terms are closely related but have a key difference in scope and depth.

Secure Configuration Hardening
Focus Setting correct values Eliminating attack vectors
Scope Settings and parameters Entire system architecture
Example Changing default password Removing unused accounts entirely
When Initial setup and audits Continuous lifecycle process
Analogy Setting the alarm code Bricking up unused doors

How to Harden a System

1
Start from a baseline. Use an industry standard like CIS Benchmarks or DISA STIGs as your starting point.
2
Remove unnecessary software. Uninstall all applications, services, and features not required for the system's purpose.
3
Close unused ports. Disable or block all network ports that are not explicitly needed.
4
Enforce least privilege. Remove default accounts, rename admin accounts, and grant only minimum necessary permissions.
5
Apply patches and updates. Ensure the latest security patches are installed and schedule regular updates.
6
Enable logging and monitoring. Turn on audit logs and forward them to a central security system (SIEM).

Example: Hardening a Web Server

Web Server Remove Default welcome page Server version header Unused modules Sample scripts FTP access Directory listing Configure HTTPS only (443) TLS 1.2+ enforced Strong cipher suites Security headers Rate limiting Error pages (generic) Monitor Access logs Error logs SSL certificate expiry File integrity checks Vulnerability scans Config drift alerts

Example: Hardening a Workstation

Disable
AutoRun/AutoPlay, guest accounts, unused wireless adapters, remote desktop if not needed
Configure
Full-disk encryption (BitLocker), screen lock after 5 min, host firewall rules, automatic updates
Install
Endpoint protection (antivirus/EDR), application whitelisting, VPN client for remote access

Example: Hardening a Network Router

1
Change default credentials. Replace factory usernames and passwords with unique, complex ones.
2
Disable insecure protocols. Turn off Telnet, HTTP management, and SNMPv1/v2. Use SSH and SNMPv3 only.
3
Apply access control lists. Restrict which IP addresses can reach the management interface.
4
Enable encrypted management. Use HTTPS and SSH with strong key lengths for all administrative access.
5
Update firmware regularly. Check for and apply vendor patches to close known vulnerabilities.

Key Frameworks & Standards

CIS Benchmarks
Community-developed, consensus-based configuration guidelines for 100+ technologies
DISA STIGs
U.S. Department of Defense Security Technical Implementation Guides for government systems
NIST SP 800-123
Guide to General Server Security: covers OS hardening, patching, and access control

Beware of Configuration Drift

Configuration drift occurs when systems gradually move away from their hardened baseline over time: someone re-enables a service "temporarily," a patch introduces a new default, or a firewall rule gets added and never removed.

Security Level Time Baseline Drift Audit & Remediate

Common Mistakes in Hardening

✕ Leaving Defaults
Keeping factory passwords, sample pages, or default admin accounts active on production systems.
✕ One-Time Hardening
Hardening at deployment then never auditing again, allowing configuration drift to undo your work.
✕ Over-Hardening
Locking down so aggressively that legitimate services break, causing users to find insecure workarounds.
✕ No Documentation
Failing to record what was changed and why, making future troubleshooting and audits nearly impossible.

Summary: Key Concepts at a Glance

Concept Definition Example
Security Baseline Minimum acceptable configuration standard CIS Level 1 Benchmark
Hardening Reducing attack surface systematically Removing unused services
Least Functionality Only enable what is needed Closing ports 21, 23, 25
Attack Surface All potential entry points Open ports, accounts, APIs
Configuration Drift Gradual deviation from baseline Re-enabled debug mode

Question 1 of 5

What is the primary goal of system hardening?

Question 2 of 5

A company deploys a new server using factory default settings. Which of the following is the most likely security risk?

Question 3 of 5

Which of the following best describes the Principle of Least Functionality?

Question 4 of 5

Configuration drift is best described as:

Question 5 of 5

An administrator hardens a server so aggressively that the web application it hosts stops functioning. Users begin emailing files instead of using the secure portal. This scenario illustrates the danger of: