Re: [TLS] MITM Attacks on Client Authentication after Resumption

mrex@sap.com (Martin Rex) Wed, 05 March 2014 12:56 UTC

Return-Path: <mrex@sap.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CCF261A03A6 for <tls@ietfa.amsl.com>; Wed, 5 Mar 2014 04:56:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.552
X-Spam-Level:
X-Spam-Status: No, score=-6.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] 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 JEZN8YW4RlaA for <tls@ietfa.amsl.com>; Wed, 5 Mar 2014 04:56:47 -0800 (PST)
Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.170]) by ietfa.amsl.com (Postfix) with ESMTP id 1AE161A00A2 for <tls@ietf.org>; Wed, 5 Mar 2014 04:56:46 -0800 (PST)
Received: from mail05.wdf.sap.corp by smtpde01.sap-ag.de (26) with ESMTP id s25Cugwx025678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Mar 2014 13:56:42 +0100 (MET)
In-Reply-To: <20140303231316.03E2E1AC37@ld9781.wdf.sap.corp>
To: mrex@sap.com
Date: Wed, 5 Mar 2014 13:56:42 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20140305125642.0B9871AC3E@ld9781.wdf.sap.corp>
From: mrex@sap.com (Martin Rex)
X-SAP: out
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/DLfXES6THuzeJy02GPij6Co0fHY
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] MITM Attacks on Client Authentication after Resumption
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: mrex@sap.com
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Mar 2014 12:56:53 -0000

I've just started wondering:  Is the real problem acutally
worse than described, and will changing the Master Secret computation
actually _not_ fix the renegotiation problem?

I wrote:
> 
> The original renegotiation problem and the newly describe session resumption
> problem are very similar:  flawed assumptions about a cryptographic binding
> that doesn't exist.  But until you write down the exact properties and
> think about it, you may not notice the problem.  As soon as you write it
> down, the problem becomes obvious.
> 
> The abbreviated TLS handshake authenticates only the MasterSecret.
> But the MasterSecret is derived exclusively from ClientHello.random,
> ServerHello.random and the keyExchange transform, there is no cryptographic
> binding to any identities that are authenticated during the TLS handshake.
> 
> 
> So the fix of the abbreviated TLS handshake needs to account for the
> (re-)authentication of the identities of the original full handshake,
> either by modifying the MasterSecret computation or by authenticating
> the original full handshake during the abbreviated TLS handshake
> through a TLS extension similar to how the renegotiation_info extension
> does this in the renegotiation handshake.


The only "non-static" data covered by the Finished handshake messages of
the abbbreviated TLS handshake (i.e. that goes into the renegotiation_info
of the resumed TLS handshake are):

    ClientHello.random
    ServerHello.random
    ClientHello.session_id == ServerHello.session_id

In particular, there is *NO* dependency on the MasterSecret, so
the attack by an MitM should be possible, even if the MasterSecrets
differ between the two sessions that are merged (I never had a
requirement in my attack scenario that the MasterSecrets are the
same; in fact I wasn't even aware that it was possible to
create two SSL sessions with identical MasterSecrets & traffic keys
when I described my attack).  The MitM will only have to
decrypt and re-encrypt the data during the original two sessions.

The handshake_message hash does not "see" the encryption, it operates
on the plaintext only.

So it seems to me that changing the MasterSecret computation will
not help.  We need a TLS extension on the abbreviated TLS handshake
that authenticates the original full handshake, such as the
renegotiation_info from that handshake.

-Martin