From 1bbc3feb57226a9d52be9582b97cc1f97245d41e Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Tue, 23 Feb 2021 16:02:20 -0500 Subject: [PATCH] Added OpenSSH 8.5 built-in policy. Added sntrup761x25519-sha512@openssh.com kex. --- README.md | 2 ++ src/ssh_audit/policy.py | 2 ++ src/ssh_audit/ssh2_kexdb.py | 3 ++- test/docker/expected_results/tinyssh_20190101_test1.txt | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1385cb7..74f04f4 100644 --- a/README.md +++ b/README.md @@ -167,11 +167,13 @@ For convenience, a web front-end on top of the command-line tool is available at - Added version check for OpenSSH user enumeration (CVE-2018-15473). - Added deprecation note to host key types based on SHA-1. - Added extra warnings for SSHv1. + - Added built-in hardened OpenSSH v8.5 policy. - Upgraded warnings to failures for host key types based on SHA-1. - Fixed crash when receiving unexpected response during host key test. - Fixed hang against older Cisco devices during host key test & gex test. - Fixed improper termination while scanning multiple targets when one target returns an error. - Dropped support for Python 3.5 (which reached EOL in Sept. 2020). + - Added 1 new key exchange: `sntrup761x25519-sha512@openssh.com`. ### v2.3.1 (2020-10-28) - Now parses public key sizes for `rsa-sha2-256-cert-v01@openssh.com` and `rsa-sha2-512-cert-v01@openssh.com` host key types. diff --git a/src/ssh_audit/policy.py b/src/ssh_audit/policy.py index e2358ef..6afc1d8 100644 --- a/src/ssh_audit/policy.py +++ b/src/ssh_audit/policy.py @@ -65,6 +65,8 @@ class Policy: 'Hardened OpenSSH Server v8.4 (version 1)': {'version': '1', 'banner': None, 'compressions': None, 'host_keys': ['rsa-sha2-512', 'rsa-sha2-256', 'ssh-ed25519'], 'optional_host_keys': ['sk-ssh-ed25519@openssh.com', 'ssh-ed25519-cert-v01@openssh.com', 'sk-ssh-ed25519-cert-v01@openssh.com', 'rsa-sha2-256-cert-v01@openssh.com', 'rsa-sha2-512-cert-v01@openssh.com'], 'kex': ['curve25519-sha256', 'curve25519-sha256@libssh.org', 'diffie-hellman-group16-sha512', 'diffie-hellman-group18-sha512', 'diffie-hellman-group-exchange-sha256'], 'ciphers': ['chacha20-poly1305@openssh.com', 'aes256-gcm@openssh.com', 'aes128-gcm@openssh.com', 'aes256-ctr', 'aes192-ctr', 'aes128-ctr'], 'macs': ['hmac-sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com', 'umac-128-etm@openssh.com'], 'hostkey_sizes': {'rsa-sha2-256': 4096, 'rsa-sha2-512': 4096}, 'cakey_sizes': {'rsa-sha2-256-cert-v01@openssh.com': 4096, 'rsa-sha2-512-cert-v01@openssh.com': 4096}, 'dh_modulus_sizes': {'diffie-hellman-group-exchange-sha256': 2048}, 'server_policy': True}, + 'Hardened OpenSSH Server v8.5 (version 1)': {'version': '1', 'banner': None, 'compressions': None, 'host_keys': ['rsa-sha2-512', 'rsa-sha2-256', 'ssh-ed25519'], 'optional_host_keys': ['sk-ssh-ed25519@openssh.com', 'ssh-ed25519-cert-v01@openssh.com', 'sk-ssh-ed25519-cert-v01@openssh.com', 'rsa-sha2-256-cert-v01@openssh.com', 'rsa-sha2-512-cert-v01@openssh.com'], 'kex': ['curve25519-sha256', 'curve25519-sha256@libssh.org', 'diffie-hellman-group16-sha512', 'diffie-hellman-group18-sha512', 'diffie-hellman-group-exchange-sha256'], 'ciphers': ['chacha20-poly1305@openssh.com', 'aes256-gcm@openssh.com', 'aes128-gcm@openssh.com', 'aes256-ctr', 'aes192-ctr', 'aes128-ctr'], 'macs': ['hmac-sha2-256-etm@openssh.com', 'hmac-sha2-512-etm@openssh.com', 'umac-128-etm@openssh.com'], 'hostkey_sizes': {'rsa-sha2-256': 4096, 'rsa-sha2-512': 4096}, 'cakey_sizes': {'rsa-sha2-256-cert-v01@openssh.com': 4096, 'rsa-sha2-512-cert-v01@openssh.com': 4096}, 'dh_modulus_sizes': {'diffie-hellman-group-exchange-sha256': 2048}, 'server_policy': True}, + # Ubuntu Client policies diff --git a/src/ssh_audit/ssh2_kexdb.py b/src/ssh_audit/ssh2_kexdb.py index b695bfe..4563370 100644 --- a/src/ssh_audit/ssh2_kexdb.py +++ b/src/ssh_audit/ssh2_kexdb.py @@ -117,7 +117,8 @@ class SSH2_KexDB: # pylint: disable=too-few-public-methods 'kexguess2@matt.ucc.asn.au': [['d2013.57']], 'rsa1024-sha1': [[], [FAIL_1024BIT_MODULUS], [WARN_HASH_WEAK]], 'rsa2048-sha256': [[]], - 'sntrup4591761x25519-sha512@tinyssh.org': [['8.0'], [], [WARN_EXPERIMENTAL]], + 'sntrup4591761x25519-sha512@tinyssh.org': [['8.0', '8.4'], [], [WARN_EXPERIMENTAL]], + 'sntrup761x25519-sha512@openssh.com': [['8.5'], [], [WARN_EXPERIMENTAL]], 'kexAlgoCurve25519SHA256': [[]], 'Curve25519SHA256': [[]], 'ext-info-c': [[]], # Extension negotiation (RFC 8308) diff --git a/test/docker/expected_results/tinyssh_20190101_test1.txt b/test/docker/expected_results/tinyssh_20190101_test1.txt index 26efda2..9e833c6 100644 --- a/test/docker/expected_results/tinyssh_20190101_test1.txt +++ b/test/docker/expected_results/tinyssh_20190101_test1.txt @@ -1,6 +1,6 @@ # general (gen) software: TinySSH noversion -(gen) compatibility: OpenSSH 8.0+, Dropbear SSH 2018.76+ +(gen) compatibility: OpenSSH 8.0-8.4, Dropbear SSH 2018.76+ (gen) compression: disabled # key exchange algorithms