-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird KexAlgorithms recommendations in hardening guide #324
Comments
Following intently as ssh is the bane of my life between Windows native, putty, linux, 3rd party eg even Nessus unable to establish in certain cirmstances. IMHO The above a nice take. I agree on the approach of " use the method for removing items from the default set by beginning the list with a "-" character". Example on Debian 12 is that, according to the currently-published ssh-audit scripts at time of writing (30JAN25) I can reduce the entire "hardened" config to 4 lines and get all green except for firewall throttling.
This config might be different in other OS based upon ciphers and suites supported. Its a hard job, respect to all. |
The plot thickens. The openssh daemon will not interpret multiple statements of the same type, it processes the first one in the list. So if we follow the a method of "use the method for removing items from the default set by beginning the list with a "-" character" we do not appear to have the capability to have a corresponding list beginning with a "+" character. ie this
does not work. Where the first line is favoured, using the methodology we can either remove deprecated or not have certain supported-but-not-enabled-by-default items. Why is this a problem? What happens if one does wish to enable [email protected] which according to the openssh documentation is available but disabled by default since version 8.5 and only enabled by default since a later version than the RHEL repo and its variants support. There is no backport. Which brings us full-circle to a statically-configured line as per the hardening guide. |
It's true that this is a potential issue. If you need that (for OpenSSH versions >= 8.5 and < 8.9) then I think your only choice is to spell out the full list. But that is an exceptional case and IMO it would be better treated as such, rather than always spelling out the full list for the sake of the occasional exception. |
From a brief check, it looks as though no currently-supported release of either Debian or Ubuntu is affected by the problem outlined above: I'm just going by versions rather than doing a more detailed check, but it looks as though they all either have no |
Indeed its enabled by default. RHEL/variants have stuff to workaround given the vendor-published signed verified RPM is a little behind. Debian 12 is version 9.2 which has bits enabled by default. |
https://www.ssh-audit.com/hardening_guides.html has perplexing recommendations for
KexAlgorithms
. It includes a bunch of entries there, such asgss-curve25519-sha256-
, which sshd_config(5) does not document as being valid forKexAlgorithms
, but only forGSSAPIKeyAlgorithms
. It may happen to work by luck, but it isn't guaranteed.This is not only strange, but also harmful for multiple reasons:
CASignatureAlgorithms
,Ciphers
,HostbasedAcceptedAlgorithms
,KexAlgorithms
,MACs
, andPubkeyAcceptedAlgorithms
(though unfortunately not toGSSAPIKexAlgorithms
- I only just noticed that discrepancy).The text was updated successfully, but these errors were encountered: