Re: [Doh] some privacy ponderings wrt HTTPs and plain DNS

Star Brilliant <m13253@hotmail.com> Mon, 18 June 2018 16:01 UTC

Return-Path: <m13253@hotmail.com>
X-Original-To: doh@ietfa.amsl.com
Delivered-To: doh@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7A423130DF6 for <doh@ietfa.amsl.com>; Mon, 18 Jun 2018 09:01:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.876
X-Spam-Level:
X-Spam-Status: No, score=-0.876 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FORGED_HOTMAIL_RCVD2=0.874, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hotmail.com
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 4aV4lK39Y87Z for <doh@ietfa.amsl.com>; Mon, 18 Jun 2018 09:01:12 -0700 (PDT)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-oln040092002096.outbound.protection.outlook.com [40.92.2.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A02BF130E01 for <doh@ietf.org>; Mon, 18 Jun 2018 09:00:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u8S8Cm/DBzWQpKBd6633U2rG9+7DmF0k4nx9Cy794bw=; b=s6lTDgYE7i1G3ZNQfFZ7EWsbk+vw2wUkq9zxNcVuz+RbKPWnIm7uMBgmhPF2xLwuPMVcB9cuUrdgJAtjm+UzsWbEK06Od7fQdTYT2ehW5YGq7WZg988UpT2YUBzsnSSutCaNB1Wyjzp+O4e9bYZHKkZSFqSlAVJmnu8jkmxmjK7ID4Lb41BlrtRPXMAC5SA/eCN6B8R5g9/9U69Dw8SwOepthEylxSZDazmaIopcztV8AN1gBDhnPPIBLwzh987PUI+M/+APcQa5QqRXxDDN4lZbgcb7k3P8IjpIiZAb7YIQibj01nZKQVEzYh+rQxlK1Ctk63kQM0qU7l47dyDynA==
Received: from SN1NAM01FT020.eop-nam01.prod.protection.outlook.com (10.152.64.59) by SN1NAM01HT159.eop-nam01.prod.protection.outlook.com (10.152.64.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.863.11; Mon, 18 Jun 2018 16:00:45 +0000
Received: from BYAPR19MB2248.namprd19.prod.outlook.com (10.152.64.58) by SN1NAM01FT020.mail.protection.outlook.com (10.152.65.195) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.863.11 via Frontend Transport; Mon, 18 Jun 2018 16:00:45 +0000
Received: from BYAPR19MB2248.namprd19.prod.outlook.com ([fe80::4067:c141:d328:eca3]) by BYAPR19MB2248.namprd19.prod.outlook.com ([fe80::4067:c141:d328:eca3%3]) with mapi id 15.20.0863.016; Mon, 18 Jun 2018 16:00:45 +0000
From: Star Brilliant <m13253@hotmail.com>
To: "doh@ietf.org" <doh@ietf.org>
Thread-Topic: [Doh] some privacy ponderings wrt HTTPs and plain DNS
Thread-Index: AQHUBvaAmxaW+Q43B0mG8u9JY8anIaRmFHwl
Date: Mon, 18 Jun 2018 16:00:45 +0000
Message-ID: <BYAPR19MB22487DA7854991C84B66B47A94710@BYAPR19MB2248.namprd19.prod.outlook.com>
References: <20180618112116.GB9195@server.ds9a.nl>
In-Reply-To: <20180618112116.GB9195@server.ds9a.nl>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-incomingtopheadermarker: OriginalChecksum:DC8EAF62D2E79008A9EC02CB5567FD96A6A9B79F88C71F32D399812AF72FB3FE; UpperCasedChecksum:6FE93A02F65EB91BD4F13C78646B22778FA07879CE7945943E845515A8C84BB9; SizeAsReceived:7079; Count:46
x-ms-exchange-messagesentrepresentingtype: 1
x-tmn: [tks0o/C3PwDyhU7iUAr0Ppune1bhbZhAT+9gyb2lCdFvZ865gvQAgA==]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; SN1NAM01HT159; 7:BRcjvS5mhDSDquYSwUqWGIEBF9/v4jX6t2cl2YdB8qmG3n4BC6dJP4BTiqK3t2EYf6d3k/HcoOfvPaU6PbXBgMh8TxvMmNLxt5xewqNajEAV8C94XBGZH8pWgEMiU5iAgrQ+CfwIJ5Pd+pOE26TlgQIqAON4m0dmkXZcQMwE6R8ts9xn0vJ/DLIPWR1nCCOkfxuxPUmoYsPclB6hfQiqiVpYv9+BCqWmJ8Qro7fjaL1WowXP8xFKxX2eLZKSgwxY
x-incomingheadercount: 46
x-eopattributedmessage: 0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101448)(1701031045); SRVR:SN1NAM01HT159;
x-ms-traffictypediagnostic: SN1NAM01HT159:
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:SN1NAM01HT159; BCL:0; PCL:0; RULEID:; SRVR:SN1NAM01HT159;
x-forefront-prvs: 0707248B64
x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(199004)(189003)(57704003)(6346003)(8676002)(81156014)(2351001)(76176011)(97736004)(5250100002)(7696005)(1730700003)(59450400001)(6506007)(2900100001)(86362001)(486006)(102836004)(3660700001)(476003)(2501003)(5660300001)(8936002)(73972006)(3280700002)(446003)(46003)(11346002)(20460500001)(104016004)(33656002)(106356001)(966005)(68736007)(229853002)(105586002)(99286004)(74316002)(25786009)(6246003)(83332001)(6436002)(87572001)(14454004)(305945005)(5640700003)(82202002)(6916009)(9686003)(6306002)(55016002)(91040200002)(15852004)(42262002); DIR:OUT; SFP:1901; SCL:1; SRVR:SN1NAM01HT159; H:BYAPR19MB2248.namprd19.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:;
received-spf: None (protection.outlook.com: hotmail.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=m13253@hotmail.com;
x-microsoft-antispam-message-info: 6Bep9dx/SRjgLNU9Mf5gWZ5w1TJXszZ3sVc3SsZGWzFhOxTIuQfnqbZkGypEsRoKuyY9nLH+n2RjOfvudEEQ8sdX0iUSvZ7lQMB0WDSi6nLfwzcGDjSWvm9+TiJVL2WndoxPgexNz05PaZqjkVLd7UnFl8JMnbN1xcsFNaLwgGZ7i9bj5u5D2Y8Cvq2EelFO
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: hotmail.com
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: c001924d-3e68-4f40-89c2-901a49278da7
X-MS-Exchange-CrossTenant-Network-Message-Id: be7aca60-659f-486d-89f5-08d5d534a697
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: c001924d-3e68-4f40-89c2-901a49278da7
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2018 16:00:45.2077 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Internet
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM01HT159
Archived-At: <https://mailarchive.ietf.org/arch/msg/doh/H_0dtXWnEHN-FmKAP7J7kUQ_G0o>
Subject: Re: [Doh] some privacy ponderings wrt HTTPs and plain DNS
X-BeenThere: doh@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: DNS Over HTTPS <doh.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/doh>, <mailto:doh-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/doh/>
List-Post: <mailto:doh@ietf.org>
List-Help: <mailto:doh-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/doh>, <mailto:doh-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Jun 2018 16:01:15 -0000

Hi,

I don't think we should not make it default, because most people need these things. We shouldn't include these in the standard either, since it is purely implementation dependent.

You may want to disable these features for your own preference. And you may develop, use, or recommend a client software that has options to disable these features.

Let me describe them item by item (sorry it's long):

*****

> * Set their Agent to 'DoH client', no matter what browser/library

Usually we need to include the software versions, mainly because older software may contain bugs, we need to take special care of them. (e.g. Some old clients may use the obsolete application/dns-udpwireformat or message/dns MIME types, so we need to be compatible.)

Also, we need to give warning or stop service for certain clients that are known to serious security flaws. Otherwise, the users may not be aware that they need to install security patches.

Third, it is useful if we can give separate error messages for human (browser) and standalone clients. Users may accidentally click into a DoH URL without any intention to do DNS query. Do we need to give them a 400 error, or a 302 redirect to a human-readable help page?

*****

> * Do not pass non-essential HTTP headers (like language)

For browsers, we usually cannot control it through XHR API.

For standalone clients, nobody would send extra headers since that requires extra code.

Since we cannot do anything to change it, I think it is useless to talk about it.

*****

> * Do not allow the DoH server to set cookies

Do you know RFC7873? Yes, there is already a Cookie system for traditional DNS protocol. And many public DNS services are already using it to protect against DDoS attack.

Additionally, since DoH protocol usually relies on Keep-Alive connections (otherwise it would be painfully slow), a single connection usually correspond to a single user or a single group of users, isn't it?

Similar to RFC7873 Cookie, HTTP Cookie also serves as a tool to defend servers from DDoS attacks, and is already widely adapted by many leading CDN providers.

My suggestions is to give the user an option to disable Cookies, or limit Cookies to a very short lifetime (e.g. 2 minutes).

So I think it is better to provide an option instead of making the choice for the user. A "disable Cookie" option is already implemented in my implementation of DoH protocol suite (check below for the software).

*****

> * Ponder TLS sessions resumption data settings

I am not familiar with this protocol. I guess disabling it will make connections much slower? (200x CPU time according to CloudFlare blog.)

Anyhow either enabling or disabling it does not affect security, because again, DoH usually relies on Keep-Alive connections and the user's IP can be tracked.

Since this feature can be turned on or off solely on the client side, you can just use a client that disables this feature, without relying anything from the server.

*****

> * Think about all other ways in which HTTP can be tracked (HSTS?)

I don't think HSTS can be a problem if we always copy-and-paste DoH URLs.

You may run a non-standard DoH server through plaintext HTTP protocol for debugging or other purposes. But we strongly disrecommends using any DoH URL that does not starts with "https:".

*****

Extra A: Keep-Alive and Tor

I just talked about Keep-Alive. Since DoH runs over HTTP/2, Keep-Alive is normally enabled. If you are worried about it, you can run a non-standard DoH client with HTTP/1.0 over HTTPS. Please be warned that this is non-standard, and painfully slow, and burdens the server that may cause your IP to be banned by them.

If you use DoH through Tor, I recommend you try CloudFlare's DoH hidden service. It's fast, secure, and private. (Disclaimer: This is purely a personal recommendation and is not related with any promotional activities)

*****

Extra B: ECS and IP tracking

I consider RFC7871 (EDNS Client Subnet) an important feature with DoH. This protocol is used by many traditional servers to provide geolocationally-near results. Servers without ECS rely on Anycast.

Anycast does not solve all problems, especially for some countries where competing ISPs deprioritize inter-ISP traffic. (e.g. China Mobile -> Hong Kong Mobile has lower ping than China Mobile -> China Telecom)

For DoH, which is TCP traffic, Anycast becomes much more difficult so DoH service providers may want to deploy ECS on their servers. A serious issue emerges since ECS submits part of the client's IP address (/24 or /48) to the authoritative DNS server. Some users like this feature, while others hate it for privacy reasons.

A positive scenario of this feature is one of my user from China deployed a DoH server outside China, submitting a Chinese IP address through ECS protocol so he can enjoy an MITM-less DNS life but can also watch videos without lag from CDN servers located in the same ISP with him. (DNS MITM is deployed country-wide inside China.)

I thought about this feature seriously and decided to provide an option for the user in my own implementation. Good news is that, if disabled, I will even send a flag telling upstreams to turn off any already enabled-by-default ECS features.

*****

Conclusions:

I agree that some users need the features Bert Hubert have just enumerated. But for most of the time, these features would decrease service satisfactory for the users.

Users would not prefer DoH if DoH is much slower, or is not DDoS-resistant, or is not GeoDNS-compliant, or is simply not secure enough (privacy != security).

So let's make them options. The world is colorful if DoH implementations are different from each other: some care about privacy and some do good on lightning speed.

*****

My implementation:

I took my own DoH implementation as an example of providing abundant options for the sake of users' privacy.

If you want to check it and give suggestions to it, please refer to https://github.com/m13253/dns-over-https .


-- 
Best regards,
StarBrilliant