Re: [tcpm] [tcpinc] TCP Stealth - possible interest to the WG

Christian Grothoff <christian@grothoff.org> Wed, 20 August 2014 11:56 UTC

Return-Path: <christian@grothoff.org>
X-Original-To: tcpm@ietfa.amsl.com
Delivered-To: tcpm@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A7A461A0270; Wed, 20 Aug 2014 04:56:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.25
X-Spam-Level:
X-Spam-Status: No, score=-3.25 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, J_CHICKENPOX_35=0.6, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham
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 EVJrIe5CWFRN; Wed, 20 Aug 2014 04:56:22 -0700 (PDT)
Received: from smtp1.informatik.tu-muenchen.de (mail-out1.informatik.tu-muenchen.de [131.159.0.8]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 92E3E1A0201; Wed, 20 Aug 2014 04:56:22 -0700 (PDT)
Received: from [192.168.178.20] (pd95c0f92.dip0.t-ipconnect.de [217.92.15.146]) by mail.net.in.tum.de (Postfix) with ESMTPSA id 77CF519BF034; Wed, 20 Aug 2014 13:56:16 +0200 (CEST)
Message-ID: <53F48CE0.1020507@grothoff.org>
Date: Wed, 20 Aug 2014 13:56:16 +0200
From: Christian Grothoff <christian@grothoff.org>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0
MIME-Version: 1.0
To: "Scheffenegger, Richard" <rs@netapp.com>, Jacob Appelbaum <jacob@appelbaum.net>
References: <ecdbe694b6964c159f64b1d3311c8cc6@hioexcmbx02-prd.hq.netapp.com> <CAFggDF2jhQPz0Eez=AU9M-k862wD_=VSyVpXtRAjT4zC6H4tgA@mail.gmail.com> <1408397675.299896.154112109.6F69043F@webmail.messagingengine.com> <8c5f6a1e9f2340e48e25dd151406b7d3@hioexcmbx05-prd.hq.netapp.com> <1408401991.317123.154137701.0A30F30C@webmail.messagingengine.com> <CAPh34meB=EtgNu=_eBS6ekB20fRccAqXFWydkCWG+6VKSa98rg@mail.gmail.com> <CAFggDF39L+kLQLmiWJR3q6suPOtYmKJiJUqp0kBv7GjUtNVOjA@mail.gmail.com> <CAPh34mdPtKvVJ2FfshPFwrwRDOw9CxxHT4ZTFYZZEVSoKOEq0A@mail.gmail.com> <53F3970D.5080906@grothoff.org> <CAPh34mf2rnNuM=YZ1uin1_PtkB8buOskMtf3NAJMOwdFeMe9MQ@mail.gmail.com> <53F39FAC.9070500@grothoff.org> <817214c2e5b444c7a780c1387e91da15@hioexcmbx05-prd.hq.netapp.com>
In-Reply-To: <817214c2e5b444c7a780c1387e91da15@hioexcmbx05-prd.hq.netapp.com>
X-Enigmail-Version: 1.6
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Archived-At: http://mailarchive.ietf.org/arch/msg/tcpm/1AjFRLiLx3kPn8cOCRHCUWEsvH4
X-Mailman-Approved-At: Wed, 20 Aug 2014 08:05:30 -0700
Cc: "tcpm (tcpm@ietf.org)" <tcpm@ietf.org>, "tcpinc@ietf.org" <tcpinc@ietf.org>, Joe Touch <touch@isi.edu>
Subject: Re: [tcpm] [tcpinc] TCP Stealth - possible interest to the WG
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tcpm/>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Aug 2014 11:56:24 -0000

On 08/20/2014 01:23 PM, Scheffenegger, Richard wrote:
> Jacob, Christian,
> 
> To add some constructive discussion points:
> 
> 
> As the editor of RFC7323 (soon to be released), which is the update
> to 1323, and the discussion I looked at over at
> http://thread.gmane.org/gmane.linux.network/294386 and of course
> here, I was wondering if you might have it backwards...
> 
> 
> I have not seen a convincing enough argument, that running a fixed
> ISN for a 4-tuple is really safe. (And yes, re-use of a 4-tuple
> should be rare, but it can happen).
> 
> Also, you want to add some additional "randomness" by adding the
> TSval into the hash, if available.

We do that, did you even read the draft?

> However, TSval is not random, it's in most implementations a pretty
> accurate uptime indicator (that this in itself is a bad idea, is
> known for a long time. That it would make sense to randomize the
> TSval in the same way as the ISN is now much more prominently stated
> in RFC7323).

We do agree that the TSval should be randomized.

> So, I could not help myself from wondering, if you haven't got your
> fields backwards....
> 
> If you want undetectable knocking, which authenticates a particular
> user, why not transport that hash as TSval (or optionally, the
> unused/empty TSecr; however, that would be detectable to someone with
> a sniffer, as early Win95 is not really that common any more). That
> would leave TCP ISN alone  - and as a true core component, arguing
> for a modification there has to come with very good arguments. Also,
> it would serve to randomize the TSval - as ISN is supposed to be
> choosen randomly - thus help close another indirect exploit vector.

Right now, TSval is rarely chosen at random by implementations (see our
measurement study in Julian's thesis).  So putting the authenticator
into the TSval would have provided an easy distinguisher, which we
wanted to avoid.  However, I would in principle support _also_ using the
TSval, that way we could get 64 bits.  But, as said before, this is a
trade-off with respect to how many middleboxes will work, as some fiddle
with TSval but not the ISN (and vice versa).

> And as you already stated that connections across Meddleboxes (those
> that tweak around with ISN or TSval) are out of scope and may fail,
> you don't really reduce the population of sessions that could benefit
> from this.

Based on our experiments, it would reduce it only slightly (within the
margin of error of our experiments), so yes, that maybe acceptable.

> 
> Finally, as TSopt is optional, modifications there have a much lower
> bar for acceptance, compared to a modification like the ISN; a server
> implementing the scheme would still be free to silently discard TCP
> SYNs without TSOpt, or the wrong TSval / TSecr... (As you could
> instruct your firewall to block empty, non-related RSTs).
> 
> Finally, the combination of TSval/TSecr would yield 64 bits, btw. But
> only on the SYN...

Right, but the SYN is what matters most IMO.  We could use 32 bits of
the ISN for the content integrity protector, and another 32 bits of the
timestamp for the authenticator part, that would be fine.  But, as I
said, the problem is that this means that handshakes doing so would
stand out from current traffic.  So really this is a bit of a trade-off
between passive detection of the knock in the current environment and
getting a few more bits of security.

Another issue maybe that some current OSes don't use TSval at all, so I
figured just changing the ISN calculation might be the more conservative
suggestion, but again, this is clearly a trade-off and if IETF decided
to instead to ISN+TSval or even just TSval, I would still consider this
a big progress.

Happy hacking!

Christian