Re: Fixing exchange of host keys in the SSH key exchange

Mouse <mouse@Rodents-Montreal.ORG> Tue, 25 April 2017 05:36 UTC

Return-Path: <bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org>
X-Original-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Delivered-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 53BB61319B7 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Mon, 24 Apr 2017 22:36:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xmIPfUbybVSI for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Mon, 24 Apr 2017 22:36:12 -0700 (PDT)
Received: from mail.netbsd.org (mail.NetBSD.org [IPv6:2001:470:a085:999::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1E527131868 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Mon, 24 Apr 2017 22:36:12 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 5100484DD7; Tue, 25 Apr 2017 05:36:11 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 0E8B884DD4; Tue, 25 Apr 2017 05:36:11 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3BEF984CE3 for <ietf-ssh@netbsd.org>; Tue, 25 Apr 2017 02:55:08 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 6hLbvvTgDh6D for <ietf-ssh@netbsd.org>; Tue, 25 Apr 2017 02:55:07 +0000 (UTC)
Received: from Stone.Rodents-Montreal.ORG (Stone.Rodents-Montreal.ORG [98.124.61.89]) by mail.netbsd.org (Postfix) with ESMTP id 43E7F84CDA for <ietf-ssh@netbsd.org>; Tue, 25 Apr 2017 02:55:06 +0000 (UTC)
Received: (from mouse@localhost) by Stone.Rodents-Montreal.ORG (8.8.8/8.8.8) id WAA22499; Mon, 24 Apr 2017 22:55:05 -0400 (EDT)
Date: Mon, 24 Apr 2017 22:55:05 -0400
From: Mouse <mouse@Rodents-Montreal.ORG>
Message-Id: <201704250255.WAA22499@Stone.Rodents-Montreal.ORG>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Erik-Conspiracy: There is no Conspiracy - and if there were I wouldn't be part of it anyway.
X-Message-Flag: Microsoft: the company who gave us the botnet zombies.
X-Composition-Start-Date: Mon, 24 Apr 2017 22:47:48 -0400 (EDT)
To: ietf-ssh@netbsd.org
Subject: Re: Fixing exchange of host keys in the SSH key exchange
In-Reply-To: <201703251227.IAA20189@Stone.Rodents-Montreal.ORG>
References: <201703251227.IAA20189@Stone.Rodents-Montreal.ORG> <2216143EDEE342A3A5C9BB786F7FEF7A@Khan> <1490340148872.12344@cs.auckland.ac.nz>
Sender: ietf-ssh-owner@NetBSD.org
List-Id: ietf-ssh.NetBSD.org
Precedence: list
List-Unsubscribe: <mailto:majordomo@NetBSD.org?subject=Unsubscribe%20ietf-ssh&body=unsubscribe%20ietf-ssh>

Back on March 25th, I wrote (in the thread about making the client tell
the server what host keys it's able to authenticate using, pre-kex)

> Hmm, I think I'll give moussh a configuration option to send things
> before the ID string, for exactly that reason.

I've now done this.  See the -pre-banner command-line option and the
pre-banner config-file variable.

As the manpage notes,

                             Generating a line beginning `SSH-' with this
             mechanism will break the protocol; moussh contains no checks to
             ensure this isn't done.

I'm not sure whether I think this is the Right Thing.  I came down in
favour of this behaviour, but not by much; if anyone cares to argue in
favour of either position (either the above stance or making sure that
doesn't happen), I'd be interested.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B