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

Slmicro5 stig add accounts and services rules support #12297

Merged
Show file tree
Hide file tree
Changes from 11 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
49 changes: 31 additions & 18 deletions controls/stig_slmicro5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,17 @@ controls:
levels:
- medium
title: The sticky bit must be set on all SLEM 5 world-writable directories.
rules: []
status: pending
rules:
- dir_perms_world_writable_sticky_bits
status: automated

- id: SLEM-05-232115
levels:
- medium
title: SLEM 5 must prevent unauthorized users from accessing system error messages.
rules: []
status: pending
rules:
- file_permissions_local_var_log_messages
status: automated

- id: SLEM-05-232120
levels:
Expand Down Expand Up @@ -600,17 +602,21 @@ controls:
title:
SLEM 5 must be configured so that all network connections associated with
SSH traffic terminate after becoming unresponsive.
rules: []
status: pending
rules:
- sshd_set_keepalive
- var_sshd_set_keepalive=1
status: automated

- id: SLEM-05-255035
levels:
- medium
title:
SLEM 5 must be configured so that all network connections associated with
SSH traffic are terminated after 10 minutes of becoming unresponsive.
rules: []
status: pending
rules:
- sshd_set_idle_timeout
- sshd_idle_timeout_value=10_minutes
status: automated

- id: SLEM-05-255040
levels:
Expand Down Expand Up @@ -639,17 +645,20 @@ controls:
title:
SLEM 5 SSH daemon must be configured to only use Message Authentication Codes
(MACs) employing FIPS 140-2/140-3 approved cryptographic hash algorithms.
rules: []
status: pending
rules:
- sshd_use_approved_macs_ordered_stig
- sshd_use_approved_macs
status: automated

- id: SLEM-05-255055
levels:
- high
title:
SLEM 5 SSH server must be configured to use only FIPS 140-2/140-3 validated
key exchange algorithms.
rules: []
status: pending
rules:
- sshd_use_approved_kex_ordered_stig
status: automated

- id: SLEM-05-255060
levels:
Expand Down Expand Up @@ -853,8 +862,9 @@ controls:
title:
SLEM 5 must disable account identifiers (individuals, groups, roles, and
devices) after 35 days of inactivity after password expiration.
rules: []
status: pending
rules:
- account_disable_post_pw_expiration
status: automated

- id: SLEM-05-411075
levels:
Expand Down Expand Up @@ -1100,8 +1110,9 @@ controls:
levels:
- medium
title: SLEM 5 must employ a password history file.
rules: []
status: pending
rules:
- file_etc_security_opasswd
status: automated

- id: SLEM-05-611080
levels:
Expand All @@ -1127,8 +1138,10 @@ controls:
title:
SLEM 5 must employ FIPS 140-2/140-3 approved cryptographic hashing algorithm
for system authentication (login.defs).
rules: []
status: pending
rules:
- set_password_hashing_algorithm_logindefs
- var_password_hashing_algorithm=SHA512
status: automated

- id: SLEM-05-611095
levels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<criteria comment="sshd is not installed" operator="AND">
<extend_definition comment="sshd is not required or requirement is unset"
definition_ref="sshd_not_required_or_unset" />
{{% if product in ['opensuse', 'sle12', 'sle15'] %}}
{{% if product in ['opensuse', 'sle12', 'sle15', 'slmicro5'] %}}
<extend_definition comment="rpm package openssh removed"
definition_ref="package_openssh_removed" />
{{% else %}}
Expand All @@ -18,7 +18,7 @@
<criteria comment="sshd is installed and configured" operator="AND">
<extend_definition comment="sshd is required or requirement is unset"
definition_ref="sshd_required_or_unset" />
{{% if product in ['opensuse', 'sle12', 'sle15'] %}}
{{% if product in ['opensuse', 'sle12', 'sle15', 'slmicro5'] %}}
<extend_definition comment="rpm package openssh installed"
definition_ref="package_openssh_installed" />
{{% else %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ identifiers:
cce@rhel10: CCE-90362-5
cce@sle12: CCE-83027-3
cce@sle15: CCE-83281-6
cce@slmicro5: CCE-93692-2

references:
cis-csc: 1,12,13,14,15,16,18,3,5,7,8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ identifiers:
cce@rhel10: CCE-86794-5
cce@sle12: CCE-83034-9
cce@sle15: CCE-91228-7
cce@slmicro5: CCE-93694-8

references:
cis-csc: 1,12,13,14,15,16,18,3,5,7,8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_ubuntu
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_ubuntu
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

KEX_ALGOS="ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,\
diffie-hellman-group-exchange-sha256"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{% if product in ['ol8','rhel8'] %}}
{{% if product in ['ol8', 'rhel8'] %}}
{{% set path='/etc/crypto-policies/back-ends/opensshserver.config' %}}
{{% set prefix_conf="^\s*CRYPTO_POLICY\s*=.*-oKexAlgorithms=" %}}
{{% set kex_algos=["ecdh-sha2-nistp256","ecdh-sha2-nistp384",
"ecdh-sha2-nistp521","diffie-hellman-group-exchange-sha256",
"diffie-hellman-group14-sha256","diffie-hellman-group16-sha512",
"diffie-hellman-group18-sha512"] %}}
{{% set sufix_conf="(\s.*)?'" %}}
{{% elif product in ['ol7', 'sle12','sle15','ubuntu2004'] %}}
{{% elif product in ['ol7', 'sle12', 'sle15', 'slmicro5', 'ubuntu2004'] %}}
{{% set path='/etc/ssh/sshd_config' %}}
{{% set prefix_conf="^\s*KexAlgorithms\s*" %}}
{{% set kex_algos=["ecdh-sha2-nistp256","ecdh-sha2-nistp384","ecdh-sha2-nistp521",
Expand All @@ -26,7 +26,7 @@
<criteria comment="sshd is not installed" operator="AND">
<extend_definition comment="sshd is not required or requirement is unset"
definition_ref="sshd_not_required_or_unset" />
{{% if product in ['sle12', 'sle15'] %}}
{{% if product in ['sle12', 'sle15', 'slmicro5'] %}}
<extend_definition comment="package openssh removed"
definition_ref="package_openssh_removed" />
{{% else %}}
Expand All @@ -37,7 +37,7 @@
<criteria comment="sshd is installed and configured" operator="AND">
<extend_definition comment="sshd is required or requirement is unset"
definition_ref="sshd_required_or_unset" />
{{% if product in ['sle12', 'sle15'] %}}
{{% if product in ['sle12', 'sle15', 'slmicro5'] %}}
<extend_definition comment="package openssh installed"
definition_ref="package_openssh_installed" />
{{% else %}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{% if product in ['ol8','rhel8'] %}}
{{% if product in ['ol8', 'rhel8'] %}}
{{% set path='/etc/crypto-policies/back-ends/opensshserver.config' %}}
{{% set conf="CRYPTO_POLICY='-oKexAlgorithms=ecdh-sha2-nistp256,ecdh-sha2-nistp384" ~
",ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256" ~
Expand All @@ -8,7 +8,7 @@
{{% set path='/etc/ssh/sshd_config' %}}
{{% set conf="KexAlgorithms ecdh-sha1-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521" ~
",diffie-hellman-group-exchange-sha256" %}}
{{% elif product in ['sle12','sle15','ubuntu2004', 'ubuntu2204'] %}}
{{% elif product in ['sle12', 'sle15', 'slmicro5', 'ubuntu2004', 'ubuntu2204'] %}}
{{% set path='/etc/ssh/sshd_config' %}}
{{% set conf="KexAlgorithms ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521" ~
",diffie-hellman-group-exchange-sha256" %}}
Expand Down Expand Up @@ -39,6 +39,7 @@ identifiers:
cce@rhel8: CCE-86059-3
cce@sle12: CCE-92336-7
cce@sle15: CCE-92505-7
cce@slmicro5: CCE-93696-3

references:
disa: CCI-001453
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
{{% if product in ['ol8','rhel8'] %}}
{{% if product in ['ol8', 'rhel8'] %}}
FILE_PATH='/etc/crypto-policies/back-ends/opensshserver.config'
CONF_PREFIX="CRYPTO_POLICY='-oKexAlgorithms="
KEX_ALGOS="ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512"
CONF_SUFIX="'"
CONF_PREFIX_REGEX="^\s*CRYPTO_POLICY"
{{% elif product in ['ol7', 'sle12','sle15','ubuntu2004', 'ubuntu2204'] %}}
{{% elif product in ['ol7', 'sle12', 'sle15', 'slmicro5', 'ubuntu2004', 'ubuntu2204'] %}}
FILE_PATH='/etc/ssh/sshd_config'
FILE_PATH_CONFIGDIR='/etc/ssh/sshd_config.d'
CONF_PREFIX="KexAlgorithms "
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

source common.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

source common.sh

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Oracle Linux 7,multi_platform_sle
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_slmicro
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_ubuntu
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

{{{ bash_instantiate_variables("sshd_approved_macs") }}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<criteria comment="sshd is not installed" operator="AND">
<extend_definition comment="sshd is not required or requirement is unset"
definition_ref="sshd_not_required_or_unset" />
{{% if product in ['opensuse', 'sle12', 'sle15'] %}}
{{% if product in ['opensuse', 'sle12', 'sle15', 'slmicro5'] %}}
<extend_definition comment="rpm package openssh removed"
definition_ref="package_openssh_removed" />
{{% else %}}
Expand All @@ -19,7 +19,7 @@
<criteria comment="sshd is installed and configured" operator="AND">
<extend_definition comment="sshd is required or requirement is unset"
definition_ref="sshd_required_or_unset" />
{{% if product in ['opensuse', 'sle12', 'sle15'] %}}
{{% if product in ['opensuse', 'sle12', 'sle15', 'slmicro5'] %}}
<extend_definition comment="rpm package openssh installed"
definition_ref="package_openssh_installed" />
{{% else %}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |-
Limit the MACs to those hash algorithms which are FIPS-approved.
The following line in <tt>/etc/ssh/sshd_config</tt>
demonstrates use of FIPS-approved MACs:
{{% if product in ["sle12", "sle15"] %}}
{{% if product in ["sle12", "sle15", "slmicro5"] %}}
<pre>MACs hmac-sha2-512,hmac-sha2-256</pre>
{{% else %}}
<pre>MACs hmac-sha2-512,hmac-sha2-256,hmac-sha1</pre>
Expand Down Expand Up @@ -43,6 +43,7 @@ identifiers:
cce@rhel8: CCE-82198-3
cce@sle12: CCE-83036-4
cce@sle15: CCE-91338-4
cce@slmicro5: CCE-93691-4

references:
cis-csc: 1,12,13,15,16,5,8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_ubuntu
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_ubuntu
# platform = Oracle Linux 7,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu

{{%- if 'ubuntu' in product %}}
{{{ bash_instantiate_variables('sshd_approved_macs') }}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ severity: medium

identifiers:
cce@sle15: CCE-83280-8
cce@slmicro5: CCE-93690-6

references:
disa: CCI-000068,CCI-000803,CCI-000877,CCI-001453,CCI-003123
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle
# platform = multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro

if grep -q "^MACs" /etc/ssh/sshd_config; then
sed -i "s/^MACs.*/MACs hmac-sha2-512/" /etc/ssh/sshd_config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_sle
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_sle,multi_platform_slmicro
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ identifiers:
cce@rhel10: CCE-89508-6
cce@sle12: CCE-83029-9
cce@sle15: CCE-83279-0
cce@slmicro5: CCE-93689-8

references:
cis-csc: 1,12,15,16,5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_sle
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_sle,multi_platform_slmicro
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_ubuntu,multi_platform_sle
# platform = multi_platform_rhel,multi_platform_fedora,multi_platform_ol,multi_platform_rhv,multi_platform_ubuntu,multi_platform_sle,multi_platform_slmicro

{{{ bash_instantiate_variables("var_account_disable_post_pw_expiration") }}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ identifiers:
cce@rhel10: CCE-88966-7
cce@sle12: CCE-83051-3
cce@sle15: CCE-85558-5
cce@slmicro5: CCE-93688-0

references:
cis-csc: 1,12,13,14,15,16,18,3,5,7,8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = multi_platform_sle,multi_platform_ol,multi_platform_rhel
# platform = multi_platform_sle,multi_platform_slmicro,multi_platform_ol,multi_platform_rhel
# reboot = false
# strategy = restrict
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = Red Hat Virtualization 4,multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_ubuntu
# platform = Red Hat Virtualization 4,multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_ubuntu
df --local -P | awk '{if (NR!=1) print $6}' \
| xargs -I '$6' find '$6' -xdev -type d \
\( -perm -0002 -a ! -perm -1000 \) 2>/dev/null \
Expand Down
Loading
Loading