Skip to content

Instantly share code, notes, and snippets.

@todmephis
todmephis / cis_centos7_hardening.sh
Last active February 26, 2025 10:00
Hardening CentOS 7 CIS script
#!/bin/bash
MODPROBEFILE="/etc/modprobe.d/CIS.conf"
#MODPROBEFILE="/tmp/CIS.conf"
ANSWER=0
analyze_part () {
if [ "$#" != "1" ]; then
options="$(echo $@ | awk 'BEGIN{FS="[()]"}{print $2}')"
echo "[+]$@"
apply_part_rule $1