Nmap Development mailing list archives
Re: ssh-hostkey assertion
From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 26 Aug 2014 08:49:01 -0500
On Mon, Aug 25, 2014 at 10:32 PM, Kent Fritz <kfritz () wolfman devio us> wrote:
On Mon, Aug 25, 2014 at 06:06:59PM -0500, Daniel Miller wrote:The assertion is triggered by a failure to extract the payload andpaddinglengths from an SSH2 packet. I can't reproduce this, so could you provide either the output with --packet-trace or (preferably) a pcap of the transaction?I'll send a pcap off-list.I couldn't reproduce this with OpenSSH 6.6 on OpenBSD 5.5, which is the latest released version on http://www.openssh.com. Did you install this from the development tree or is something else going on?I'm running a recent snapshot, which is probably very close to what will be released as 5.6 in November. I don't have 5.5 installed anywhere (never bothered due to OpenSSL bugs). I suspect that some key exchange algorithm got deprecated.
Kent, Thanks again for this bug report. I fixed it in r33615; you can reproduce with any OpenSSH server by setting: KexAlgorithms diffie-hellman-group14-sha1 in your sshd_config. We were assuming (based on the RFC 4253 "MUST be supported" language) that diffie-hellman-group1-sha1 would always be supported. I just added the group14 kex method, but this may be solved in the future by moving to libssh2 for these things instead of doing our own in Lua. Commit method follows, patch is attached if you are not using our latest development branch. r33615 | dmiller | 2014-08-26 08:35:25 -0500 (Tue, 26 Aug 2014) | 9 lines Support diffie-hellman-group14-sha1 in ssh2.lua ssh-hostkey was hitting an assertion failure when scanning OpenSSH 6.7. The cause was a failure to check for a shared KEX algorithm. We just assumed diffie-hellman-group1-sha1 would be supported, since RFC 4253 says it "MUST be supported". This adds support for group14, which is a 2048-bit modulus; key strength was likely the reason for dropping group1. A more complete solution would be to support more KEX algorithms, but that's beyond the scope of the bug report.
Attachment:
ssh2.patch
Description:
_______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- ssh-hostkey assertion Kent Fritz (Aug 25)
- Re: ssh-hostkey assertion Daniel Miller (Aug 25)
- Re: ssh-hostkey assertion Kent Fritz (Aug 25)
- Re: ssh-hostkey assertion Daniel Miller (Aug 26)
- Re: ssh-hostkey assertion Kent Fritz (Aug 25)
- Re: ssh-hostkey assertion Daniel Miller (Aug 25)