mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 14:03:24 +00:00
refactor[rules] ssh rules discussion update
Added mention of /usr/libexec/reset-ssh-configuration.
This commit is contained in:
@@ -8,6 +8,8 @@ discussion: |
|
||||
Operating systems utilizing encryption _MUST_ use FIPS validated mechanisms for authenticating to cryptographic modules.
|
||||
|
||||
NOTE: For more information on FIPS compliance with the version of SSH included in the macOS, the manual page apple_ssh_and_fips has additional information.
|
||||
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
fips_ssh_config=("Ciphers aes128-gcm@openssh.com" "HostbasedAcceptedAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com" "HostKeyAlgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256,sk-ecdsa-sha2-nistp256@openssh.com" "KexAlgorithms ecdh-sha2-nistp256" "MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-256" "PubkeyAcceptedAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com" "CASignatureAlgorithms ecdsa-sha2-nistp256,sk-ecdsa-sha2-nistp256@openssh.com")
|
||||
total=0
|
||||
|
||||
@@ -4,6 +4,8 @@ discussion: |
|
||||
SSH _MUST_ be configured with an Active Server Alive Maximum Count set to $ODV. Terminating an idle session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle session or an incomplete login attempt will also free up resources committed by the managed network element.
|
||||
|
||||
NOTE: /etc/ssh/ssh_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
ret="pass"
|
||||
for u in $(/usr/bin/dscl . -list /Users UniqueID | /usr/bin/awk '$2 > 500 {print $1}'); do
|
||||
|
||||
@@ -6,6 +6,8 @@ discussion: |
|
||||
Setting the Active Server Alive Maximum Count to $ODV will log users out after a $ODV seconds interval of inactivity.
|
||||
|
||||
NOTE: /etc/ssh/ssh_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
ret="pass"
|
||||
for u in $(/usr/bin/dscl . -list /Users UniqueID | /usr/bin/awk '$2 > 500 {print $1}'); do
|
||||
|
||||
@@ -6,6 +6,8 @@ discussion: |
|
||||
This will set the time out when the session is inactive.
|
||||
|
||||
NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
/usr/sbin/sshd -G | /usr/bin/awk '/channeltimeout/{print $2}'
|
||||
result:
|
||||
|
||||
@@ -7,7 +7,7 @@ discussion: |
|
||||
|
||||
NOTE: This setting is not intended to manage idle user sessions where there is no input from the client. Its purpose is to monitor for interruptions in network connectivity and force the session to terminate after the connection appears to be broken.
|
||||
|
||||
NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
/usr/sbin/sshd -G | /usr/bin/awk '/clientalivecountmax/{print $2}'
|
||||
result:
|
||||
|
||||
@@ -9,7 +9,7 @@ discussion: |
|
||||
|
||||
NOTE: This setting is not intended to manage idle user sessions where there is no input from the client. Its purpose is to monitor for interruptions in network connectivity and force the session to terminate after the connection appears to be broken.
|
||||
|
||||
NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
/usr/sbin/sshd -G | /usr/bin/awk '/clientaliveinterval/{print $2}'
|
||||
result:
|
||||
|
||||
@@ -8,6 +8,8 @@ discussion: |
|
||||
Operating systems utilizing encryption _MUST_ use FIPS validated mechanisms for authenticating to cryptographic modules.
|
||||
|
||||
NOTE: For more information on FIPS compliance with the version of SSHD included in the macOS, the manual page apple_ssh_and_fips has additional information.
|
||||
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
fips_sshd_config=("Ciphers aes128-gcm@openssh.com" "HostbasedAcceptedAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com" "HostKeyAlgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256,sk-ecdsa-sha2-nistp256@openssh.com" "KexAlgorithms ecdh-sha2-nistp256" "MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-256" "PubkeyAcceptedAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com" "CASignatureAlgorithms ecdsa-sha2-nistp256,sk-ecdsa-sha2-nistp256@openssh.com")
|
||||
total=0
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Set Login Grace Time to $ODV
|
||||
discussion: |
|
||||
If SSHD is enabled then it _MUST_ be configured to wait only $ODV seconds before timing out logon attempts.
|
||||
|
||||
NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
/usr/sbin/sshd -G | /usr/bin/awk '/logingracetime/{print $2}'
|
||||
result:
|
||||
|
||||
@@ -5,7 +5,7 @@ discussion: |
|
||||
|
||||
The macOS system MUST require individuals to be authenticated with an individual authenticator prior to using a group authenticator, and administrator users _MUST_ never log in directly as root.
|
||||
|
||||
NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
/usr/sbin/sshd -G | /usr/bin/awk '/permitrootlogin/{print $2}'
|
||||
result:
|
||||
|
||||
@@ -5,7 +5,7 @@ discussion: |
|
||||
|
||||
This will set the time out when there are no open channels within an session.
|
||||
|
||||
NOTE: /etc/ssh/sshd_config will be automatically modified to its original state following any update or major upgrade to the operating system.
|
||||
NOTE: On macOS 15.2 and higher the SSH configuration can be reset to the macOS default by running /usr/libexec/reset-ssh-configuration.
|
||||
check: |
|
||||
/usr/sbin/sshd -G | /usr/bin/awk '/unusedconnectiontimeout/{print $2}'
|
||||
result:
|
||||
|
||||
Reference in New Issue
Block a user