Objective. Students apply a structured subset of CIS Benchmark controls to harden a stock Ubuntu Server installation and verify compliance using a manual audit checklist.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
The Center for Internet Security (CIS) publishes Benchmarks — detailed, consensus-based configuration guides for operating systems, applications, and network devices. The CIS Ubuntu Linux Benchmark provides a numbered list of controls, each describing a specific security setting, the rationale behind it, and the exact commands needed to audit and remediate it. Controls are organized into two profile levels: Level 1 covers low-risk, broadly applicable settings; Level 2 adds stricter controls suited to high-security environments. In this lab you work with a representative 20-control subset drawn from both levels.
A default Ubuntu Server installation is designed for broad compatibility, not maximum security. Many services are enabled that a production server does not need. Kernel network parameters may allow behaviors useful for development but dangerous in production. Password policies are often permissive. Without hardening, a stock server is exposed to well-known attack paths: brute-force SSH login, exploitation of unnecessary services, and privilege escalation through weak account controls.
NIST SP 800-123 (Guide to General Server Security) establishes the principle that servers should be hardened before they are deployed — not patched reactively after a breach. CIS Benchmarks operationalize that principle with specific, testable controls.
Hardening follows three repeating phases.
Audit: Run the checklist against the stock VM. For each control, record Pass, Fail, or Not Applicable (N/A). A control is N/A when the checked component is absent from the system by design. Document your baseline score: the number of controls passing divided by the number that are applicable.
Remediate: For every failing control, apply the fix. Common remediation actions include editing configuration files with a text editor, running a single privileged command, disabling a systemd unit, or adding a line to a PAM module configuration. Always make a backup copy of any file before editing it — for example, `sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak`.
Verify: Re-run every checklist item. Your post-hardening score should meet or exceed the 80% threshold required to pass this lab.
Separate mount points for `/tmp`, `/var`, and `/home` limit the blast radius of a disk-filling attack or a world-writable directory exploit. The benchmark specifies mount options such as `nodev`, `nosuid`, and `noexec` on partitions that do not need device files or executable code.
Every running service is an attack surface. The benchmark directs you to disable services that are not required — for example, legacy protocols such as `rsh`, `telnet`, and `tftp`. Use `systemctl disable --now <service>` to stop and permanently disable a unit.
The Linux kernel exposes network behavior through the `/proc/sys` interface, configured persistently in `/etc/sysctl.conf` (or files under `/etc/sysctl.d/`). Important hardening parameters include:
After editing `sysctl.conf`, apply changes immediately with `sudo sysctl -p`.
SSH is the primary remote-management protocol. The `/etc/ssh/sshd_config` file controls its behavior. Key settings to verify:
After editing, always validate the configuration with `sudo sshd -t` before restarting the service. A syntax error in `sshd_config` can lock you out of the server.
The benchmark requires that `rsyslog` or `systemd-journald` is active and configured to send logs to persistent storage. Remote log forwarding to a SIEM or syslog server is recommended so that an attacker who gains root cannot erase local evidence.
PAM (Pluggable Authentication Modules) enforces password complexity and account lockout. The relevant file is `/etc/pam.d/common-password` for password rules and `/etc/pam.d/common-auth` for lockout. The `pam_pwquality` module enforces minimum length, complexity, and reuse history. `/etc/login.defs` sets password aging: `PASS_MAX_DAYS`, `PASS_MIN_DAYS`, and `PASS_WARN_AGE`.
A client-facing report has a clear structure: executive summary, scope, methodology, findings (baseline vs. post-hardening score), and a control-by-control table. For each remediated control, state what the setting was, what it is now, and why the change reduces risk. Use plain language — assume the reader understands business risk but not Linux internals.
Hardening a live production server without a maintenance window and rollback plan can cause outages. In this lab you work on a dedicated VM specifically to avoid impacting real systems. Always snapshot your VM before beginning remediation so you can revert if a change causes the system to become unreachable. Never apply hardening changes to systems you do not have written authorization to modify — unauthorized access, even well-intentioned, violates the Computer Fraud and Abuse Act and similar state laws.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.