5.1.5 Ensure No World Writable Files Exist in the System Folder

Information

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.

Rationale:

Folders in /System/Volumes/Data/System should not be world-writable. The audit check excludes the 'Drop Box' folder that is part of Apple's default user template.

Impact:

Changing file permissions could disrupt the use of applications that rely on files in the System Folder with vulnerable permissions.

Solution

Terminal Method:
Run the following command to set permissions so that folders are not world-writable in the /System folder:

$ /usr/bin/sudo IFS=$'
'
for sysPermissions in $( /usr/bin/find /System/Volumes/Data/System -type d -perm -2 | /usr/bin/grep -v 'Drop Box' ); do
/bin/chmod -R o-w '$sysPermissions'
done

See Also

https://workbench.cisecurity.org/files/4176

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: Unix

Control ID: c7df0fa5ad1f3c01259efae51135d6a3209732198e09b5250ff82f32e6b31c0f