The Red Hat Enterprise Linux operating system must be configured so that local initialization files do not execute world-writable programs.

From Red Hat Enterprise Linux 7 Security Technical Implementation Guide

Part of SRG-OS-000480-GPOS-00227

Associated with: CCI-000366

SV-86661r2_rule The Red Hat Enterprise Linux operating system must be configured so that local initialization files do not execute world-writable programs.

Vulnerability discussion

If user start-up files execute world-writable programs, especially in unprotected directories, they could be maliciously modified to destroy user files or otherwise compromise the system at the user level. If the system is compromised at the user level, it is easier to elevate privileges to eventually compromise the system at the root and network level.

Check content

Verify that local initialization files do not execute world-writable programs. Check the system for world-writable files with the following command: # find / -xdev -perm -002 -type f -exec ls -ld {} \; | more For all files listed, check for their presence in the local initialization files with the following commands: Note: The example will be for a system that is configured to create users' home directories in the "/home" directory. # grep /home/*/.* If any local initialization files are found to reference world-writable files, this is a finding.

Fix text

Set the mode on files being executed by the local initialization files with the following command: # chmod 0755

Pro Tips

Lavender hyperlinks in small type off to the right (of CSS class id, if you view the page source) point to globally unique URIs for each document and item. Copy the link location and paste anywhere you need to talk unambiguously about these things.

You can obtain data about documents and items in other formats. Simply provide an HTTP header Accept: text/turtle or Accept: application/rdf+xml.

Powered by sagemincer