question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

client audit vs client hardening guide

See original GitHub issue

Hi @jtesta

I just discovered the client hardening mode.

I run Ubuntu 18.04 on my laptop.

I applied the changes from your hardening guide

https://www.ssh-audit.com/hardening_guides.html#ubuntu_18_04_linux_mint_19

and then I started the client audit via python3.8 ssh-audit.py -c and then on a second terminal, I sshed into localhost port 2222.

Expected I expected all output to be green.

what I got

# general
(gen) client IP: 127.0.0.1
(gen) banner: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
(gen) software: OpenSSH 7.6p1
(gen) compression: enabled (zlib@openssh.com, zlib)

# key exchange algorithms
(kex) curve25519-sha256                         -- [info] available since OpenSSH 7.4, Dropbear SSH 2018.76
(kex) curve25519-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-sha256      -- [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-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-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
(kex) ext-info-c

# host-key algorithms
(key) ecdsa-sha2-nistp256-cert-v01@openssh.com  -- [fail] using weak elliptic curves
                                                `- [warn] using weak random number generator could reveal the key
                                                `- [info] available since OpenSSH 5.7
(key) ecdsa-sha2-nistp384-cert-v01@openssh.com  -- [fail] using weak elliptic curves
                                                `- [warn] using weak random number generator could reveal the key
                                                `- [info] available since OpenSSH 5.7
(key) ecdsa-sha2-nistp521-cert-v01@openssh.com  -- [fail] using weak elliptic curves
                                                `- [warn] using weak random number generator could reveal the key
                                                `- [info] available since OpenSSH 5.7
(key) ssh-ed25519-cert-v01@openssh.com          -- [info] available since OpenSSH 6.5
(key) ssh-rsa-cert-v01@openssh.com              -- [info] available since OpenSSH 5.6
(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) ecdsa-sha2-nistp384                       -- [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) ecdsa-sha2-nistp521                       -- [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
(key) rsa-sha2-512                              -- [info] available since OpenSSH 7.2
(key) rsa-sha2-256                              -- [info] available since OpenSSH 7.2
(key) ssh-rsa                                   -- [fail] using weak hashing algorithm
                                                `- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28

# 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.6)
(rec) -diffie-hellman-group-exchange-sha1       -- 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) -ecdsa-sha2-nistp256-cert-v01@openssh.com -- key algorithm to remove 
(rec) -ecdsa-sha2-nistp384                      -- key algorithm to remove 
(rec) -ecdsa-sha2-nistp384-cert-v01@openssh.com -- key algorithm to remove 
(rec) -ecdsa-sha2-nistp521                      -- key algorithm to remove 
(rec) -ecdsa-sha2-nistp521-cert-v01@openssh.com -- key algorithm to remove 
(rec) -ssh-rsa                                  -- key algorithm to remove 
(rec) -diffie-hellman-group14-sha1              -- kex algorithm to remove 
(rec) -hmac-sha1                                -- mac algorithm to remove 
(rec) -hmac-sha1-etm@openssh.com                -- mac algorithm to remove 
(rec) -hmac-sha2-256                            -- mac algorithm to remove 
(rec) -hmac-sha2-512                            -- mac algorithm to remove 
(rec) -umac-128@openssh.com                     -- mac algorithm to remove 
(rec) -umac-64-etm@openssh.com                  -- mac algorithm to remove 
(rec) -umac-64@openssh.com                      -- mac algorithm to remove 

# additional info
(nfo) For hardening guides on common OSes, please see: <https://www.ssh-audit.com/hardening_guides.html>

My ssh config contains some jumphost configurtations, and then on the bottom your suggested changes which I echoed into the file.

# lots of hosts...

Host xxx
    Hostname 192.168.1.220
    ProxyJump yyy

Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,ssh-rsa-cert-v01@openssh.com

I tried to google about client hardening, but almost all information out there is about server hardening.

Any hint for me what to do?

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sleepnmojocommented, Aug 8, 2020

The guide just needs to add “Host *\n” before “Ciphers”. The current guide just adds the values to the last host.

If you put it at the top of the file, that will become the default for all hosts. If you need to override any of the values, then those hosts would need to go above the defaults.

1reaction
jtestacommented, Jul 22, 2020

Oh ok. Yes, I suppose I do need to update the guides so they put the options at the top of the config file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSH Client Auditing & Hardening - Positron Security
The good news is that the OpenSSH client can be easily hardened, either system-wide by putting configuration changes in /etc/ssh/ssh_config , or ...
Read more >
Security baselines guide | Microsoft Learn
Security baselines are an essential benefit to customers because they bring together expert knowledge from Microsoft, partners, and customers.
Read more >
Server Hardening Policy: Examples and Tips - Netwrix Blog
Data Protection and Information Security best practice guidelines always place server hardening at the top of the list of measures that ...
Read more >
SLES 15 SP2 | Understanding Linux Audit
The audit records can be examined to determine whether any violation of the security policies has been committed, and by whom. Providing an...
Read more >
Hardening guide | XProtect® VMS - Milestone Documentation
This guide describes security and physical security measures and best practices that can help secure your. XProtect video management software (VMS) against ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found