用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu2004-v300-7-1-11命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
macOS post-exploitation for credential harvesting, DTrace monitoring, TCC bypass, and stealth operations via native tools
Windows userland post-exploitation for credential harvesting, monitoring, AMSI/ETW bypass, and stealth operations
Kubernetes post-exploitation for container escape, secret extraction, RBAC abuse, and cluster persistence
正在显示 SKILL.md
基于 SOC 职业分类
| name | cis-ubuntu2004-v300-7-1-11 |
| description | Ensure world writable files and directories are secured |
| category | cis-iam |
| version | 3.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-20.04","file-permissions"] |
| cis_id | 7.1.11 |
| cis_benchmark | CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
World writable files are the least secure. Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity. See the chmod(2) man page for more information.
Setting the sticky bit on world writable directories prevents users from deleting or renaming files in that directory that are not owned by them.
Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity.
This feature prevents the ability to delete or rename files in world writable directories (such as /tmp) that are owned by another user.
None
Run the following script to verify:
#!/usr/bin/env bash
{
l_output="" l_output2=""
l_smask='01000'
a_file=(); a_dir=() # Initialize arrays
a_path=(! -path "/run/user/*" -a ! -path "/proc/*" -a ! -path "*/containerd/*" -a ! -path "*/kubelet/pods/*" -a ! -path "*/kubelet/plugins/*" -a ! -path "/sys/*" -a ! -path "/snap/*")
while IFS= read -r l_mount; do
while IFS= read -r -d $'\0' l_file; do
if [ -e "$l_file" ]; then
[ -f ] && a_file+=()
[ -d ];
l_mode=
[ ! $(( & )) -gt 0 ] && a_dir+=()
< <(find -xdev \( \) \( - f -o - d \) -perm -0002 -print0 2>/dev/null)
< <(findmnt -Dkerno fstype,target | awk )
! (( > ));
l_output=
l_output2=
! (( > ));
l_output=
l_output2=
a_path; a_arr; a_file; a_dir
[ -z ];
-e
-e
[ -n ] && -e
}
Note: On systems with a large number of files and/or directories, this audit may be a long running process.
PASS -- No world writable files exist and sticky bit is set on all world writable directories.
other with the command (chmod o-w <filename>), but always consult relevant vendor documentation to avoid breaking any application dependencies on a given file.chmod a+t <directory_name>)Run the following script to:
#!/usr/bin/env bash
{
l_smask='01000'
a_file=(); a_dir=() # Initialize arrays
a_path=(! -path "/run/user/*" -a ! -path "/proc/*" -a ! -path "*/containerd/*" -a ! -path "*/kubelet/pods/*" -a ! -path "*/kubelet/plugins/*" -a ! -path "/sys/*" -a ! -path "/snap/*")
while IFS= read -r l_mount; do
while IFS= read -r -d $'\0' l_file; do
if [ -e "$l_file" ]; then
l_mode="$(stat -Lc '%#a' "$l_file")"
if [ -f "$l_file" ]; then # Remove excess permissions from WW files
echo -e " - File: \"$l_file\" is mode: \"$l_mode\"\n - removing write permission on \"$l_file\" from \"other\""
chmod o-w "$l_file"
fi
if [ -d "$l_file" ]; then # Add sticky bit
if [ ! $(( $l_mode & $l_smask )) -gt 0 ]; then
echo -e " - Directory: \"$l_file\" is mode: \"$l_mode\" and doesn't have the sticky bit set\n - Adding the sticky bit"
chmod a+t "$l_file"
fi
fi
fi
done < <(find "$l_mount" -xdev \( "${a_path[@]}" \) \( -type f -o -type d \) -perm -0002 -print0 2>/dev/null)
done < <(findmnt -Dkerno fstype,target | awk '{$1 !~ /^\s*(nfs|proc|smb|vfat|iso9660|efivarfs|selinuxfs)/ && $2 !~ /^(\/run\/user\/|\/tmp|\/var\/tmp)/(print $2}')
}
N/A
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 3.3 Configure Data Access Control Lists | X | X | X |
| v7 | 14.6 Protect Information through Access Control Lists | X | X | X |
MITRE ATT&CK Mappings:
| Techniques / Sub-techniques | Tactics | Mitigations |
|---|---|---|
| T1222, T1222.002, T1548 | TA0004, TA0005 | M1022, M1028 |