Re: [DNSOP] SIG(0) useful (and used?)

Tom Pusateri <pusateri@bangj.com> Thu, 21 June 2018 19:34 UTC

Return-Path: <pusateri@bangj.com>
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 8C525130EE9 for <dnsop@ietfa.amsl.com>; Thu, 21 Jun 2018 12:34:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=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 zUhNoBHkufpS for <dnsop@ietfa.amsl.com>; Thu, 21 Jun 2018 12:34:17 -0700 (PDT)
Received: from oj.bangj.com (amt0.gin.ntt.net [129.250.11.170]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 96F21130E10 for <dnsop@ietf.org>; Thu, 21 Jun 2018 12:34:17 -0700 (PDT)
Received: from [10.46.144.157] (unknown [209.59.114.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by oj.bangj.com (Postfix) with ESMTPSA id 1F4AC253; Thu, 21 Jun 2018 15:34:10 -0400 (EDT)
From: Tom Pusateri <pusateri@bangj.com>
Message-Id: <ECDE3B3C-A865-41B9-B188-F6C6DED2467A@bangj.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_FCA7482F-6BDA-45B6-8AB8-56513D6F6EFA"
Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\))
Date: Thu, 21 Jun 2018 15:31:50 -0400
In-Reply-To: <CAHPuVdWnm8nCHD4DbC=LnPoJgch7ZO7NuitHECnMxsrVLZExqA@mail.gmail.com>
Cc: vladimir.cunat+ietf@nic.cz, "dnsop@ietf.org WG" <dnsop@ietf.org>
To: Shumon Huque <shuque@gmail.com>
References: <6C8533C2-6510-4A0E-A7EA-50EB83E43A7D@isc.org> <6B764CF2-FC1F-4B55-B4A3-F49729847DCF@bangj.com> <b85eb6ec-8d4c-221a-35ac-4c4efb9bd5c4@nic.cz> <56702D15-B557-4A9E-BD18-5379105CCB30@bangj.com> <CAHPuVdWnm8nCHD4DbC=LnPoJgch7ZO7NuitHECnMxsrVLZExqA@mail.gmail.com>
X-Mailer: Apple Mail (2.3445.8.2)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/Sflbbby6IoUFXb9Go_F6PCYPWOo>
Subject: Re: [DNSOP] SIG(0) useful (and used?)
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.26
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: Thu, 21 Jun 2018 19:34:21 -0000


> On Jun 21, 2018, at 1:40 PM, Shumon Huque <shuque@gmail.com> wrote:
> 
> On Thu, Jun 21, 2018 at 8:05 AM Tom Pusateri <pusateri@bangj.com <mailto:pusateri@bangj.com>> wrote:
>> On Jun 21, 2018, at 12:19 AM, Vladimír Čunát <vladimir.cunat+ietf@nic.cz <mailto:vladimir.cunat+ietf@nic.cz>> wrote:
>> 
>> On 06/20/2018 04:59 PM, Tom Pusateri wrote:
>>> DNSSEC will tell you the answer you get is correct but it could be a > to a different question or be incomplete.
>> Can you elaborate on that point.  I believe in signed zones you are able
>> to verify almost everything, in particular existence of the queried-for
>> RRset and its exact value, except for details like current TTL.
>> 
>> --Vladimir
>> 
> 
> I’ve been thinking about the case when you are given a DNS recursive resolver over DHCP and you don’t necessarily trust it.
> 
> SIG(0) can't really protect you from an untrustworthy resolver. It can ensure that the question you sent and the answer you got back from the recursive server was not tampered with in-flight. But it can't detect whether the recursive server modified any data in its response before it signed it with SIG(0). If the response contained DNSSEC signed data and the stub was validating, then those pieces of the response could be authenticated. But not anything in the header, question etc - all of that could have been modified by the recursive server without detection.
>  
> If you send a query with the DO bit set to a recursive resolver for the A record for foo.example.com <http://foo.example.com/> and the recursive resolver modifies this query to foo.exampl.com <http://foo.exampl.com/>, you can get back a validated DNSSEC response with the A record answer, RRSIG, NSEC(3) records all for the wrong question. The resolver code in the OS or application would get back the matching DNS header identifier and if it lazily just grabbed the A record answer without comparing the RR name, it could be misled. You can detect this without SIG(0) so maybe that was a bad example. But if you always sent a SIG(0) signed question and got a signed answer, you could detect this and possibly other future attacks and drop it before even parsing the answers.
> 
> Most competent resolvers will check that the response that they got back was for the question they asked. So I don't think they would "lazily just grab the A record answer without comparing the RR name".
> 
> I don't think SIG(0) really helps much here. The response signature has to include the entire query message, but the actual response can contain anything the recursive server puts in there.
>  
> In the case of missing answers, I was thinking that if there were multiple A records in the response and some were filtered, you could not detect this without a SIG(0) signed response from the authoritative server. This would be important if one server was compromised and the recursive resolver filtered the response to exclude the other A records pointing to servers that weren’t compromised directing you to the compromised server.
> 
> DNSSEC is really the solution to this problem. DNSSEC signatures cover the entire RRset, so authoritative (or recursive) servers cannot strip away some of the RRs without detection by a downstream validator.
> 
> Shumon.
> 

Thanks. In the case where a zone isn’t signed but the authoritative server supports SIG(0), the response could be verified that it includes exactly what the server sent. But the KEY would need to be DNSSEC validated or it probably can’t be trusted to verify the SIG(0) response.

Tom