用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu1804-v220-5-2-3-20命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-ubuntu1804-v220-5-2-3-20 |
| description | Ensure the audit configuration is immutable |
| 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 | {} |
Set system audit so that audit rules cannot be modified with auditctl. Setting the flag -e 2 forces audit to be put in immutable mode. Audit changes can only be made on system reboot.
In immutable mode, unauthorized users cannot execute changes to the audit system to potentially hide malicious activity and then put the audit rules back. Users would most likely notice a system reboot and that could alert administrators of an attempt to make unauthorized audit changes.
Once this setting is enabled, the audit daemon is locked in enabled mode and cannot be disabled until the system is rebooted. Also, audit rules cannot be changed until the system is rebooted. This creates difficulty in troubleshooting audit-related issues, as the administrator will need to reboot the system to make any changes to the audit configuration.
grep -Ph -- '^\h*-e\h+2\b' /etc/audit/rules.d/*.rules | tail -1
Expected Output:
-e 2
auditctl -l | grep -P -- '^-e\h+2\b'
Expected Output:
-e 2
Edit or create a file in the /etc/audit/rules.d/ directory ending in .rules.
Add the following line to the end of the file:
-e 2
Example:
printf -- "-e 2\n" >> /etc/audit/rules.d/99-finalize.rules
Merge and load the rules into active configuration:
augenrules --load
Note: This setting will NOT be loaded into the running configuration until the system is rebooted. To verify the setting is configured properly, run the audit check after a system reboot.
Setting the audit configuration to immutable mode requires a system reboot to take effect. Once enabled, audit rules cannot be modified until the next system reboot. This is by design to prevent unauthorized modification of audit rules.
For performance (man 7 audit.rules) reasons it is preferable to have all the system calls on one line. However, your configuration may have them on one line each or some other combination. This is important to understand for both the auditing and remediation sections as the examples given are optimized for performance as per the man page.
If you need to make changes to audit rules after setting immutable mode, you will need to:
-e 2 rule is loaded-e 2 rule is the last rule in your configuration files