Re: [DNSOP] Strange EDNS Header Flags in DNS packet

Nicholas Weaver <nweaver@icsi.berkeley.edu> Tue, 17 December 2013 13:11 UTC

Return-Path: <nweaver@icsi.berkeley.edu>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0A94C1ADFCA for <dnsop@ietfa.amsl.com>; Tue, 17 Dec 2013 05:11:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.439
X-Spam-Level:
X-Spam-Status: No, score=-2.439 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.538, 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 mv2mZgk6Ek6K for <dnsop@ietfa.amsl.com>; Tue, 17 Dec 2013 05:11:42 -0800 (PST)
Received: from rock.ICSI.Berkeley.EDU (rock.ICSI.Berkeley.EDU [192.150.186.19]) by ietfa.amsl.com (Postfix) with ESMTP id 80EB61ADF63 for <dnsop@ietf.org>; Tue, 17 Dec 2013 05:11:42 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by rock.ICSI.Berkeley.EDU (Postfix) with ESMTP id C4A182C400D; Tue, 17 Dec 2013 05:11:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at ICSI.Berkeley.EDU
Received: from rock.ICSI.Berkeley.EDU ([127.0.0.1]) by localhost (maihub.ICSI.Berkeley.EDU [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2osde9wWuH-2; Tue, 17 Dec 2013 05:11:41 -0800 (PST)
Received: from [10.0.1.14] (c-76-103-162-14.hsd1.ca.comcast.net [76.103.162.14]) (Authenticated sender: nweaver) by rock.ICSI.Berkeley.EDU (Postfix) with ESMTP id DAE642C4003; Tue, 17 Dec 2013 05:11:40 -0800 (PST)
Content-Type: multipart/signed; boundary="Apple-Mail=_97D0F449-5BCA-4213-A743-DB2BA74FAC87"; protocol="application/pgp-signature"; micalg="pgp-sha512"
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
From: Nicholas Weaver <nweaver@icsi.berkeley.edu>
In-Reply-To: <20131217084735.GA514@nic.fr>
Date: Tue, 17 Dec 2013 05:11:42 -0800
Message-Id: <36D65BF9-A422-43A2-A200-DD22D696871E@icsi.berkeley.edu>
References: <tencent_02939F0C1F9AD7160D7A8B86@qq.com> <20131217084735.GA514@nic.fr>
To: Stephane Bortzmeyer <bortzmeyer@nic.fr>, Jianjun Ning <to@arey.cn>
X-Mailer: Apple Mail (2.1510)
Cc: dnsop <dnsop@ietf.org>, Nicholas Weaver <nweaver@icsi.berkeley.edu>
Subject: Re: [DNSOP] Strange EDNS Header Flags in DNS packet
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Tue, 17 Dec 2013 13:11:46 -0000

On Dec 17, 2013, at 12:47 AM, Stephane Bortzmeyer <bortzmeyer@nic.fr> wrote:

> On Tue, Dec 17, 2013 at 04:21:35PM +0800,
> Jianjun Ning <to@arey.cn> wrote 
> a message of 61 lines which said:
> 
>> ;; OPT PSEUDOSECTION:
>> ; EDNS: version: 0, flags:; MBZ: 0005 , udp: 512
>> ;; QUESTION SECTION:
>> ;www.google.com.hk.             IN      A
>> 
>> The value of field MBZ is 0x0005!!
> 
> The Google authoritative name servers do not seem to return a EDNS
> section in their answers. Therefore, this section has probably been
> added by your resolver, or by a middleman (something which is quite
> common in China).

The great firewall packet injector is easy to detect.  Because it only responds to queries, target your dig (using @) to an IP that isn't hosting a DNS server.

So, eg,

dig +norecurse +bufsize=768 www.google.com.hk @192.150.187.1

(Sends to ICSI, but not our DNS server, so you know the route goes to the west coast of the US)


--
Nicholas Weaver                  it is a tale, told by an idiot,
nweaver@icsi.berkeley.edu                full of sound and fury,
510-666-2903                                 .signifying nothing
PGP: http://www1.icsi.berkeley.edu/~nweaver/data/nweaver_pub.asc