Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Hardens Linux endpoints using CIS Benchmark recommendations for Ubuntu, RHEL, and CentOS to reduce attack surface, enforce security baselines, and meet compliance requirements. Use when deploying new Linux servers, remediating audit findings, or establishing security baselines for Linux infrastructure. Activates for requests involving Linux hardening, CIS benchmarks for Linux, server security baselines, or Linux configuration compliance.
.claude/skills/hardening-linux-endpoint-with-cis-benchmark/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-18 | ✓→✓ | = Same ✓ | 147% | 0% |
| case-01 | ✗→✗ | = Same ✗ | 0% | 0% |
Use this skill when:
Do not use for Windows hardening (use hardening-windows-endpoint-with-cis-benchmark).
bash# 1.1.1 Disable unused filesystems cat >> /etc/modprobe.d/CIS.conf << 'EOF' install cramfs /bin/true install freevxfs /bin/true install jffs2 /bin/true install hfs /bin/true install hfsplus /bin/true install squashfs /bin/true install udf /bin/true EOF # 1.1.2 Ensure /tmp is a separate partition with nodev,nosuid,noexec # /etc/fstab entry: # tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0 systemctl unmask tmp.mount systemctl enable tmp.mount # 1.1.8 Ensure nodev option on /dev/shm mount -o remount,nodev,nosuid,noexec /dev/shm echo "tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0" >> /etc/fstab # 1.4 Secure boot settings chown root:root /boot/grub/grub.cfg chmod 600 /boot/grub/grub.cfg # Set GRUB password grub-mkpasswd-pbkdf2 # Generate hash, add to /etc/grub.d/40_custom
bash# 2.1 Disable unnecessary services systemctl disable --now avahi-daemon systemctl disable --now cups systemctl disable --now rpcbind systemctl disable --now xinetd # 2.2 Ensure NTP is configured apt install chrony -y # or systemd-timesyncd systemctl enable --now chrony # 3.1 Network parameters (host only, not router) cat >> /etc/sysctl.d/99-cis.conf << 'EOF' net.ipv4.ip_forward = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv4.conf.all.secure_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_ignore_bogus_error_responses = 1 net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 net.ipv4.tcp_syncookies = 1 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.default.accept_ra = 0 EOF sysctl --system # 3.4 Configure firewall (UFW or firewalld) ufw enable ufw default deny incoming ufw default allow outgoing ufw allow ssh
bash# 5.2 SSH Server Configuration (/etc/ssh/sshd_config) sed -i 's/#Protocol 2/Protocol 2/' /etc/ssh/sshd_config cat >> /etc/ssh/sshd_config << 'EOF' LogLevel VERBOSE MaxAuthTries 4 PermitRootLogin no PermitEmptyPasswords no PasswordAuthentication no X11Forwarding no MaxStartups 10:30:60 LoginGraceTime 60 AllowTcpForwarding no ClientAliveInterval 300 ClientAliveCountMax 3 EOF systemctl restart sshd # 5.3 Password policy (PAM) # /etc/security/pwquality.conf minlen = 14 dcredit = -1 ucredit = -1 ocredit = -1 lcredit = -1 # 5.4 User account settings # /etc/login.defs PASS_MAX_DAYS 365 PASS_MIN_DAYS 1 PASS_WARN_AGE 7 # Lock inactive accounts useradd -D -f 30
bash# Install and configure auditd apt install auditd audispd-plugins -y systemctl enable --now auditd # /etc/audit/rules.d/cis.rules cat > /etc/audit/rules.d/cis.rules << 'EOF' -w /etc/sudoers -p wa -k scope -w /etc/sudoers.d/ -p wa -k scope -w /var/log/sudo.log -p wa -k actions -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change -a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale -w /etc/group -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/shadow -p wa -k identity -w /var/log/faillog -p wa -k logins -w /var/log/lastlog -p wa -k logins -a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -k perm_mod -a always,exit -F arch=b64 -S unlink -S rmdir -S rename -k delete -w /sbin/insmod -p x -k modules -w /sbin/modprobe -p x -k modules -e 2 EOF augenrules --load # Configure rsyslog for remote logging echo "*.* @@syslog-server.corp.com:514" >> /etc/rsyslog.d/50-remote.conf systemctl restart rsyslog
bash# Install OpenSCAP apt install openscap-scanner scap-security-guide -y # Run CIS benchmark assessment oscap xccdf eval \ --profile xccdf_org.ssgproject.content_profile_cis_level1_server \ --results /tmp/cis_results.xml \ --report /tmp/cis_report.html \ /usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml # View HTML report in browser for detailed results
| Term | Definition | |------|-----------| | OpenSCAP | Open-source SCAP (Security Content Automation Protocol) scanner for automated compliance | | auditd | Linux audit framework for monitoring system calls and file access | | PAM | Pluggable Authentication Modules; configurable authentication framework for Linux | | sysctl | Linux kernel parameter configuration for network and system security tuning | | AIDE | Advanced Intrusion Detection Environment; file integrity checker for Linux |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 16,833 | 8,195 | -51% | 1 | 1 | 0% | 3,928 | 3,922 | -0% | 0 | 0 | — |
case-02 | fail→pass | 15,669 | 11,205 | -28% | 1 | 1 | 0% | 3,261 | 4,431 | +36% | 0 | 0 | — |
case-03 | fail→fail | 20,701 | 21,168 | +2% | 1 | 1 | 0% | 3,492 | 6,296 | +80% | 0 | 0 | — |
case-04 | fail→fail | 18,156 | 17,145 | -6% | 1 | 1 | 0% | 3,671 | 4,879 | +33% | 0 | 0 | — |
case-05 | fail→fail | 11,761 | 13,131 | +12% | 1 | 1 | 0% | 3,102 | 4,925 | +59% | 0 | 0 | — |
case-06 | fail→fail | 11,838 | 4,864 | -59% | 1 | 1 | 0% | 2,108 | 2,944 | +40% | 0 | 0 | — |
case-07 | fail→fail | 9,806 | 6,111 | -38% | 1 | 1 | 0% | 1,857 | 3,211 | +73% | 0 | 0 | — |
case-08 | fail→fail | 8,612 | 4,201 | -51% | 1 | 1 | 0% | 1,573 | 2,822 | +79% | 0 | 0 | — |
case-09 | fail→pass | 17,047 | 8,556 | -50% | 1 | 1 | 0% | 2,962 | 3,510 | +19% | 0 | 0 | — |
case-10 | fail→fail | 14,031 | 6,425 | -54% | 1 | 1 | 0% | 2,575 | 3,265 | +27% | 0 | 0 | — |
case-11 | fail→fail | 9,099 | 6,350 | -30% | 1 | 1 | 0% | 1,854 | 3,584 | +93% | 0 | 0 | — |
case-12 | fail→fail | 11,362 | 10,955 | -4% | 1 | 1 | 0% | 2,246 | 4,290 | +91% | 0 | 0 | — |
case-13 | fail→fail | 5,138 | 3,616 | -30% | 1 | 1 | 0% | 965 | 2,707 | +181% | 0 | 0 | — |
case-14 | fail→fail | 5,856 | 4,840 | -17% | 1 | 1 | 0% | 1,070 | 2,924 | +173% | 0 | 0 | — |
case-15 | fail→pass | 11,740 | 5,051 | -57% | 1 | 1 | 0% | 2,180 | 2,962 | +36% | 0 | 0 | — |
case-16 | fail→fail | 10,645 | 5,660 | -47% | 1 | 1 | 0% | 1,970 | 3,225 | +64% | 0 | 0 | — |
case-17 | fail→fail | 11,850 | 5,736 | -52% | 1 | 1 | 0% | 2,239 | 3,089 | +38% | 0 | 0 | — |
case-18 | pass→pass | 5,153 | 2,665 | -48% | 1 | 1 | 0% | 1,058 | 2,611 | +147% | 0 | 0 | — |
case-19 | fail→fail | 7,055 | 4,084 | -42% | 1 | 1 | 0% | 1,407 | 2,861 | +103% | 0 | 0 | — |
case-20 | fail→fail | 8,146 | 7,118 | -13% | 1 | 1 | 0% | 1,540 | 3,426 | +122% | 0 | 0 | — |
case-21 | fail→fail | 7,124 | 3,865 | -46% | 1 | 1 | 0% | 1,433 | 2,862 | +100% | 0 | 0 | — |
case-22 | fail→fail | 9,879 | 4,516 | -54% | 1 | 1 | 0% | 1,734 | 2,881 | +66% | 0 | 0 | — |
case-23 | fail→fail | 13,960 | 14,415 | +3% | 1 | 1 | 0% | 2,216 | 4,222 | +91% | 0 | 0 | — |
case-24 | fail→fail | 4,353 | 3,045 | -30% | 1 | 1 | 0% | 815 | 2,639 | +224% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.