用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu1604-v200-1-4-2命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-ubuntu1604-v200-1-4-2 |
| description | Ensure bootloader password is set |
| category | cis-iam |
| version | 2.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-16.04","bootloader","grub","password","secure-boot"] |
| cis_id | 1.4.2 |
| cis_benchmark | CIS Ubuntu Linux 16.04 LTS Benchmark v2.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.
Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off AppArmor at boot time).
If password protection is enabled, only the designated superuser can edit a Grub 2 menu item by pressing "e" or access the GRUB 2 command line by pressing "c".
If GRUB 2 is set up to boot automatically to a password-protected menu entry the user has no option to back out of the password prompt to select another menu entry. Holding the SHIFT key will not display the menu in this case. The user must enter the correct username and password. If unable, the configuration files will have to be edited via the LiveCD or other means to fix the problem.
You can add --unrestricted to the menu entries to allow the system to boot without entering a password. Password will still be required to edit menu items.
More Information: https://help.ubuntu.com/community/Grub2/Passwords
Run the following commands and verify output matches:
grep "^set superusers" /boot/grub/grub.cfg
Expected output: set superusers="<username>"
grep "^password" /boot/grub/grub.cfg
Expected output: password_pbkdf2 <username> <encrypted-password>
The set superusers and password_pbkdf2 lines should be present in /boot/grub/grub.cfg.
Create an encrypted password with grub-mkpasswd-pbkdf2:
grub-mkpasswd-pbkdf2
Enter password: <password>
Reenter password: <password>
PBKDF2 hash of your password is <encrypted-password>
Add the following into a custom /etc/grub.d configuration file:
cat <<EOF
set superusers="<username>"
password_pbkdf2 <username> <encrypted-password>
EOF
The superuser/user information and password should not be contained in the /etc/grub.d/00_header file as this file could be overwritten in a package update.
If there is a requirement to be able to boot/reboot without entering the password, edit /etc/grub.d/10_linux and add --unrestricted to the line CLASS=
Example:
CLASS="--class gnu-linux --class gnu --class os --unrestricted"
Run the following command to update the grub2 configuration:
update-grub
This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.
Replace /boot/grub/grub.cfg with the appropriate grub configuration file for your environment.
None.
| Controls Version | Control |
|---|---|
| v7 | 5.1 Establish Secure Configurations |
Automated