Hardening with CIS Benchmarks
Reduce attack surface on Windows, Linux and common services using CIS Benchmarks and configuration baselines.
Intermediate · about 8 hours · difficulty 2/5
Learn first: Windows Internals for Defenders, Linux Users, Permissions and Processes
Hardening means removing unnecessary features and tightening settings so there is less to attack. Instead of inventing settings yourself, use a published baseline.
Baselines to know
- CIS Benchmarks: free, consensus-based configuration guides for Windows, Linux distributions, browsers, cloud platforms, databases and more. Level 1 is a practical default; Level 2 is stricter and may affect usability.
- Microsoft security baselines for Windows and Microsoft 365, deployable through Group Policy or Intune.
- DISA STIGs for government-grade environments.
Typical hardening themes
- Remove or disable unused services, packages and accounts.
- Enforce strong authentication and lockout policies.
- Disable legacy protocols (SMBv1, old TLS versions, LLMNR where not needed).
- Turn on and size audit logging.
- Restrict local admin rights and use tools like LAPS for unique local admin passwords.
- Enable disk encryption (BitLocker, LUKS) and secure boot.
- Enable application control (such as Windows App Control or AppLocker) where feasible.
Applying baselines safely
- Test on a pilot group first; some settings break legacy apps.
- Automate with Group Policy, Intune, Ansible or similar, so settings stay applied.
- Scan for compliance with CIS-CAT Lite, Lynis on Linux, or your configuration tool.
- Document justified deviations.
Pitfalls
- Applying Level 2 everywhere and breaking business workflows, then rolling everything back.
- One-time hardening that drifts back within months.
Move on when you can harden a Linux and a Windows VM against CIS Level 1, measure the before and after score and explain two deviations you chose.
Key concepts
- CIS Benchmarks Level 1 vs 2
- Microsoft security baselines
- Disabling legacy protocols
- Local admin control and LAPS
- Disk encryption and secure boot
- Configuration automation
- Compliance scanning (CIS-CAT, Lynis)
- DISA STIGs
Mini project
Run Lynis on an Ubuntu VM and CIS-CAT Lite on a Windows VM, apply at least ten Level 1 recommendations with a script or Ansible, and report the score change plus any deviations.
Check yourself
Why should hardening baselines be applied through automation rather than manual changes?
Free resources
- CIS Benchmarks (Center for Internet Security)
- Windows security baselines (Microsoft Learn)
- Lynis (CISOfy)