-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add accounts_passwords_pam_tally2_file rule for default pam_tally2 ta…
…lly directory STIG requirement Also fixed some platform references
- Loading branch information
1 parent
0077fc6
commit db702a7
Showing
13 changed files
with
112 additions
and
7 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
47 changes: 47 additions & 0 deletions
47
...ts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_tally2_file/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,47 @@ | ||
documentation_complete: true | ||
|
||
title: 'SLEM 5 must use the default pam_tally2 tally directory.' | ||
|
||
description: |- | ||
This rule configures the system to use default pam_tally2 tally directory | ||
rationale: |- | ||
By limiting the number of failed logon attempts, the risk of unauthorized | ||
system access via user password guessing, otherwise known as | ||
brute-force attacks, is reduced. Limits are imposed by locking the account. | ||
severity: medium | ||
|
||
identifiers: | ||
cce@slmicro5: CCE-94089-0 | ||
|
||
references: | ||
disa: CCI-000044 | ||
nist@slmicro5: AC-7(a) | ||
srg: SRG-OS-000021-GPOS-00005 | ||
|
||
ocil_clause: 'file= is set to /var/log/tallylog or missing' | ||
|
||
ocil: |- | ||
Verify the location of the default tallylog file for the pam_tally2 module, | ||
with the following command | ||
<pre>$sudo grep -R pam_tally2 /etc/pam.d/login | grep "file=" | grep -v "^#"</pre> | ||
fixtext: |- | ||
Configure SLEM 5 to use the default pam_tally2 tally directory | ||
Modify the content of <tt>/etc/pam.d/login</tt>, like this: | ||
<pre>sudo sed -ri 's/\s+file=\S+\s+/ /g' /etc/pam.d/login</tt> </pre> | ||
platform: package[pam] | ||
|
||
template: | ||
name: pam_options | ||
vars: | ||
path: /etc/pam.d/login | ||
type: auth | ||
control_flag: required | ||
module: pam_tally2.so | ||
arguments: | ||
- argument: file | ||
argument_match: .* | ||
remove_argument: file= |
17 changes: 17 additions & 0 deletions
17
...assword_attempts/accounts_passwords_pam_tally2_file/tests/pam_tally2_file_default.fail.sh
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,17 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_slmicro5 | ||
|
||
cat >/etc/pam.d/common-account <<CAPTC | ||
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so | ||
account requisite pam_deny.so | ||
account required pam_tally2.so | ||
account required pam_permit.so | ||
CAPTC | ||
|
||
cat >/etc/pam.d/login <<CAPTUTC | ||
auth required pam_tally2.so file=/var/log/tallylog | ||
auth [success=1 default=ignore] pam_unix.so nullok_secure | ||
auth requisite pam_deny.so | ||
auth required pam_permit.so | ||
auth optional pam_cap.so | ||
CAPTUTC |
17 changes: 17 additions & 0 deletions
17
...ord_attempts/accounts_passwords_pam_tally2_file/tests/pam_tally2_file_non_default.fail.sh
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,17 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_slmicro5 | ||
|
||
cat >/etc/pam.d/common-account <<CAPTC | ||
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so | ||
account requisite pam_deny.so | ||
account required pam_tally2.so | ||
account required pam_permit.so | ||
CAPTC | ||
|
||
cat >/etc/pam.d/login <<CAPTUTA | ||
auth required pam_tally2.so file=/var/log/pam_tally2.log | ||
auth [success=1 default=ignore] pam_unix.so nullok_secure | ||
auth requisite pam_deny.so | ||
auth required pam_permit.so | ||
auth optional pam_cap.so | ||
CAPTUTA |
17 changes: 17 additions & 0 deletions
17
...rd_attempts/accounts_passwords_pam_tally2_file/tests/pam_tally2_file_unconfigured.pass.sh
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,17 @@ | ||
#!/bin/bash | ||
# platform = multi_platform_slmicro5 | ||
|
||
cat >/etc/pam.d/common-account <<CAPTC | ||
account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so | ||
account requisite pam_deny.so | ||
account required pam_tally2.so | ||
account required pam_permit.so | ||
CAPTC | ||
|
||
cat >/etc/pam.d/login <<CAPTUTC | ||
auth required pam_tally2.so deny=3 | ||
auth [success=1 default=ignore] pam_unix.so nullok_secure | ||
auth requisite pam_deny.so | ||
auth required pam_permit.so | ||
auth optional pam_cap.so | ||
CAPTUTC |
2 changes: 1 addition & 1 deletion
2
...cking_out_password_attempts/accounts_passwords_pam_tally2_file_selinux/ansible/shared.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
2 changes: 1 addition & 1 deletion
2
...m/locking_out_password_attempts/accounts_passwords_pam_tally2_file_selinux/bash/shared.sh
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
2 changes: 1 addition & 1 deletion
2
..._out_password_attempts/accounts_passwords_pam_tally2_file_selinux/tests/faillog_t.pass.sh
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
# packages = policycoreutils-python-utils | ||
# platform = multi_platform_slmicro | ||
# platform = multi_platform_slmicro5 | ||
|
||
semanage fcontext -m -t faillog_t "/var/log/tallylog" |
2 changes: 1 addition & 1 deletion
2
...king_out_password_attempts/accounts_passwords_pam_tally2_file_selinux/tests/tmp_t.fail.sh
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
# packages = policycoreutils-python-utils | ||
# platform = multi_platform_slmicro | ||
# platform = multi_platform_slmicro5 | ||
|
||
semanage fcontext -m -t tmp_t "/var/log/tallylog" | ||
restorecon -R -v "/var/log/tallylog" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -485,5 +485,4 @@ CCE-94084-1 | |
CCE-94085-8 | ||
CCE-94086-6 | ||
CCE-94087-4 | ||
CCE-94089-0 | ||
CCE-94090-8 |
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