用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu1804-v220-5-2-3-21命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-ubuntu1804-v220-5-2-3-21 |
| description | Ensure the running and on disk configuration is the same |
| version | 2.2.0 |
| category | cis-logging |
| tags | ["cis","ubuntu","linux","ubuntu-18.04","auditing","auditd"] |
| author | CIS Benchmarks |
| target | {"platform":"linux","version":"18.04"} |
| severity_boost | {} |
Verify that the running configuration matches what is defined in the on-disk audit configuration files.
The audit system can operate in several modes:
It is important to verify that the running audit configuration matches the on-disk configuration to ensure that all required audit rules are actively monitoring system events.
If the running audit configuration differs from the on-disk configuration, critical audit rules may not be active, leading to gaps in security monitoring and compliance violations. This could allow unauthorized activities to go undetected.
None. This is a verification check to ensure consistency between running and on-disk configurations.
# Check if audit is enabled
auditctl -s | grep enabled
# Check running rule count
auditctl -l | wc -l
# Check on-disk rule count (excluding comments and blank lines)
cat /etc/audit/rules.d/*.rules | grep -v '^#' | grep -v '^$' | wc -l
# Detailed comparison (optional)
diff <(auditctl -l | sort) <(cat /etc/audit/rules.d/*.rules | augenrules --check | sort)
Expected Behavior:
enabled 1 or enabled 2)if [[ $(auditctl -s | grep "enabled") =~ "2" ]]; then
printf "Audit is in immutable mode - reboot required to load new rules\n"
fi
If the running configuration differs from the on-disk configuration, load the rules:
# Merge and load all rules from /etc/audit/rules.d/
augenrules --load
auditctl -l
If audit is configured in immutable mode (-e 2), you must reboot the system to apply any changes:
# Check if immutable mode is enabled
if [[ $(auditctl -s | grep "enabled") =~ "2" ]]; then
printf "Reboot required to load rules\n"
# Schedule reboot (optional)
# shutdown -r +5 "Rebooting to apply audit configuration changes"
fi
-e 1) before setting to immutable mode (-e 2)If the auditing configuration is locked (-e 2), then augenrules will not warn in any way that rules could not be loaded into the running configuration. A system reboot will be required to load the rules into the running configuration.
Running and on-disk configurations may differ due to:
auditctl (not persisted to disk)/etc/audit/rules.d/*.rules files without running augenrules --loadIf rules fail to load:
systemctl status auditdjournalctl -u auditdaugenrules --check