macOS
TMA-MACOS-5.1.6
Ensure No World Writable Folders Exist in the System Folder
高等級 1自動化macos
說明
Software sometimes insists on being installed in the /System/Volumes/Data/System Directory and has inappropriate world-writable permissions. Macs with writable files in System should be investigated forensically. A file with open writable permissions is a sign of at best a rogue application. It could also be a sign of a computer compromise and a persistent presence on the system.
檢查方式
稽核方法: Shell 指令
shell
[ -d /System/Volumes/Data/System ] || exit 1
/usr/bin/find /System/Volumes/Data/System -type d -perm -2 -ls 2>/dev/null | /usr/bin/grep -vE "downloadDir|locks" | /usr/bin/wc -l | /usr/bin/xargs- 預期輸出
0
修補方式
修補方法: 操作指南或基礎設施修補檔
Terminal: IFS=$'\n' for sysPermissions in $( sudo /usr/bin/find /System/Volumes/Data/System -type d -perm -2 2>/dev/null | /usr/bin/grep -vE "downloadDir|locks" ); do /bin/chmod -R o-w "$sysPermissions" done.
屬性
- 作業系統
- macos-26
- 標籤
- macossystem-access
- 參考資料
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.1.6 Ensure No World Writable Folders Exist in the System Folder
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
shell
tmaegis scan --target macos