Check: GEN002060
SUSE Linux Enterprise Server v11 for System z STIG:
GEN002060
(in versions v1 r12 through v1 r9)
Title
All .rhosts, .shosts, .netrc, or hosts.equiv files must be accessible by only root or the owner. (Cat II impact)
Discussion
If these files are accessible by users other than root or the owner, they could be used by a malicious user to set up a system compromise.
Check Content
Procedure: # ls -l /etc/hosts.equiv # ls -l /etc/ssh/shosts.equiv # find / -name .rhosts # ls -al <home directory>/.rhosts # find / -name .shosts # ls -al <home directory>/.shosts # find / -name .netrc # ls -al <home directory>/.netrc If the .rhosts, .shosts, hosts.equiv, or shosts.equiv files have permissions greater than 600, then this is a finding. If the /etc/hosts.equiv, or /etc/ssh/shosts.equiv files are not owned by root, this is a finding. Any .rhosts, .shosts and .netrc files outside of home directories have no meaning and are not subject to this rule If the ~/.rhosts or ~/.shosts are not owned by the owner of the home directory where they are immediately located or by root, this is a finding.
Fix Text
Ensure the permission for these files is set to 600 or more restrictive and their owner is root or the same as the owner of the home directory in which they reside. Procedure: # chmod 600 /etc/hosts.equiv # chmod 600 /etc/ssh/shosts.equiv # chown root /etc/hosts.equiv # chown root /etc/ssh/shosts.equiv # find / -name .rhosts # chmod 600 /<home directory>/.rhosts # chown <home directory owner> <home directory>/.rhosts # find / -name .shosts # chmod 600 <directory location>/.shosts # chown <home directory owner> <home directory>/.shosts # find / -name .netrc # chmod 600 <directory location>/.netrc # chown <home directory owner> <home directory>/.netrc
Additional Identifiers
Rule ID: SV-45168r1_rule
Vulnerability ID: V-4428
Group Title: GEN002060
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000225 |
The organization employs the concept of least privilege, allowing only authorized accesses for users (and processes acting on behalf of users) which are necessary to accomplish assigned tasks in accordance with organizational missions and business functions. |
Controls
Number | Title |
---|---|
AC-6 |
Least Privilege |