Check: GEN005521
HP-UX 11.31 STIG:
GEN005521
(in versions v1 r19 through v1 r13)
Title
The SSH daemon must restrict login ability to specific users and/or groups. (Cat II impact)
Discussion
Restricting SSH logins to a limited group of users, such as system administrators, prevents password guessing and other SSH attacks from reaching system accounts and other accounts not authorized for SSH access.
Check Content
Check the SSH daemon configuration. Note that keywords are case-insensitive and arguments (args) are case-sensitive. keyword(s)=DenyUsers, AllowUsers, DenyGroups, AllowGroups (order of precedence, most to least). arg(s)=<site specific> Default values for users/groups include: "<valid, space-separated user and/or group names. UID's/GIDs are not allowed/valid>". Lack of keyword(s) in the configuration file will result in allowing ssh access to all users and all groups. A typical installation should either include an allow (users/groups) list or deny (users/groups) list depending on what the defined site security requirements are. Note: When the default "arg" value exactly matches the required "arg" value (see above), the <keyword=arg> entry is not required to exist (commented or uncommented) in the ssh (client) or sshd (server) configuration file. While not required, it is recommended that the configuration file(s) be populated with all keywords and assigned arg values as a means to explicitly document the ssh(d) binary's expected behavior. Examine the file. # cat /opt/ssh/etc/sshd_config | tr '\011' ' ' | tr -s ' ' | sed -e 's/^[ \t]*//' | grep -v '^#' | egrep -i "DenyUsers|AllowUsers|DenyGroups|AllowGroups" If keyword(s) with valid, space-separated user(s) and/or group(s) are not returned, this is a finding.
Fix Text
Edit the SSH daemon configuration and add the appropriate keyword directive(s) and space-separated user/group names. The keyword order of precedence is as follows: DenyUsers, AllowUsers, DenyGroups, AllowGroups
Additional Identifiers
Rule ID: SV-35052r1_rule
Vulnerability ID: V-22470
Group Title: GEN005521
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 |