Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new stig rule accounts_password_pam_pwquality_retry #12965

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/pam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ rules:
- accounts_password_pam_pwhistory_remember_system_auth
- accounts_password_pam_pwhistory_use_authtok
- accounts_password_pam_pwquality_password_auth
- accounts_password_pam_pwquality_retry
- accounts_password_pam_pwquality_system_auth
- accounts_password_pam_pwquality_enabled
- accounts_password_pam_retry
Expand Down
2 changes: 1 addition & 1 deletion controls/stig_rhel9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,7 @@ controls:
RHEL 9 must ensure the password complexity module in the system-auth file
is configured for three retries or less.
rules:
- accounts_password_pam_retry
- accounts_password_pam_pwquality_retry
- var_password_pam_retry=3
status: automated

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
srg_requirement: |-
{{{ full_name }}} must ensure the password complexity module in the system-auth file is configured for three retries or less.

vuldiscussion: |-
Use of a complex password helps to increase the time and resources required
to compromise the password. Password complexity, or strength, is a measure
of the effectiveness of a password in resisting attempts at guessing and
brute-force attacks. "pwquality" enforces complex password construction
configuration and has the ability to limit brute-force attacks on the
system.

{{{ full_name }}} uses "pwquality" as a mechanism to enforce password
complexity. This is set in both:

<tt>/etc/pam.d/password-auth</tt>
<tt>/etc/pam.d/system-auth</tt>

By limiting the number of attempts to meet the pwquality module complexity
requirements before returning with an error, the system will audit abnormal
attempts at password changes.

checktext: |-
Verify RHEL 9 is configured to limit the "pwquality" retry option to "3".
vojtapolasek marked this conversation as resolved.
Show resolved Hide resolved

Check for the use of the retry option in the security directory with the following command:

<pre>$ grep -w retry /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf</pre>

<pre>retry = 3</pre>

If the value of "retry" is set to "0" or greater than "3", or is missing,
this is a finding.


fixtext: |-
Add or update the following line in the "/etc/security/pwquality.conf" file
or a file in the "/etc/security/pwquality.conf.d/" directory to contain the
"retry" parameter:

<pre>retry = 3</pre>
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
documentation_complete: true


title: 'Ensure PAM Enforces Password Requirements - Authentication Retry Prompts Permitted Per-Session in /etc/security/pwquality.conf'

description: |-
To configure the number of retry prompts that are permitted per-session:
Edit the <tt>/etc/security/pwquality.conf</tt> to include
<tt>retry={{{xccdf_value("var_password_pam_retry") }}}</tt>, or a lower value if site
policy is more restrictive. The DoD requirement is a maximum of 3 prompts
per session.

rationale: |-
Setting the password retry prompts that are permitted on a per-session basis to a low value
requires some software, such as SSH, to re-connect. This can slow down and
draw additional attention to some types of password-guessing attacks. Note that this
is different from account lockout, which is provided by the pam_faillock module.

severity: medium

identifiers:
cce@rhel9: CCE-86502-2

references:
disa: CCI-004066,CCI-000192
srg: SRG-OS-000069-GPOS-00037

ocil_clause: 'the value of "retry" is set to "0" or greater than "{{{ xccdf_value("var_password_pam_retry") }}}", or is missing'

ocil: |-
Verify {{{ full_name }}} is configured to limit the "pwquality" retry option to {{{ xccdf_value("var_password_pam_retry") }}}.

Check for the use of the "pwquality" retry option in the pwquality.conf file with the following command:
<pre>$ grep retry /etc/security/pwquality.conf</pre>

template:
name: accounts_password
vars:
variable: retry
operation: less than or equal
ggbecker marked this conversation as resolved.
Show resolved Hide resolved
1 change: 0 additions & 1 deletion shared/references/cce-redhat-avail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ CCE-86498-3
CCE-86499-1
CCE-86500-6
CCE-86501-4
CCE-86502-2
CCE-86527-9
CCE-86530-3
CCE-86535-2
Expand Down
2 changes: 1 addition & 1 deletion tests/data/profile_stability/rhel9/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ selections:
- accounts_password_pam_ocredit
- accounts_password_pam_pwquality_password_auth
- accounts_password_pam_pwquality_system_auth
- accounts_password_pam_retry
- accounts_password_pam_pwquality_retry
- accounts_password_pam_ucredit
- accounts_password_pam_unix_rounds_password_auth
- accounts_password_pam_unix_rounds_system_auth
Expand Down
2 changes: 1 addition & 1 deletion tests/data/profile_stability/rhel9/stig_gui.profile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ selections:
- accounts_password_pam_ocredit
- accounts_password_pam_pwquality_password_auth
- accounts_password_pam_pwquality_system_auth
- accounts_password_pam_retry
- accounts_password_pam_pwquality_retry
- accounts_password_pam_ucredit
- accounts_password_pam_unix_rounds_password_auth
- accounts_password_pam_unix_rounds_system_auth
Expand Down
Loading