Re: [DNSOP] draft-fujiwara-dnsop-fragment-attack-01.txt

Mark Andrews <marka@isc.org> Mon, 04 March 2019 21:21 UTC

Return-Path: <marka@isc.org>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 147C8130EA8 for <dnsop@ietfa.amsl.com>; Mon, 4 Mar 2019 13:21:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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 ILggnwX_qj3T for <dnsop@ietfa.amsl.com>; Mon, 4 Mar 2019 13:21:26 -0800 (PST)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (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 9BEC812008A for <dnsop@ietf.org>; Mon, 4 Mar 2019 13:21:26 -0800 (PST)
Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id 3F10A3AB03E; Mon, 4 Mar 2019 21:21:26 +0000 (UTC)
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 30FE616006D; Mon, 4 Mar 2019 21:21:26 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 233C1160075; Mon, 4 Mar 2019 21:21:26 +0000 (UTC)
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 79bnU7qIeK89; Mon, 4 Mar 2019 21:21:26 +0000 (UTC)
Received: from [192.168.0.3] (c27-253-115-14.carlnfd2.nsw.optusnet.com.au [27.253.115.14]) by zmx1.isc.org (Postfix) with ESMTPSA id 5D3F916006D; Mon, 4 Mar 2019 21:21:25 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Mark Andrews <marka@isc.org>
In-Reply-To: <20190304.205230.190888329412894893.fujiwara@jprs.co.jp>
Date: Tue, 05 Mar 2019 08:21:21 +1100
Cc: dnsop@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <D8E5727A-D5F1-4734-8710-1A35FE2C6B9A@isc.org>
References: <20190301.211448.2262229485785576167.fujiwara@jprs.co.jp> <8E7BCFB9-4578-4EAB-8CE7-B1C3BEF5B0C4@isc.org> <20190304.205230.190888329412894893.fujiwara@jprs.co.jp>
To: fujiwara@jprs.co.jp
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/qEUCT4AaRaKlL-Nzdg2zdhp6u48>
Subject: Re: [DNSOP] draft-fujiwara-dnsop-fragment-attack-01.txt
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Mar 2019 21:21:29 -0000

You specify a well known TSIG key (e.g. name=“.”, algorithm=hmac-sha256, key=<32-zero-bytes>)
then you use it when you don’t have a more specific key.  If the server support the WKK you
will get back a TSIG signed response that can’t have been forged by a off path attacker if it
matched the response.  There should be enough entropy in a TSIG query without add more but one
can add more by putting random data in the other field prior to generating the request’s hmac.
Otherwise you should get back a BADKEY error if the server supports TSIG and FORMERR, NOTIMP
(without a TSIG record) or a non-TSIG response if the server does not implement TSIG.  Clients
can remember of they get a TSIG response and reject non-TSIG responses in the future or treat
each transaction as independent.  I would expect public DNS resolvers to formally state when
they support this.

The pairwise table I generated was to show what current servers do when presented with a
unknown, unexpected TSIG key.  There are a number of mis-implementation of TSIG shown.  A
few underspecified parts of the TSIG specification which I raise earlier.  There are firewalls
that unnecessarily block requests with TSIG present and there are mis-implementations of STD 13
shown.

If we proceed down this path we will need to get CVE’s issues against all the firewalls and
nameserver implementation that block/drop requests with TSIG presents they should be issued 
for firewalls anyway as it they break the ability to use TSIG.  Servers that mis-implement
TSIG or STD 13 need to be identified and fixed.  A date for removal of workarounds for the
mis-implementations needs to be set (+5 years from publishing should be enough time) along
with a campaign to find at inform the server operators of broken servers.  Tests for WKK
behaviour should be added to delegated server tests and if we don’t go down this path vendors
that implement TSIG at least should be add BADKEY tests to their QA procedures, similarly
vendors that don’t implement TSIG need to add TSIG queries to their QA procedures.

The raw data for the table is available at https://ednscomp.isc.org and is regenerated towards
the end of the month.

Mark

> On 4 Mar 2019, at 10:52 pm, fujiwara@jprs.co.jp wrote:
> 
>> From: Mark Andrews <marka@isc.org>
>> Or one can use TSIG with a well known key to get a cryptograph hash of the response.  Below is how
>> how the servers for the Alexa to 1 Million handle unexpected TSIG.  It’s well under a day to add
>> this to a recursive server that supports TSIG already.  It’s a couple of minutes of configuration
>> time to add it to a authoritative server that supports TSIG already.
> 
> Do you mean adding new method like DNS Cookies ?
> 
> I have a question.
> 
> If a resolver want to take measures,
> does the resolver configure TSIG to communicate all authoritative servers ?
> 
> --
> Kazunori Fujiwara, JPRS <fujiwara@jprs.co.jp>
> 

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: marka@isc.org