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