mirror of
https://github.com/jtesta/ssh-audit.git
synced 2026-05-25 15:31:23 +02:00
Compare commits
3 Commits
ec2cbd251d
...
881bf8dca0
| Author | SHA1 | Date | |
|---|---|---|---|
| 881bf8dca0 | |||
| 3361b176d5 | |||
| df8f238152 |
@@ -52,6 +52,9 @@ class HostKeyTest:
|
|||||||
|
|
||||||
'ssh-ed25519': {'cert': False, 'variable_key_len': False},
|
'ssh-ed25519': {'cert': False, 'variable_key_len': False},
|
||||||
'ssh-ed25519-cert-v01@openssh.com': {'cert': True, 'variable_key_len': False},
|
'ssh-ed25519-cert-v01@openssh.com': {'cert': True, 'variable_key_len': False},
|
||||||
|
|
||||||
|
'ssh-ed448': {'cert': False, 'variable_key_len': False},
|
||||||
|
# 'ssh-ed448-cert-v01@openssh.com': {'cert': True, 'variable_key_len': False},
|
||||||
}
|
}
|
||||||
|
|
||||||
TWO2K_MODULUS_WARNING = '2048-bit modulus only provides 112-bits of symmetric strength'
|
TWO2K_MODULUS_WARNING = '2048-bit modulus only provides 112-bits of symmetric strength'
|
||||||
@@ -157,6 +160,7 @@ class HostKeyTest:
|
|||||||
ca_key_type = kex_group.get_ca_type()
|
ca_key_type = kex_group.get_ca_type()
|
||||||
ca_modulus_size = kex_group.get_ca_size()
|
ca_modulus_size = kex_group.get_ca_size()
|
||||||
out.d("Hostkey type: [%s]; hostkey size: %u; CA type: [%s]; CA modulus size: %u" % (host_key_type, hostkey_modulus_size, ca_key_type, ca_modulus_size), write_now=True)
|
out.d("Hostkey type: [%s]; hostkey size: %u; CA type: [%s]; CA modulus size: %u" % (host_key_type, hostkey_modulus_size, ca_key_type, ca_modulus_size), write_now=True)
|
||||||
|
out.d("Raw hostkey bytes (%d): [%s]" % (len(raw_hostkey_bytes), raw_hostkey_bytes.hex()), write_now=True)
|
||||||
|
|
||||||
# Record all the host key info.
|
# Record all the host key info.
|
||||||
server_kex.set_host_key(host_key_type, raw_hostkey_bytes, hostkey_modulus_size, ca_key_type, ca_modulus_size)
|
server_kex.set_host_key(host_key_type, raw_hostkey_bytes, hostkey_modulus_size, ca_key_type, ca_modulus_size)
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ class KexDH: # pragma: nocover
|
|||||||
if self.__hostkey_type == 'ssh-ed25519':
|
if self.__hostkey_type == 'ssh-ed25519':
|
||||||
self.out.d("%s has a fixed host key modulus of 32." % self.__hostkey_type)
|
self.out.d("%s has a fixed host key modulus of 32." % self.__hostkey_type)
|
||||||
self.__hostkey_n_len = 32
|
self.__hostkey_n_len = 32
|
||||||
|
elif self.__hostkey_type == 'ssh-ed448':
|
||||||
|
self.out.d("%s has a fixed host key modulus of 57." % self.__hostkey_type)
|
||||||
|
self.__hostkey_n_len = 57
|
||||||
else:
|
else:
|
||||||
# Here is the modulus size & actual modulus of the host key public key.
|
# Here is the modulus size & actual modulus of the host key public key.
|
||||||
hostkey_n, self.__hostkey_n_len, ptr = KexDH.__get_bytes(hostkey, ptr)
|
hostkey_n, self.__hostkey_n_len, ptr = KexDH.__get_bytes(hostkey, ptr)
|
||||||
|
|||||||
@@ -224,4 +224,8 @@ class Software:
|
|||||||
mx = re.match(r'^PuTTY_Release_(.*)', software)
|
mx = re.match(r'^PuTTY_Release_(.*)', software)
|
||||||
if mx:
|
if mx:
|
||||||
return cls(None, Product.PuTTY, mx.group(1), None, None)
|
return cls(None, Product.PuTTY, mx.group(1), None, None)
|
||||||
|
mx = re.match(r'^lancom(.*)', software)
|
||||||
|
if mx:
|
||||||
|
v, p = 'LANcom', 'LCOS sshd'
|
||||||
|
return cls(v, p, mx.group(1), None, None)
|
||||||
return None
|
return None
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ class SSH2_KexDB: # pylint: disable=too-few-public-methods
|
|||||||
INFO_DEPRECATED_IN_OPENSSH88 = 'deprecated in OpenSSH 8.8: https://www.openssh.com/txt/release-8.8'
|
INFO_DEPRECATED_IN_OPENSSH88 = 'deprecated in OpenSSH 8.8: https://www.openssh.com/txt/release-8.8'
|
||||||
INFO_DISABLED_IN_DBEAR67 = 'disabled in Dropbear SSH 2015.67'
|
INFO_DISABLED_IN_DBEAR67 = 'disabled in Dropbear SSH 2015.67'
|
||||||
INFO_DISABLED_IN_OPENSSH70 = 'disabled in OpenSSH 7.0: https://www.openssh.com/txt/release-7.0'
|
INFO_DISABLED_IN_OPENSSH70 = 'disabled in OpenSSH 7.0: https://www.openssh.com/txt/release-7.0'
|
||||||
|
INFO_RFC8709_NOT_OPENSSH = 'described in RFC8709 but never implemented in OpenSSH'
|
||||||
INFO_NEVER_IMPLEMENTED_IN_OPENSSH = 'despite the @openssh.com tag, this was never implemented in OpenSSH'
|
INFO_NEVER_IMPLEMENTED_IN_OPENSSH = 'despite the @openssh.com tag, this was never implemented in OpenSSH'
|
||||||
INFO_REMOVED_IN_OPENSSH61 = 'removed since OpenSSH 6.1, removed from specification'
|
INFO_REMOVED_IN_OPENSSH61 = 'removed since OpenSSH 6.1, removed from specification'
|
||||||
INFO_REMOVED_IN_OPENSSH69 = 'removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9'
|
INFO_REMOVED_IN_OPENSSH69 = 'removed in OpenSSH 6.9: https://www.openssh.com/txt/release-6.9'
|
||||||
@@ -245,7 +246,7 @@ class SSH2_KexDB: # pylint: disable=too-few-public-methods
|
|||||||
'ssh-dss-sha512@ssh.com': [[], [FAIL_1024BIT_MODULUS]],
|
'ssh-dss-sha512@ssh.com': [[], [FAIL_1024BIT_MODULUS]],
|
||||||
'ssh-ed25519': [['6.5,d2020.79,l10.7.0']],
|
'ssh-ed25519': [['6.5,d2020.79,l10.7.0']],
|
||||||
'ssh-ed25519-cert-v01@openssh.com': [['6.5']],
|
'ssh-ed25519-cert-v01@openssh.com': [['6.5']],
|
||||||
'ssh-ed448': [[]],
|
'ssh-ed448': [[], [], [], [INFO_RFC8709_NOT_OPENSSH]],
|
||||||
'ssh-ed448-cert-v01@openssh.com': [[], [], [], [INFO_NEVER_IMPLEMENTED_IN_OPENSSH]],
|
'ssh-ed448-cert-v01@openssh.com': [[], [], [], [INFO_NEVER_IMPLEMENTED_IN_OPENSSH]],
|
||||||
'ssh-gost2001': [[], [FAIL_UNTRUSTED]],
|
'ssh-gost2001': [[], [FAIL_UNTRUSTED]],
|
||||||
'ssh-gost2012-256': [[], [FAIL_UNTRUSTED]],
|
'ssh-gost2012-256': [[], [FAIL_UNTRUSTED]],
|
||||||
|
|||||||
Reference in New Issue
Block a user