Check: AZLX-23-001240
Amazon Linux 2023 STIG:
AZLX-23-001240
(in version v1 r1)
Title
Amazon Linux 2023 must not permit direct logons to the root account using remote access via SSH. (Cat II impact)
Discussion
To ensure individual accountability and prevent unauthorized access, organizational users must be individually identified and authenticated. Additionally, an additional layer of security is gained by extending the policy of not logging directly on as root, even though the communications channel may be encrypted. A group authenticator is a generic account used by multiple individuals. Use of a group authenticator alone does not uniquely identify individual users. Examples of the group authenticator is the Unix OS "root" user account, the Windows "Administrator" account, the "sa" account, or a "helpdesk" account. For example, the Unix and Windows operating systems offer a "switch user" capability allowing users to authenticate with their individual credentials and, when needed, switch" to the administrator role. This method provides for unique individual authentication prior to using a group authenticator. Users (and any processes acting on behalf of users) need to be uniquely identified and authenticated for all accesses other than those accesses explicitly identified and documented by the organization, which outlines specific user actions that can be performed on Amazon Linux 2023 without identification or authentication. Requiring individuals to be authenticated with an individual authenticator prior to using a group authenticator allows for traceability of actions, as well as adding an additional level of protection of the actions that can be taken with group account knowledge.
Check Content
Verify Amazon Linux 2023 remote access using SSH prevents users from logging on directly as "root" with the following command: $ sudo grep -ir PermitRootLogin /etc/ssh/sshd_config /etc/ssh/sshd_config.d/ /etc/ssh/sshd_config:PermitRootLogin no If the "PermitRootLogin" keyword is set to "yes", is missing, or is commented out, this is a finding.
Fix Text
Configure Amazon Linux 2023 to prevent SSH users from logging on directly as root add or modify the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d". PermitRootLogin no Restart the SSH daemon for the settings to take effect: $ sudo systemctl restart sshd.service
Additional Identifiers
Rule ID: SV-274049r1120135_rule
Vulnerability ID: V-274049
Group Title: SRG-OS-000109-GPOS-00056
Expert Comments
CCIs
| Number | Definition |
|---|---|
| CCI-004045 |
Require users to be individually authenticated before granting access to the shared accounts or resources. |
Controls
| Number | Title |
|---|---|
| IA-2(5) |
Individual Authentication with Group Authentication |