-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12906 from alanmcanonical/ubt24_53313
Ubuntu 24.04: Implement rule 5.3.3.1.3 Ensure password failed attempts lockout includes root account
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...m/locking_out_password_attempts/accounts_passwords_pam_faillock_root_unlock_time/rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
documentation_complete: true | ||
|
||
|
||
title: 'Set Root Lockout Time for Failed Password Attempts' | ||
|
||
description: |- | ||
This rule configures the system to lock out root during a specified time period after a | ||
number of incorrect login attempts using <tt>pam_faillock.so</tt>. | ||
Ensure that the file <tt>/etc/security/faillock.conf</tt> contains the following entry: | ||
<tt>root_unlock_time=<interval-in-seconds></tt> where | ||
<tt>interval-in-seconds</tt> is <tt>{{{xccdf_value("var_accounts_passwords_pam_faillock_unlock_time") }}}</tt> or greater. | ||
If <tt>root_unlock_time</tt> is set to <tt>0</tt>, it may enable attacker to | ||
apply denial of service to legitimate users. | ||
rationale: |- | ||
By limiting the number of failed logon attempts the risk of unauthorized root | ||
access via password guessing, otherwise known as brute-forcing, is reduced. | ||
Limits are imposed by locking the account. | ||
severity: medium | ||
|
||
platform: package[pam] | ||
|
||
template: | ||
name: pam_account_password_faillock | ||
vars: | ||
prm_name: root_unlock_time | ||
prm_regex_conf: ^[\s]*root_unlock_time[\s]*=[\s]*([0-9]+) | ||
prm_regex_pamd: ^[\s]*auth[\s]+.+[\s]+pam_faillock.so[\s]+[^\n]*root_unlock_time=([0-9]+) | ||
ext_variable: var_accounts_passwords_pam_faillock_unlock_time | ||
description: The unlock time after number of failed logins should be set correctly. | ||
variable_lower_bound: use_ext_variable |