macOS
TMA-MACOS-5.1.7
Ensure No World Writable Folders Exist in the Library Folder
高级别 2自动化macos
说明
Software sometimes insists on being installed in the /System/Volumes/Data/Library directory and has inappropriate world-writable permissions. This software could be compromised with the folder(s) being world-writable by unauthorized actions.
检查方式
审计方法: Shell 命令
shell
[ -d /System/Volumes/Data ] || exit 1
/usr/bin/find /Library -type d -perm -002 ! -perm -1000 ! -xattrname com.apple.rootless 2>/dev/null | /usr/bin/grep -vE "/Library/AppStore" | /usr/bin/wc -l | /usr/bin/xargs- 预期输出
0
修复方式
修复方法: 操作指南或基础设施补丁
Terminal: sudo IFS=$'\n' for libPermissions in $(/usr/bin/find /Library -type d -perm -002 ! -perm -1000 ! -xattrname com.apple.rootless 2>/dev/null); do /bin/chmod -R o-w "$libPermissions" done.
属性
- 操作系统
- macos-26
- 标签
- macossystem-access
- 参考
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.1.7 Ensure No World Writable Folders Exist in the Library Folder
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target macos --level 2