Hardening is the process of reducing a system's attack surface by removing or disabling everything it does not need and configuring what remains securely. It covers operating systems, servers, applications, databases, networks and cloud services, and it follows a documented baseline such as a CIS Benchmark or a DISA STIG. Hardening is not a one-time project: new vulnerabilities and configuration drift mean it has to be checked and repeated continuously.
Key takeaways
- Hardening reduces the attack surface: remove unneeded services, ports, software and accounts, then lock down what remains.
- Work from a published baseline — CIS Benchmarks, DISA STIGs or NIST guidance — instead of inventing your own settings.
- Hardening is continuous: patch, scan for drift, and re-check after every change, or the system quietly softens again.
Most breaches do not start with a brilliant hack. They start with something ordinary: a service nobody uses, a default password nobody changed, a port left open since installation. Hardening is the discipline of finding those openings and closing them — before an attacker does.
What is hardening?
Hardening is the process of securing a system by reducing its attack surface — the total number of entry points an attacker could use — by removing or disabling anything unnecessary and configuring what remains as securely as possible. It applies to servers, operating systems, applications, databases, networks and cloud infrastructure alike.
The core idea is simple: a system should do only what it is meant to do. Every extra service, open port, installed program, user account or default setting is a potential way in. Hardening strips those away and locks down the rest, so the system keeps its function but offers far less to attack.
It is not about adding more security tools. As Bitdefender's hardening guide puts it, hardening is about making better use of what is already in place, with security in mind. A hardened system is also easier to manage: every component you remove no longer needs patching, monitoring or documenting.
Why does hardening matter?
Hardening matters because attackers take the easiest path, and the easiest path is usually a known weakness in a default configuration. Unpatched services, default credentials and open ports are the first things automated scanners look for, and they are present on millions of systems.
It also matters for compliance. Hardening is a requirement, not just a best practice, in most regulatory and industry frameworks — from PCI DSS to HIPAA to ISO 27001. Auditors expect documented baselines and evidence that systems match them, which is why hardening programs usually produce scan reports and exception lists.
Finally, hardening limits damage. A system with least-privilege access, segmented networks and no unnecessary services gives an attacker who does get in far less room to move. That is the same lesson NotPetya taught in 2017: flat networks and standing admin rights turned one infection into a company-wide disaster. Our guide to NotPetya shows what happens when those controls are missing.
What are the core principles of hardening?
Every hardening guide, from NIST to the CIS Benchmarks, rests on the same handful of principles. Learn them once and every checklist makes sense.
- Least functionality (NIST CM-7). Configure the system to provide only its essential capabilities, and prohibit or restrict everything else — functions, ports, protocols, services and software.
- Least privilege. Every user, process and service account runs with the minimum permissions needed to do its job, and admin rights are used only when necessary.
- Secure defaults. Replace vendor defaults — passwords, SNMP community strings, open management interfaces — with secure values before a system goes live.
- Defense in depth. Hardening is one layer in a multi-layered architecture. It reduces exposure; it does not replace firewalls, endpoint protection, MFA or logging.
- Continuous verification. A hardened system drifts. New software, updates and human changes quietly re-open holes, so configuration must be scanned and corrected on a schedule.
What are the main types of hardening?
Hardening adapts to each layer of the stack. The techniques differ between a Linux server and a network switch, but the goal is identical: fewer entry points, tighter controls.
| Type | What it covers | Typical actions |
|---|---|---|
| Operating system | Windows, Linux, macOS endpoints and servers | Disable unused services, remove default accounts, enforce patching, restrict admin access |
| Server | Physical and virtual servers | Separate roles per server, restrict remote access, secure boot, encrypt disks |
| Network | Routers, switches, firewalls | Close unused ports, remove permissive rules, segment networks, change defaults |
| Application | Web apps, email, office software | Remove debug options, set secure headers, limit permissions, disable unused features |
| Database | SQL, NoSQL stores | Restrict access, encrypt sensitive data, audit configuration, remove sample databases |
| Cloud and containers | Cloud accounts, VMs, Kubernetes | Lock down IAM, secure storage buckets, scan images, limit container privileges |
| End-user PC | Laptops and desktops | Remove unneeded software, enable disk encryption, restrict installs, enforce updates |
For a small business, operating system and network hardening deliver most of the value. Start there: our guide to securing your Wi-Fi covers the home and small-office network side, including router defaults.
What is a security baseline, and which one should you use?
A security baseline is a documented, agreed set of configuration settings that implement security controls for a given platform. The baseline is the blueprint; hardening is the construction work that brings it to life. Without a baseline, hardening is guesswork — and nobody can tell whether a system has drifted.
You do not have to invent baselines yourself. The most widely used sources are:
- CIS Benchmarks — free, consensus-based configuration guides from the Center for Internet Security for operating systems, databases, cloud platforms and network devices. Each has a Level 1 profile (essential, low impact) and a stricter Level 2 profile.
- DISA STIGs — Security Technical Implementation Guides from the US Defense Information Systems Agency, used for Department of Defense systems. Findings are categorized CAT I (critical), CAT II and CAT III.
- NIST guidance — SP 800-53 Rev. 5 supplies the control catalog (CM-2 baseline configuration, CM-6 configuration settings, CM-7 least functionality), and SP 800-70 describes the National Checklist Program, the US library of hardening checklists.
- Microsoft Security Baselines — Group Policy settings for Windows and Windows Server, with a Policy Analyzer tool to compare your policy against the baseline.
For most small teams, a CIS Benchmark Level 1 profile is the right start: it is practical, widely audited, and scanner tools can check compliance automatically. Adopt one baseline per system type, document any exceptions, and review them yearly.
How does the hardening process work?
Hardening follows a repeatable cycle, whatever the system. Skipping a step is how holes survive: people configure once, never validate, and discover the gap during an incident.
- Identify. Inventory what you have — devices, software, accounts, open ports — and record each system's role. You cannot harden what you do not know exists. Pick the baseline that fits each system type.
- Configure. Apply the baseline: disable unneeded services, close unused ports, remove default accounts, set strong authentication, and apply patches.
- Validate. Scan the system against the baseline with a configuration scanner or benchmark tool, and fix the gaps the scan finds.
- Monitor. Watch for configuration drift — settings that change after deployment — using monitoring or periodic re-scans.
- Remediate. Correct deviations, document exceptions with a reason and an owner, and feed lessons back into the baseline.
A practical hardening checklist
This is a starting checklist for a typical small-business server or PC. Apply it to one system first, test that everything still works, then roll it out.
- Remove what you don't need. Uninstall unused software, disable unneeded services and protocols (Telnet, FTP, old SMBv1), and close ports that nothing should be listening on.
- Change every default. Default admin passwords, SNMP community strings, and vendor accounts must go before a system faces any network.
- Patch on a schedule. Apply OS and application updates promptly, and remove software that is end-of-life and no longer patched.
- Enforce least privilege. Remove local admin rights from everyday accounts, use separate admin accounts, and require MFA for remote and admin access.
- Turn on the firewall and encryption. Host firewalls on every machine, disk encryption on laptops, and TLS for anything that moves over a network.
- Enable logging and alerting. Log authentication failures, privilege use and configuration changes, and actually review the logs.
- Control what can run. Where practical, allowlist applications so only approved software can execute — the NIST CM-7(5) approach.
- Secure the network around it. Segment networks, block workstation-to-workstation traffic, and disable remote management from the internet.
For websites specifically, you can check one layer right now: our free security headers checker shows whether your site sends the headers a hardened web server should.
Our SSL checker verifies your TLS setup, and the control behind all of this — least functionality — is defined in NIST SP 800-53 Rev. 5, control CM-7.
Common hardening mistakes
Hardening fails in predictable ways. Avoid these and you are ahead of most organizations.
- Treating it as a one-time project. Systems drift within weeks. Without monitoring, a hardened server quietly returns to a soft state.
- Hardening without testing. Disabling a service that a business process needs causes outages, which then get "fixed" by undoing the hardening. Test in a staging system first.
- Copying a baseline blindly. A Level 2 CIS profile or a STIG can break applications that need features the baseline disables. Adapt the baseline, document exceptions, and get them approved.
- Forgetting the cloud. Cloud storage buckets, identity settings and API keys are the modern equivalent of open ports — and they are misconfigured just as often.
- No exception process. If people cannot get a legitimate exception, they work around the controls in secret. A documented exception with an owner and an expiry date is far safer.
- Ignoring end-user devices. Servers get hardened while laptops — which hold the same credentials — are left with default settings and local admin rights.
The bottom line
Hardening is not glamorous, but it is the highest-return security work most organizations can do. Remove what a system does not need, lock down what remains against a published baseline, and keep checking that it stays that way.
Start small: pick one system, apply a CIS Benchmark Level 1 profile, scan it, and fix what the scan finds. Then repeat for the next system. You can check your website's side of the job in seconds with our free security headers checker — and work through the rest with the checklist above.
Frequently asked questions
What is hardening in cybersecurity?
Hardening is the process of securing a system by reducing its attack surface: disabling unnecessary services, closing unused ports, removing default accounts, applying patches and enforcing least privilege. The goal is to keep only the components a system needs to do its job, configured as securely as possible.
What is the difference between hardening and patching?
Patching fixes known vulnerabilities in software you keep. Hardening is broader: it also removes software, services and access you do not need, and sets secure configurations. Patching is one step inside a hardening program, not the whole thing.
What is a security baseline?
A security baseline is a documented set of minimum secure configuration settings for a type of system — for example, all Windows servers in a company. Hardening is the process of applying that baseline to real systems and then checking that they stay compliant.
What are CIS Benchmarks and STIGs?
CIS Benchmarks are consensus-based configuration guides from the Center for Internet Security covering over 100 technologies, with Level 1 settings for broad use and stricter Level 2 settings. DISA STIGs are the US Department of Defense's Security Technical Implementation Guides. Both are free starting points for a hardening baseline.
What is the principle of least functionality?
Least functionality means a system should provide only the capabilities required for its intended function, and nothing more. NIST SP 800-53 calls this control CM-7. Every extra service, port or feature is a potential entry point for an attacker.
How often should systems be hardened?
Continuously. Hardening is not a one-time project because systems change: new software is added, settings are updated, and configuration drift creeps in. Scan against your baseline regularly, re-harden after every change, and review the baseline itself at least once a year.
Is hardening only for servers?
No. Hardening applies to operating systems, servers, network devices, firewalls, applications, databases, cloud workloads, containers and end-user PCs. Even a home router benefits: change the default password, disable remote admin and update the firmware.
Does hardening replace antivirus or firewalls?
No. Hardening is one layer in defense in depth. Antivirus, firewalls, MFA and monitoring all still matter. Hardening reduces the number of ways in, so the other controls have less to defend.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against NIST SP 800-53 Rev. 5 controls CM-2, CM-6 and CM-7 and vendor hardening guides from Bitdefender and Intel.
How we write and fact-check →