mirror of
https://github.com/jtesta/ssh-audit.git
synced 2026-05-25 23:41:22 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97a0f500d6 |
@@ -216,8 +216,6 @@ For convenience, a web front-end on top of the command-line tool is available at
|
|||||||
### v3.3.0-dev (???)
|
### v3.3.0-dev (???)
|
||||||
- Added built-in policies for Ubuntu 24.04 LTS server and client, and OpenSSH 9.8.
|
- Added built-in policies for Ubuntu 24.04 LTS server and client, and OpenSSH 9.8.
|
||||||
- Added IPv6 support for DHEat and connection rate tests.
|
- Added IPv6 support for DHEat and connection rate tests.
|
||||||
- Added TCP port information to JSON policy scan results; credit [Fabian Malte Kopp](https://github.com/dreizehnutters).
|
|
||||||
- Added LANcom LCOS server recognition and Ed448 key extraction; credit [Daniel Lenski](https://github.com/dlenskiSB).
|
|
||||||
- Fixed crash when running with `-P` and `-T` options simultaneously.
|
- Fixed crash when running with `-P` and `-T` options simultaneously.
|
||||||
- Fixed host key tests from only reporting a key type at most once despite multiple hosts supporting it; credit [Daniel Lenski](https://github.com/dlenskiSB).
|
- Fixed host key tests from only reporting a key type at most once despite multiple hosts supporting it; credit [Daniel Lenski](https://github.com/dlenskiSB).
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ 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'
|
||||||
@@ -161,7 +158,6 @@ 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,9 +134,6 @@ 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,8 +224,4 @@ 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
|
||||||
|
|||||||
@@ -735,7 +735,7 @@ def evaluate_policy(out: OutputBuffer, aconf: AuditConf, banner: Optional['Banne
|
|||||||
|
|
||||||
passed, error_struct, error_str = aconf.policy.evaluate(banner, kex)
|
passed, error_struct, error_str = aconf.policy.evaluate(banner, kex)
|
||||||
if aconf.json:
|
if aconf.json:
|
||||||
json_struct = {'host': aconf.host, 'port': aconf.port, 'policy': aconf.policy.get_name_and_version(), 'passed': passed, 'errors': error_struct}
|
json_struct = {'host': aconf.host, 'policy': aconf.policy.get_name_and_version(), 'passed': passed, 'errors': error_struct}
|
||||||
out.info(json.dumps(json_struct, indent=4 if aconf.json_print_indent else None, sort_keys=True))
|
out.info(json.dumps(json_struct, indent=4 if aconf.json_print_indent else None, sort_keys=True))
|
||||||
else:
|
else:
|
||||||
spacing = ''
|
spacing = ''
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker policy: test1 (version 1)",
|
"policy": "Docker policy: test1 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker poliicy: test10 (version 1)",
|
"policy": "Docker poliicy: test10 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test2 (version 1)",
|
"policy": "Docker policy: test2 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test3 (version 1)",
|
"policy": "Docker policy: test3 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test4 (version 1)",
|
"policy": "Docker policy: test4 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test5 (version 1)",
|
"policy": "Docker policy: test5 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker poliicy: test7 (version 1)",
|
"policy": "Docker poliicy: test7 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker poliicy: test8 (version 1)",
|
"policy": "Docker poliicy: test8 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker poliicy: test9 (version 1)",
|
"policy": "Docker poliicy: test9 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Hardened OpenSSH Server v8.0 (version 4)",
|
"policy": "Hardened OpenSSH Server v8.0 (version 4)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Hardened OpenSSH Server v8.0 (version 4)",
|
"policy": "Hardened OpenSSH Server v8.0 (version 4)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker policy: test11 (version 1)",
|
"policy": "Docker policy: test11 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test12 (version 1)",
|
"policy": "Docker policy: test12 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker policy: test13 (version 1)",
|
"policy": "Docker policy: test13 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test14 (version 1)",
|
"policy": "Docker policy: test14 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker policy: test15 (version 1)",
|
"policy": "Docker policy: test15 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,5 @@
|
|||||||
],
|
],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": false,
|
"passed": false,
|
||||||
"policy": "Docker policy: test16 (version 1)",
|
"policy": "Docker policy: test16 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker policy: test17 (version 1)",
|
"policy": "Docker policy: test17 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
"errors": [],
|
"errors": [],
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
"passed": true,
|
"passed": true,
|
||||||
"policy": "Docker policy: test6 (version 1)",
|
"policy": "Docker policy: test6 (version 1)"
|
||||||
"port": 2222
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user