4.7.2.2 Verify Trust of suid, sgid, acl, and trusted-bit files and programs

Information

The system is audited for both suid and sgid files and programs.

Rationale:

An audit should be performed on the system to search for the presence of both suid and sgid files and programs. In order to prevent these files from being potentially exploited the suid and sgid permissions should be removed wherever possible.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

Review the currently mounted filesystems:

mount

Un-mount all non-local filesystems and cdrom media:

unmount <mount point>

If there are non-local filesystems which cannot be un-mounted, use the following to find all suid and sgid files on local JFS/JFS2 filesystems only:

find / ( -fstype jfs -o -fstype jfs2 ) ( -perm -04000 -o -perm -02000 ) -type f -ls

If all non-local filesystems have been un-mounted:

find / ( -perm -04000 -o -perm -02000 ) -type f -ls

Review the files and where possible, use the chmod command to remove the appropriate suid or sgid bits:

chmod u-s <file>
chmod g-s <file>

Default Value:

N/A

Additional Information:

Reversion:

Use the chmod command to re-instate the suid and sgid bits to the relevant files:

chmod u+s <file>

chmod g+s <file>

See Also

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

Item Details

Category: CONFIGURATION MANAGEMENT, SYSTEM AND SERVICES ACQUISITION

References: 800-53|CM-2, 800-53|CM-6, 800-53|CM-7, 800-53|CM-7(1), 800-53|CM-9, 800-53|SA-3, 800-53|SA-8, 800-53|SA-10, CSCv7|5.1

Plugin: Unix

Control ID: 02cbe578f978fb3106b9806cb9af176b98282650e16f33920012d30116a530d6