5.1.7 Ensure No World Writable Folders Exist in the Library Folder

Information

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.

Folders in /System/Volumes/Data/Library should not be world-writable. The audit check excludes folders where the sticky bit is set by Apple. These folders are required by the operating system to run and should not be modified.

Some security vendors use a world-writable folder for their security extension tool. This will be considered compliant due to the tools themselves not allowing a user to write to their folders. This is against the standard practice on POSIX systems. It is considered compliant here because of additional security vendor controls that are controlled through industry standard mitigations.

Solution

Terminal Method:

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

% /usr/bin/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

Impact:

Applications that are not following standard practices, and have world-writable files in /System/Volumes/Data/Library may not launch or operate correctly after the remediation has been run. The vendor(s) of the software(s) should be notified so they can update their software(s) to follow standard practices. Organizations will have to make risk decisions on the continued operation of this software.

See Also

https://workbench.cisecurity.org/benchmarks/19973

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: 80976a242b944767db9337467e61b47b69bbec7830409b30a409fa7bf725f7f5