~/victor.bishop
← all_writeups
·Victor Bishop

Hardening Debian to CIS Benchmarks With One Repeatable Suite

A menu-driven Bash suite that applies 16 CIS-aligned controls to Debian servers, built so a baseline lands the same way every time.

LinuxCIS BenchmarksBashHardening

The drift problem

Servers built by hand drift. One gets the SSH settings, the next misses the audit rules, and a year later the baseline exists only in a wiki page nobody trusts. This suite exists to make the baseline something you run, not something you remember.

What it enforces

  • SSH configuration hardening, covered in depth below
  • UFW firewall defaults and Fail2Ban for brute-force resistance
  • auditd rules for system monitoring and accountability
  • Unattended security upgrades
  • USB storage blocking, secure file permissions, and umask 027
  • Shared memory restrictions, core dump limits, and IPv6 controls where the network does not need it

SSH gets its own standard

The SSH configuration follows the sshaudit.com Debian Bookworm guide: key exchange algorithms, ciphers, and MACs restricted to NIST-approved choices, host keys regenerated at RSA 4096-bit and Ed25519, and iptables rate limiting so brute-force attempts slow down at the firewall instead of at the daemon.

Repeat-safe by design

Every step checks before it changes. The suite can run against a fresh build or re-run against a server it has already hardened, which makes it safe to use as drift correction, not just initial setup. The full suite, 16 controls plus the menu runner, is in the devsecops-wrappers repository on my GitHub.