CyberLearn
← Back to beginner
Beginner

Linux CIS Hardening Auditor

CIS benchmark compliance checker

Log in to track progress
3–4hBash

What you'll learn

  • CIS benchmarks
  • System hardening
  • Compliance scoring
  • Shell scripting
 ██████╗██╗███████╗ █████╗ ██╗   ██╗██████╗ ██╗████████╗
██╔════╝██║██╔════╝██╔══██╗██║   ██║██╔══██╗██║╚══██╔══╝
██║     ██║███████╗███████║██║   ██║██║  ██║██║   ██║
██║     ██║╚════██║██╔══██║██║   ██║██║  ██║██║   ██║
╚██████╗██║███████║██║  ██║╚██████╔╝██████╔╝██║   ██║
 ╚═════╝╚═╝╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝   ╚═╝

Cybersecurity Projects Bash License: AGPLv3

CIS Benchmark compliance auditor for Linux systems with scored reporting, baseline comparison, and remediation guidance.

This is a quick overview — security theory, architecture, and full walkthroughs are in the learn modules.

What It Does

  • Audit Linux systems against 104 CIS Benchmark controls (Debian/Ubuntu)
  • Check filesystem hardening, services, network parameters, logging, SSH, and user accounts
  • Generate scored compliance reports in terminal, JSON, or HTML format
  • Compare results against a saved baseline to detect regressions and improvements
  • Provide specific remediation commands for every failed control
  • Support Level 1 and Level 2 benchmark profiles
  • Run in test mode against mock fixtures without root access

Quick Start

./install.sh
sudo cisaudit

[!TIP] This project uses just as a command runner. Type just to see all available commands.

Install: curl -sSf https://just.systems/install.sh | bash -s -- --to ~/.local/bin

Commands

CommandDescription
sudo cisauditRun full audit with terminal output
sudo cisaudit -l 1Audit Level 1 controls only
sudo cisaudit -f json -o report.jsonGenerate JSON report
sudo cisaudit -f html -o report.htmlGenerate HTML report
sudo cisaudit -c 5Audit only Section 5 (Access/Auth)
cisaudit --list-controlsList all 104 registered controls
sudo cisaudit -s baseline.jsonSave current results as baseline
sudo cisaudit -b baseline.jsonCompare against a previous baseline
cisaudit -t testdata/fixturesRun against test fixtures (no root needed)

Options

FlagDefaultDescription
-l, --levelallBenchmark level: 1, 2, or all
-f, --formatterminalOutput format: terminal, json, html
-o, --outputstdoutWrite report to file
-c, --categoriesallCategories to audit: 1,2,3,4,5,6
-t, --test-root/System root for testing
--threshold0Minimum pass % to exit 0
-q, --quietoffSuppress progress output

CIS Benchmark Sections

#SectionControls
1Initial Setup20
2Services18
3Network Configuration20
4Logging and Auditing18
5Access, Authentication and Authorization18
6System Maintenance10
Total104

Examples

sudo cisaudit -l 1 -f json -o report.json

sudo cisaudit -c 3,5 -f terminal

sudo cisaudit -s baselines/march.json
sudo cisaudit -b baselines/march.json

cisaudit -t testdata/fixtures -f json | python3 -m json.tool

Learn

This project includes step-by-step learning materials covering security theory, architecture, and implementation.

ModuleTopic
00 - OverviewPrerequisites and quick start
01 - ConceptsCIS benchmarks, real breaches, and compliance frameworks
02 - ArchitectureSystem design, module layout, and data flow
03 - ImplementationCode walkthrough with file references
04 - ChallengesExtension ideas and exercises

License

AGPL 3.0