소스 정보
- 저장소
- CyberStrikeus/CyberStrike
- 최근 소스 활동
- 2026년 4월 22일 14:54
- 감지된 SKILL.md 언어
- 영어
- 스타
- 1,653
- 포크
- 254
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu2004-v300-7-2-9명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | cis-ubuntu2004-v300-7-2-9 |
| description | Ensure local interactive user home directories are configured |
| category | cis-iam |
| version | 3.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-20.04","users"] |
| cis_id | 7.2.9 |
| cis_benchmark | CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
The user home directory is space defined for the particular user to set local environment variables and to store personal files. While the system administrator can establish secure permissions for users' home directories, the users can easily override these. Users can be defined in /etc/passwd without a home directory or with a home directory that does not actually exist.
Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory. Group or world-writable user home directories may enable malicious users to steal or modify other users' data or to gain another user's system privileges. If the user's home directory does not exist or is unassigned, the user will be placed in "/" and will not be able to write any files or have local environment variables set.
None
Run the following script to Ensure:
#!/usr/bin/env bash
{
a_output=() a_output2=() a_exists2=() a_mode2=() a_owner2=()
l_valid_shells="^$(awk -F\/ '$NF != "nologin" {print}' /etc/shells | sed -rn '/^\//{s,/,\\/,g;p}' | paste -s -d '|' - ))$"
l_mask='0027'; l_max="$(printf '%o' $(( 0777 & ~$l_mask)) )"
l_users="$(awk -v pat="$l_valid_shells" -F: '$(NF) ~ pat { print $1 " " $(NF-1) }' /etc/passwd | wc -l)"
[ "$l_users" -gt 10000 ] && printf '%s\n' "" " ** INFO **" \
" $l_users Local interactive users found on the system"
IFS= -r l_user l_home;
[ -d ];
IFS=: -r l_own l_mode;
[ != ] && a_owner2+=()
[ $(( & )) -gt 0 ] && a_mode2+=()
<<<
a_exists2+=()
<<<
[ -gt 0 ] && a_output2+=() || \
a_output+=()
[ -gt 0 ] && a_output2+=() || \
a_output+=()
[ -gt 0 ] && a_output2+=() || \
a_output+=()
[ -le 0 ];
[ -gt 0 ] &&
}
PASS -- All interactive users home directories exist, are mode 750 or more restrictive, and are owned by the user.
If a local interactive users' home directory is undefined and/or doesn't exist, follow local site policy and perform one of the following:
/etc/passwd and add the absolute path to the directory to the last field of the user.Run the following script to:
#!/usr/bin/env bash
{
a_output2=() a_output3=()
l_valid_shells="^$(awk -F\/ '$NF != "nologin" {print}' /etc/shells | sed -rn '/^\//{s,/,\\/,g;p}' | paste -s -d '|' - ))$"
l_mask='0027'; l_max="$(printf '%o' $(( 0777 & ~$l_mask)) )"
l_users="$(awk -v pat="$l_valid_shells" -F: '$(NF) ~ pat { print $1 " " $(NF-1) }' /etc/passwd | wc -l)"
[ "$l_users" -gt 10000 ] && printf '%s\n' "" " ** INFO **" \
" $l_users Local interactive users found on the system" " This may be a long running check" " **********"
while IFS=" " read -r l_user l_home; do
if [ -d "$l_home" ]; then
while IFS=: read -r l_own l_mode; do
if [ "$l_user" != "$l_own" ]; then
a_owner2+=(" - User: \"$l_user\" Home \"$l_home\" is owned by: \"$l_own\"" \
" changing owner to: \"$l_user\"") && chown "$l_user" "$l_home"
fi
if [ $(( $l_mode & $l_mask )) -gt 0 ]; then
a_mode2+=(" - User: \"$l_user\" Home \"$l_home\" is mode: \"$l_mode\"" \
" changing to mode: \"$l_max\" or more restrictive")
chmod g-w,o-rwx "$l_home"
fi
done <<< "$(stat -Lc '%U:%#a' "$l_home")"
else
a_exists2+=(" - User: \"$l_user\" Home Directory: \"$l_home\" Doesn't exist")
fi
done <<< "$(awk -v pat="$l_valid_shells" -F: '$(NF) ~ pat { print $1 " " $(NF-1) }' /etc/passwd)"
[ "${#a_exists2[@]}" -gt 0 ] && a_output2+=("${a_exists2[@]}")
[ "${#a_mode2[@]}" -gt 0 ] && a_output2+=("${a_mode2[@]}")
[ "${#a_owner2[@]}" -gt 0 ] && a_output2+=("${a_owner2[@]}")
if [ "${#a_output2[@]}" -gt 0 ]; then
printf '%s\n' "" "${a_output2[@]}"
else
printf '%s\n' "" "- No changes required"
fi
}
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 | TA0005 | M1022 |