Re: [IPsec] draft-pauly-ipsecme-split-dns

Paul Wouters <paul@nohats.ca> Tue, 19 June 2018 16:41 UTC

Return-Path: <paul@nohats.ca>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 307E7131189; Tue, 19 Jun 2018 09:41:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nohats.ca
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 aYbynjeSV0nY; Tue, 19 Jun 2018 09:41:07 -0700 (PDT)
Received: from mx.nohats.ca (mx.nohats.ca [IPv6:2a03:6000:1004:1::68]) (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 B5E251311AD; Tue, 19 Jun 2018 09:41:06 -0700 (PDT)
Received: from localhost (localhost [IPv6:::1]) by mx.nohats.ca (Postfix) with ESMTP id 419DHJ0RrTzF5H; Tue, 19 Jun 2018 18:41:00 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nohats.ca; s=default; t=1529426460; bh=MbkDt1BBuml2Auk/wWXPTMolxFBuwx47rPt5pL5UHio=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=Xj8zLjIcF2GfvA6HcMnIbTNnXRc9sZaJoHUE5b7WwxLQfDKR6Ma7WqikPhA1MTSsD jArv+EuHJBXx99Y0aUrYchNymA+TINQClkNX8Uvouk7m8LNnACt43a3ABVjXiArtrg aZaxisyXdqqrYqw6GpLaKvVlFTlBheAPqvVaPeUw=
X-Virus-Scanned: amavisd-new at mx.nohats.ca
Received: from mx.nohats.ca ([IPv6:::1]) by localhost (mx.nohats.ca [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id F6nqtrIZ1wpi; Tue, 19 Jun 2018 18:40:57 +0200 (CEST)
Received: from bofh.nohats.ca (bofh.nohats.ca [76.10.157.69]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.nohats.ca (Postfix) with ESMTPS; Tue, 19 Jun 2018 18:40:56 +0200 (CEST)
Received: by bofh.nohats.ca (Postfix, from userid 1000) id 7C0EC4FB769; Tue, 19 Jun 2018 12:40:55 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 bofh.nohats.ca 7C0EC4FB769
Received: from localhost (localhost [127.0.0.1]) by bofh.nohats.ca (Postfix) with ESMTP id 72A7D4070C0D; Tue, 19 Jun 2018 12:40:55 -0400 (EDT)
Date: Tue, 19 Jun 2018 12:40:55 -0400
From: Paul Wouters <paul@nohats.ca>
To: Eric Rescorla <ekr@rtfm.com>
cc: IPsecME WG <ipsec@ietf.org>, "Waltermire, David A. (Fed)" <david.waltermire@nist.gov>, Tero Kivinen <kivinen@iki.fi>, "draft-ietf-ipsecme-split-dns.all@ietf.org" <draft-ietf-ipsecme-split-dns.all@ietf.org>
In-Reply-To: <CABcZeBPFw1iuHXV+_sEuMaRCYRSk1nH_FujeimOb=ViEAtvkVA@mail.gmail.com>
Message-ID: <alpine.LRH.2.21.1806191159310.26059@bofh.nohats.ca>
References: <BL0PR0901MB23061A8F0712B88D36CB05B4F0710@BL0PR0901MB2306.namprd09.prod.outlook.com> <BL0PR0901MB23068BA2032457DC76CE70E2F0710@BL0PR0901MB2306.namprd09.prod.outlook.com> <CABcZeBOi6BoBFdkq9iz6GPLR+f5SJ8uR68GFS0Lsd+1UvHcCvQ@mail.gmail.com> <alpine.LRH.2.21.1806181637240.22748@bofh.nohats.ca> <CABcZeBPZFswnn6zoK6h-Oiy8P1o5u-BVVExQSO48fxGWy1cwXQ@mail.gmail.com> <alpine.LRH.2.21.1806181644520.22748@bofh.nohats.ca> <CABcZeBPf6TEh3JtYwT7D6+90y40W7y_=Hx03xNzLxEuQM_YsLQ@mail.gmail.com> <alpine.LRH.2.21.1806181702230.13143@bofh.nohats.ca> <CABcZeBOa8qMhDyCMzPTAtUBZTYPGehrhPrr6h4cVCjP4QZ1+Ew@mail.gmail.com> <alpine.LRH.2.21.1806191109300.16269@bofh.nohats.ca> <CABcZeBPFw1iuHXV+_sEuMaRCYRSk1nH_FujeimOb=ViEAtvkVA@mail.gmail.com>
User-Agent: Alpine 2.21 (LRH 202 2017-01-01)
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/6DUAygBTZOEGmFP_BxNolck8O8g>
Subject: Re: [IPsec] draft-pauly-ipsecme-split-dns
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jun 2018 16:41:22 -0000

On Tue, 19 Jun 2018, Eric Rescorla wrote:

>       Yes. You are the Enterprise customer. It's a feature.
> 
> Not all enterprises who use VPNs want to run a MITM proxy.

So only specify INTERNAL_DNS_DOMAIN with "internal.example.com"
and all TA's outside that domain would not be accepted by the client.

> The basic problem here is that the security properties of DNS are
> radically different from those of the WebPKI (which is why we
> routinely rely on HTTPS in cases where DNS is untrustworthy).
> So, it's totally unexpected that allowing the VPN operator to
> inject a new DNS trust anchor would allow them to attack HTTPS
> connections. The problem with this design is that it ties those
> properties together. This is a problem for the users but also for
> the enterprise because it takes something which might have
> been offline signed and makes it online.

Local policy gives clients the chance to only allow preconfigured
domain(s) to be accepted for redirection over the VPN, with or
without trust anchors. If the network operator is smart, they have
only one internal-only zone in use. And the client accepting that
trust anchor is not a problem. In the case of the network insisting
you need to accept dozens of trust anchors, then yes the network
administrator makes it hard or impossible for their users to engage
in anything other then blind trust of their enterprise devices.
(but to be fair, you are in that situation already when you take
  that enterprise pre-installed laptop)

>       Client
>       implementations can limit these domains, eg using VPN profiles
>       that the user has to agree to. There is not much more we can do
>       at the protocol leven, than say the two things we already say:
>
>       1) If not split-view, do not accept any DNS trust anchors
>
>       This prevents third party VPN providers from injecting rogue trust
>       anchors. Note that in this case you already _are_ giving all your
>       traffic including DNS to the VPN server. (but hey, we have DOH)
>
>       2) Don't accept trust anchors for anything not specifically
>          split-redirected into the VPN infrastructure
>
>       So in my redhat case, I would either allow "redhat.com" or
>       "internal.redhat.com" to be redirected through my VPN profile
>       and not anything else. (well, actually some reverse zone parts too)
> 
> 
> There are actually a number of oither things you could do:
> 
> - Totally forbid the use of TLSA signed by non-default trust anchors

The IKE/IPsec protocol should not modify the DNS protocol. The fact
that control of a certain (sub)domain is transfered via a private
view reachable via IPsec is a feature, not a bug. That would also break
the use of TLSA records in those private/internal views.

Practically speaking, in my setup, the unbound daemon cannot tell the
difference between trust anchors loaded via IKE/IPsec or via another
method.

> - Make the use of TLSA signed by non-default trust anchors a separate
> protocol option with those trust anchors defined separately.

That goes against the goal of the protocol. The goal _is_ to place a
certain (internal only) domain fully under control of the network of
the VPN server. Including all security features and trust anchors within
that zone.

> I imagine there are other choices.

This protocol extension is explicitely to add or a move a subdomain in
the public DNS view to a private DNS view, after the user has given
permission for this. Any suggestions to do otherwise is undesired.

> Trust isn't a monolithic thing.

Right, we are in fact carving out a little bit to move that trust
from the public DNS view to a private trusted actor.

> It's one thing to trust the administrator to route
> your packets and quite another to trust them to MITM TLS.

MITM TLS for those domains you have given them permission for.

> Again, this is
> why it's mostly safe to use HTTPS on networks owned by other people.

And it is _still_ save to use other people's domains unrelated to the
internal vpn zone(s) for HTTPS and no new trust anchors are added
that would compromise that security.

Also, look at it from the reverse perspective. The enterprise might like
the security of their highly valuable non-public servers/data to be higher
then trusting 500+ webpki entities and google/mozilla, patched up with CT.
They might want to rely on DANE/DNSSEC that's actually fully under only
their own organisations sole control, bys using that overriding local
trust anchor. Including for TLSA/HTTPS on their private servers. Why would
you want to prevent them from leveling that extra security?

>       Note that without this document, the only way for VPN clients to get
>       functional DNS beyond the 1 hardcoded domain, is to give the VPN all
>       your DNS queries, which allows even more manipulation (especially with
>       an installed Enterprise CA cert, now they can override gmail.com)
> 
> 
> I'm not saying this document is bad. I'm saying it should exclude TLSA.

I'm saying that cannot happen without breaking to use of TLSA in
internal networks. Also, then the issue moves to IPSECKEY records
which have an even stronger case to be used with internal DNSSEC
based trust anchors.

How is a DNS server to know which TLSA records to ignore? And are
browsers going to clear their DNS cache when a VPN goes up or down?

Modifying the DNS protocol seems rather unrealistic.

>             So it seems to me that the likely consequence of this function is that a lot of
>             clients will be accepting what amounts to MITM certificates (again, assuming
>             that they support DANE) as part of their VPN config.

You could ask IKE client implementations what they plan to do for
INTERNAL_DNSSEC_TA. Our implementation will allow specifying a list
of domains for which you will allow redirection and trust anchors.
And I would set this to "redhat.com, 10.in-addr.arpa" to prevent
the corporate network from installing anything else on my machine.

>       Not doing this makes the situation even worse. Do you have a proposal
>       that would make it better? I cannot think of one.

Because in the current situation, the protocol does not allow to request
only DNS queries for one or some domains. You can only ask for none or
all DNS queries. That has a huge privacy impact. So only power users
like us can tweak things like adding a forward_zone to unbound to ensure
only the internal-domain DNS queries go the the server.

> Why does it make the situation worse? Again, what's the use case why
> it's needed to have the VPN install a new WebPKI trust anchor.

Because the public DNSSEC view proves the internal view does not exist,
so you need an override.

Because the private DNS wants to use DNSSEC too.

>       Also, part of your concerns could be mitigated by CT as well for the
>       TLS cases. I assume if browsers require CT, that internal-only domains
>       also need to get some kind of CT logging (redacted or not) and that
>       would also prevent a rogue gmail.com TLSA from being accidentally
>       accepted by the user at the IKE/VPN first as 'internal domain' and
>       then additionally at the TLS/TLSA layer?
> 
> 
> Well, the semantics of CT+DANE are totally undefined

I was not talking about CT+DANE. I was talking about browsers mandating
CT and browsers not being aware that internal.redhat.com would need to
be treated differently. So even for those internal domains will need to
publish valid CT data (redacted or not) which would further reduce the
effects a malicious INTERNAL_DNSSEC_TA could do even if the client
accepted one for a domain not under enterprise control.

Paul