SSH Audit

Page content

ssh-audit is a tool for ssh server auditing.

Features

SSH1 and SSH2 protocol server support;

grab banner, recognize device or software and operating system, detect compression;

gather key-exchange, host-key, encryption and message authentication code algorithms;

output algorithm information (available since, removed/disabled, unsafe/weak/legacy, etc);

output algorithm recommendations (append or remove based on recognized software version);

output security information (related issues, assigned CVE list, etc);

analyze SSH version compatibility based on algorithm information;

historical information from OpenSSH, Dropbear SSH and libssh;

Source: https://github.com/arthepsy/ssh-audit Links: SSSH - Secure Secure SHell

running against a 3560 Switch

puffy201 ../ssh-audit# ./ssh-audit.py switch
# general
(gen) banner: SSH-2.0-Cisco-1.25
(gen) software: Cisco IOS/PIX sshd 1.25
(gen) compatibility: OpenSSH 3.9-6.6, Dropbear SSH 0.53+
(gen) compression: disabled

# key exchange algorithms
(kex) diffie-hellman-group-exchange-sha1  -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 2.3.0
(kex) diffie-hellman-group14-sha1         -- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 3.9, Dropbear SSH 0.53
(kex) diffie-hellman-group1-sha1          -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [fail] disabled (in client) since OpenSSH 7.0, logjam attack
                                          `- [warn] using small 1024-bit modulus
                                          `- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.28

# host-key algorithms
(key) ssh-rsa                             -- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28

# encryption algorithms (ciphers)
(enc) aes128-cbc                          -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] using weak cipher mode
                                          `- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.28
(enc) 3des-cbc                            -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] using weak cipher
                                          `- [warn] using weak cipher mode
                                          `- [warn] using small 64-bit block size
                                          `- [info] available since OpenSSH 1.2.2, Dropbear SSH 0.28
(enc) aes192-cbc                          -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] using weak cipher mode
                                          `- [info] available since OpenSSH 2.3.0
(enc) aes256-cbc                          -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] using weak cipher mode
                                          `- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.47

# message authentication code algorithms
(mac) hmac-sha1                           -- [warn] using encrypt-and-MAC mode
                                          `- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 2.1.0, Dropbear SSH 0.28
(mac) hmac-sha1-96                        -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] disabled (in client) since OpenSSH 7.2, legacy algorithm
                                          `- [warn] using encrypt-and-MAC mode
                                          `- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.47
(mac) hmac-md5                            -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] disabled (in client) since OpenSSH 7.2, legacy algorithm
                                          `- [warn] using encrypt-and-MAC mode
                                          `- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 2.1.0, Dropbear SSH 0.28
(mac) hmac-md5-96                         -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                          `- [warn] disabled (in client) since OpenSSH 7.2, legacy algorithm
                                          `- [warn] using encrypt-and-MAC mode
                                          `- [warn] using weak hashing algorithm
                                          `- [info] available since OpenSSH 2.5.0

# algorithm recommendations (for OpenSSH 3.9)
(rec) -diffie-hellman-group1-sha1         -- kex algorithm to remove
(rec) -diffie-hellman-group-exchange-sha1 -- kex algorithm to remove
(rec) -3des-cbc                           -- enc algorithm to remove
(rec) -aes128-cbc                         -- enc algorithm to remove
(rec) -aes192-cbc                         -- enc algorithm to remove
(rec) -aes256-cbc                         -- enc algorithm to remove
(rec) +aes128-ctr                         -- enc algorithm to append
(rec) +aes192-ctr                         -- enc algorithm to append
(rec) +aes256-ctr                         -- enc algorithm to append
(rec) -hmac-sha1-96                       -- mac algorithm to remove
(rec) -hmac-md5                           -- mac algorithm to remove
(rec) -hmac-md5-96                        -- mac algorithm to remove

Running against OpenBSD Current

puffy201 ../ssh-audit# ./ssh-audit.py localhost
# general
(gen) banner: SSH-2.0-OpenSSH_8.2
(gen) software: OpenSSH 8.2
(gen) compatibility: OpenSSH 7.2+ (some functionality from 6.6), Dropbear SSH 2013.62+
(gen) compression: enabled (zlib@openssh.com)

# key exchange algorithms
(kex) diffie-hellman-group14-sha1    -- [warn] using weak hashing algorithm
                                     `- [info] available since OpenSSH 3.9, Dropbear SSH 0.53

# host-key algorithms
(key) rsa-sha2-512                   -- [info] available since OpenSSH 7.2
(key) rsa-sha2-256                   -- [info] available since OpenSSH 7.2
(key) ssh-rsa                        -- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28
(key) ecdsa-sha2-nistp256            -- [fail] using weak elliptic curves
                                     `- [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

# encryption algorithms (ciphers)
(enc) aes128-cbc                     -- [fail] removed (in server) since OpenSSH 6.7, unsafe algorithm
                                     `- [warn] using weak cipher mode
                                     `- [info] available since OpenSSH 2.3.0, Dropbear SSH 0.28
(enc) chacha20-poly1305@openssh.com  -- [info] available since OpenSSH 6.5
                                     `- [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
(enc) aes256-ctr                     -- [info] available since OpenSSH 3.7, Dropbear SSH 0.52
(enc) aes128-gcm@openssh.com         -- [info] available since OpenSSH 6.2
(enc) aes256-gcm@openssh.com         -- [info] available since OpenSSH 6.2

# message authentication code algorithms
(mac) umac-64-etm@openssh.com        -- [warn] using small 64-bit tag size
                                     `- [info] available since OpenSSH 6.2
(mac) umac-128-etm@openssh.com       -- [info] available since OpenSSH 6.2
(mac) hmac-sha2-256-etm@openssh.com  -- [info] available since OpenSSH 6.2
(mac) hmac-sha2-512-etm@openssh.com  -- [info] available since OpenSSH 6.2
(mac) hmac-sha1-etm@openssh.com      -- [warn] using weak hashing algorithm
                                     `- [info] available since OpenSSH 6.2
(mac) umac-64@openssh.com            -- [warn] using encrypt-and-MAC mode
                                     `- [warn] using small 64-bit tag size
                                     `- [info] available since OpenSSH 4.7
(mac) umac-128@openssh.com           -- [warn] using encrypt-and-MAC mode
                                     `- [info] available since OpenSSH 6.2
(mac) hmac-sha2-256                  -- [warn] using encrypt-and-MAC mode
                                     `- [info] available since OpenSSH 5.9, Dropbear SSH 2013.56
(mac) hmac-sha2-512                  -- [warn] using encrypt-and-MAC mode
                                     `- [info] available since OpenSSH 5.9, Dropbear SSH 2013.56
(mac) hmac-sha1                      -- [warn] using encrypt-and-MAC mode
                                     `- [warn] using weak hashing algorithm
                                     `- [info] available since OpenSSH 2.1.0, Dropbear SSH 0.28

# algorithm recommendations (for OpenSSH 8.2)
(rec) -diffie-hellman-group14-sha1   -- kex algorithm to remove
(rec) +diffie-hellman-group14-
 
Any Comments ?
sha256 -- kex algorithm to append (rec) +diffie-hellman-group16-sha512 -- kex algorithm to append (rec) +diffie-hellman-group18-sha512 -- kex algorithm to append (rec) +curve25519-
Any Comments ?
sha256@libssh.org -- kex algorithm to append (rec) -ecdsa-sha2-nistp256 -- key algorithm to remove (rec) -aes128-cbc -- enc algorithm to remove (rec) -hmac-sha1 -- mac algorithm to remove (rec) -hmac-sha2-256 -- mac algorithm to remove (rec) -hmac-sha2-512 -- mac algorithm to remove (rec) -umac-64@openssh.com -- mac algorithm to remove (rec) -umac-128@openssh.com -- mac algorithm to remove (rec) -hmac-sha1-etm@openssh.com -- mac algorithm to remove (rec) -umac-64-etm@openssh.com -- mac algorithm to remove

Running against OpenGear Console Server

puffy201 ../ssh-audit# ./ssh-audit.py 192.168.108.242
# general
(gen) banner: SSH-2.0-OpenSSH_7.7
(gen) software: OpenSSH 7.7
(gen) compatibility: OpenSSH 7.3+, Dropbear SSH 2016.73+
(gen) compression: enabled (zlib@openssh.com)

# key exchange algorithms
(kex) curve25519-
 
Any Comments ?
sha256 -- [warn] unknown algorithm (kex) curve25519-
Any Comments ?
sha256@libssh.org -- [info] available since OpenSSH 6.5, Dropbear SSH 2013.62 (kex) ecdh-sha2-nistp256 -- [fail] using weak elliptic curves `- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62 (kex) ecdh-sha2-nistp384 -- [fail] using weak elliptic curves `- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62 (kex) ecdh-sha2-nistp521 -- [fail] using weak elliptic curves `- [info] available since OpenSSH 5.7, Dropbear SSH 2013.62 (kex) diffie-hellman-group-exchange-
Any Comments ?
sha256 -- [warn] using custom size modulus (possibly weak) `- [info] available since OpenSSH 4.4 (kex) diffie-hellman-group16-sha512 -- [info] available since OpenSSH 7.3, Dropbear SSH 2016.73 (kex) diffie-hellman-group18-sha512 -- [info] available since OpenSSH 7.3 (kex) diffie-hellman-group14-
Any Comments ?
sha256 -- [info] available since OpenSSH 7.3, Dropbear SSH 2016.73 (kex) diffie-hellman-group14-sha1 -- [warn] using weak hashing algorithm `- [info] available since OpenSSH 3.9, Dropbear SSH 0.53 # host-key algorithms (key) ssh-rsa -- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28 (key) rsa-sha2-512 -- [info] available since OpenSSH 7.2 (key) rsa-sha2-256 -- [info] available since OpenSSH 7.2 (key) ecdsa-sha2-nistp256 -- [fail] using weak elliptic curves `- [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 # encryption algorithms (ciphers) (enc) chacha20-poly1305@openssh.com -- [info] available since OpenSSH 6.5 `- [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 (enc) aes256-ctr -- [info] available since OpenSSH 3.7, Dropbear SSH 0.52 (enc) aes128-gcm@openssh.com -- [info] available since OpenSSH 6.2 (enc) aes256-gcm@openssh.com -- [info] available since OpenSSH 6.2 # message authentication code algorithms (mac) umac-64-etm@openssh.com -- [warn] using small 64-bit tag size `- [info] available since OpenSSH 6.2 (mac) umac-128-etm@openssh.com -- [info] available since OpenSSH 6.2 (mac) hmac-sha2-256-etm@openssh.com -- [info] available since OpenSSH 6.2 (mac) hmac-sha2-512-etm@openssh.com -- [info] available since OpenSSH 6.2 (mac) hmac-sha1-etm@openssh.com -- [warn] using weak hashing algorithm `- [info] available since OpenSSH 6.2 (mac) umac-64@openssh.com -- [warn] using encrypt-and-MAC mode `- [warn] using small 64-bit tag size `- [info] available since OpenSSH 4.7 (mac) umac-128@openssh.com -- [warn] using encrypt-and-MAC mode `- [info] available since OpenSSH 6.2 (mac) hmac-sha2-256 -- [warn] using encrypt-and-MAC mode `- [info] available since OpenSSH 5.9, Dropbear SSH 2013.56 (mac) hmac-sha2-512 -- [warn] using encrypt-and-MAC mode `- [info] available since OpenSSH 5.9, Dropbear SSH 2013.56 (mac) hmac-sha1 -- [warn] using encrypt-and-MAC mode `- [warn] using weak hashing algorithm `- [info] available since OpenSSH 2.1.0, Dropbear SSH 0.28 # algorithm recommendations (for OpenSSH 7.7) (rec) -diffie-hellman-group14-sha1 -- kex algorithm to remove (rec) -diffie-hellman-group-exchange-
Any Comments ?
sha256 -- kex algorithm to remove (rec) -ecdh-sha2-nistp256 -- kex algorithm to remove (rec) -ecdh-sha2-nistp384 -- kex algorithm to remove (rec) -ecdh-sha2-nistp521 -- kex algorithm to remove (rec) -ecdsa-sha2-nistp256 -- key algorithm to remove (rec) -hmac-sha1 -- mac algorithm to remove (rec) -hmac-sha2-256 -- mac algorithm to remove (rec) -hmac-sha2-512 -- mac algorithm to remove (rec) -umac-64@openssh.com -- mac algorithm to remove (rec) -umac-128@openssh.com -- mac algorithm to remove (rec) -hmac-sha1-etm@openssh.com -- mac algorithm to remove (rec) -umac-64-etm@openssh.com -- mac algorithm to remove

Any Comments ?

sha256: fe854fc0309db2596eaca1b22f3644b721b89574cf44af563c42c488124069f6