Skip to content

Instantly share code, notes, and snippets.

@todmephis
todmephis / cis_centos7_hardening.sh
Last active March 30, 2024 23:51
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