From 3d403b1d708d636244c5ad124fd252350f363366 Mon Sep 17 00:00:00 2001 From: Joe Testa Date: Tue, 19 Mar 2024 15:47:09 -0400 Subject: [PATCH] Updated availability of algorithms in Dropbear. (#257) --- src/ssh_audit/ssh2_kexdb.py | 6 +++--- test/docker/expected_results/openssh_8.0p1_test1.json | 6 +++--- test/docker/expected_results/openssh_8.0p1_test1.txt | 8 ++++---- test/docker/expected_results/openssh_8.0p1_test2.json | 4 ++-- test/docker/expected_results/openssh_8.0p1_test2.txt | 6 +++--- test/docker/expected_results/openssh_8.0p1_test3.json | 4 ++-- test/docker/expected_results/openssh_8.0p1_test3.txt | 6 +++--- test/docker/expected_results/tinyssh_20190101_test1.json | 4 ++-- test/docker/expected_results/tinyssh_20190101_test1.txt | 6 +++--- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/ssh_audit/ssh2_kexdb.py b/src/ssh_audit/ssh2_kexdb.py index 94f628d..f1ec908 100644 --- a/src/ssh_audit/ssh2_kexdb.py +++ b/src/ssh_audit/ssh2_kexdb.py @@ -223,7 +223,7 @@ class SSH2_KexDB: # pylint: disable=too-few-public-methods 'null': [[], [FAIL_PLAINTEXT]], 'pgp-sign-dss': [[], [FAIL_1024BIT_MODULUS]], 'pgp-sign-rsa': [[], [FAIL_1024BIT_MODULUS]], - 'rsa-sha2-256': [['7.2']], + 'rsa-sha2-256': [['7.2,d2020.79']], 'rsa-sha2-256-cert-v01@openssh.com': [['7.8']], 'rsa-sha2-512': [['7.2']], 'rsa-sha2-512-cert-v01@openssh.com': [['7.8']], @@ -242,7 +242,7 @@ class SSH2_KexDB: # pylint: disable=too-few-public-methods 'ssh-dss-sha256@ssh.com': [[], [FAIL_1024BIT_MODULUS]], 'ssh-dss-sha384@ssh.com': [[], [FAIL_1024BIT_MODULUS]], 'ssh-dss-sha512@ssh.com': [[], [FAIL_1024BIT_MODULUS]], - 'ssh-ed25519': [['6.5,l10.7.0']], + 'ssh-ed25519': [['6.5,d2020.79,l10.7.0']], 'ssh-ed25519-cert-v01@openssh.com': [['6.5']], 'ssh-ed448': [[]], 'ssh-ed448-cert-v01@openssh.com': [[], [], [], [INFO_NEVER_IMPLEMENTED_IN_OPENSSH]], @@ -335,7 +335,7 @@ class SSH2_KexDB: # pylint: disable=too-few-public-methods 'cast128-ecb': [[], [FAIL_CAST], [WARN_CIPHER_MODE]], 'cast128-ofb': [[], [FAIL_CAST], [WARN_CIPHER_MODE]], 'chacha20-poly1305': [[], [], [], [INFO_DEFAULT_OPENSSH_CIPHER]], - 'chacha20-poly1305@openssh.com': [['6.5'], [], [], [INFO_DEFAULT_OPENSSH_CIPHER]], + 'chacha20-poly1305@openssh.com': [['6.5,d2020.79'], [], [], [INFO_DEFAULT_OPENSSH_CIPHER]], 'crypticore128@ssh.com': [[], [FAIL_UNPROVEN]], 'des-cbc': [[], [FAIL_DES], [WARN_CIPHER_MODE, WARN_BLOCK_SIZE]], 'des-cfb': [[], [FAIL_DES], [WARN_CIPHER_MODE, WARN_BLOCK_SIZE]], diff --git a/test/docker/expected_results/openssh_8.0p1_test1.json b/test/docker/expected_results/openssh_8.0p1_test1.json index 809b9b5..7f627df 100644 --- a/test/docker/expected_results/openssh_8.0p1_test1.json +++ b/test/docker/expected_results/openssh_8.0p1_test1.json @@ -40,7 +40,7 @@ "notes": { "info": [ "default cipher since OpenSSH 6.9", - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ], "warn": [ "vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation" @@ -229,7 +229,7 @@ "keysize": 3072, "notes": { "info": [ - "available since OpenSSH 7.2" + "available since OpenSSH 7.2, Dropbear SSH 2020.79" ] } }, @@ -264,7 +264,7 @@ "algorithm": "ssh-ed25519", "notes": { "info": [ - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ] } } diff --git a/test/docker/expected_results/openssh_8.0p1_test1.txt b/test/docker/expected_results/openssh_8.0p1_test1.txt index f154b89..272d3e0 100644 --- a/test/docker/expected_results/openssh_8.0p1_test1.txt +++ b/test/docker/expected_results/openssh_8.0p1_test1.txt @@ -1,7 +1,7 @@ # general (gen) banner: SSH-2.0-OpenSSH_8.0 (gen) software: OpenSSH 8.0 -(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2018.76+ +(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2020.79+ (gen) compression: enabled (zlib@openssh.com) # security @@ -33,18 +33,18 @@ # host-key algorithms (key) rsa-sha2-512 (3072-bit) -- [info] available since OpenSSH 7.2 -(key) rsa-sha2-256 (3072-bit) -- [info] available since OpenSSH 7.2 +(key) rsa-sha2-256 (3072-bit) -- [info] available since OpenSSH 7.2, Dropbear SSH 2020.79 (key) ssh-rsa (3072-bit) -- [fail] using broken SHA-1 hash algorithm `- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28 `- [info] deprecated in OpenSSH 8.8: https://www.openssh.com/txt/release-8.8 (key) ecdsa-sha2-nistp256 -- [fail] using elliptic curves that are suspected as being backdoored by the U.S. National Security Agency  `- [warn] using weak random number generator could reveal the key `- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62 -(key) ssh-ed25519 -- [info] available since OpenSSH 6.5 +(key) ssh-ed25519 -- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 # encryption algorithms (ciphers) (enc) chacha20-poly1305@openssh.com -- [warn] vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation - `- [info] available since OpenSSH 6.5 + `- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 `- [info] default cipher since OpenSSH 6.9 (enc) aes128-ctr -- [info] available since OpenSSH 3.7, Dropbear SSH 0.52 (enc) aes192-ctr -- [info] available since OpenSSH 3.7 diff --git a/test/docker/expected_results/openssh_8.0p1_test2.json b/test/docker/expected_results/openssh_8.0p1_test2.json index b434e6e..3101f46 100644 --- a/test/docker/expected_results/openssh_8.0p1_test2.json +++ b/test/docker/expected_results/openssh_8.0p1_test2.json @@ -40,7 +40,7 @@ "notes": { "info": [ "default cipher since OpenSSH 6.9", - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ], "warn": [ "vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation" @@ -209,7 +209,7 @@ "algorithm": "ssh-ed25519", "notes": { "info": [ - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ] } }, diff --git a/test/docker/expected_results/openssh_8.0p1_test2.txt b/test/docker/expected_results/openssh_8.0p1_test2.txt index 8c792e9..d2059d2 100644 --- a/test/docker/expected_results/openssh_8.0p1_test2.txt +++ b/test/docker/expected_results/openssh_8.0p1_test2.txt @@ -1,7 +1,7 @@ # general (gen) banner: SSH-2.0-OpenSSH_8.0 (gen) software: OpenSSH 8.0 -(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2018.76+ +(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2020.79+ (gen) compression: enabled (zlib@openssh.com) # security @@ -32,12 +32,12 @@ `- [info] available since OpenSSH 3.9, Dropbear SSH 0.53 # host-key algorithms -(key) ssh-ed25519 -- [info] available since OpenSSH 6.5 +(key) ssh-ed25519 -- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 (key) ssh-ed25519-cert-v01@openssh.com (256-bit cert/256-bit ssh-ed25519 CA) -- [info] available since OpenSSH 6.5 # encryption algorithms (ciphers) (enc) chacha20-poly1305@openssh.com -- [warn] vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation - `- [info] available since OpenSSH 6.5 + `- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 `- [info] default cipher since OpenSSH 6.9 (enc) aes128-ctr -- [info] available since OpenSSH 3.7, Dropbear SSH 0.52 (enc) aes192-ctr -- [info] available since OpenSSH 3.7 diff --git a/test/docker/expected_results/openssh_8.0p1_test3.json b/test/docker/expected_results/openssh_8.0p1_test3.json index f5380e0..04fb66d 100644 --- a/test/docker/expected_results/openssh_8.0p1_test3.json +++ b/test/docker/expected_results/openssh_8.0p1_test3.json @@ -40,7 +40,7 @@ "notes": { "info": [ "default cipher since OpenSSH 6.9", - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ], "warn": [ "vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation" @@ -135,7 +135,7 @@ "algorithm": "ssh-ed25519", "notes": { "info": [ - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ] } } diff --git a/test/docker/expected_results/openssh_8.0p1_test3.txt b/test/docker/expected_results/openssh_8.0p1_test3.txt index ad45556..7ab90f7 100644 --- a/test/docker/expected_results/openssh_8.0p1_test3.txt +++ b/test/docker/expected_results/openssh_8.0p1_test3.txt @@ -1,7 +1,7 @@ # general (gen) banner: SSH-2.0-OpenSSH_8.0 (gen) software: OpenSSH 8.0 -(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2018.76+ +(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2020.79+ (gen) compression: enabled (zlib@openssh.com) # security @@ -19,11 +19,11 @@  `- [info] OpenSSH's GEX fallback mechanism was triggered during testing. Very old SSH clients will still be able to create connections using a 2048-bit modulus, though modern clients will use 4096. This can only be disabled by recompiling the code (see https://github.com/openssh/openssh-portable/blob/V_9_4/dh.c#L477). # host-key algorithms -(key) ssh-ed25519 -- [info] available since OpenSSH 6.5 +(key) ssh-ed25519 -- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 # encryption algorithms (ciphers) (enc) chacha20-poly1305@openssh.com -- [warn] vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation - `- [info] available since OpenSSH 6.5 + `- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 `- [info] default cipher since OpenSSH 6.9 (enc) aes256-gcm@openssh.com -- [info] available since OpenSSH 6.2 (enc) aes128-gcm@openssh.com -- [info] available since OpenSSH 6.2 diff --git a/test/docker/expected_results/tinyssh_20190101_test1.json b/test/docker/expected_results/tinyssh_20190101_test1.json index 40b00e9..52bb5d8 100644 --- a/test/docker/expected_results/tinyssh_20190101_test1.json +++ b/test/docker/expected_results/tinyssh_20190101_test1.json @@ -18,7 +18,7 @@ "notes": { "info": [ "default cipher since OpenSSH 6.9", - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ], "warn": [ "vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation" @@ -75,7 +75,7 @@ "algorithm": "ssh-ed25519", "notes": { "info": [ - "available since OpenSSH 6.5" + "available since OpenSSH 6.5, Dropbear SSH 2020.79" ] } } diff --git a/test/docker/expected_results/tinyssh_20190101_test1.txt b/test/docker/expected_results/tinyssh_20190101_test1.txt index db5678a..7137eb6 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-8.4, Dropbear SSH 2018.76+ +(gen) compatibility: OpenSSH 8.0-8.4, Dropbear SSH 2020.79+ (gen) compression: disabled # key exchange algorithms @@ -13,11 +13,11 @@ `- [info] the sntrup4591761 algorithm was withdrawn, as it may not provide strong post-quantum security # host-key algorithms -(key) ssh-ed25519 -- [info] available since OpenSSH 6.5 +(key) ssh-ed25519 -- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 # encryption algorithms (ciphers) (enc) chacha20-poly1305@openssh.com -- [warn] vulnerable to the Terrapin attack (CVE-2023-48795), allowing message prefix truncation - `- [info] available since OpenSSH 6.5 + `- [info] available since OpenSSH 6.5, Dropbear SSH 2020.79 `- [info] default cipher since OpenSSH 6.9 # message authentication code algorithms