Re: [homenet] Securing HNCP - comments?

Ray Hunter <v6ops@globis.net> Sat, 28 June 2014 07:43 UTC

Return-Path: <v6ops@globis.net>
X-Original-To: homenet@ietfa.amsl.com
Delivered-To: homenet@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43FDB1A030D for <homenet@ietfa.amsl.com>; Sat, 28 Jun 2014 00:43:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.148
X-Spam-Level:
X-Spam-Status: No, score=0.148 tagged_above=-999 required=5 tests=[BAYES_50=0.8, RP_MATCHES_RCVD=-0.651, 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 0Ib9M6abc4Hc for <homenet@ietfa.amsl.com>; Sat, 28 Jun 2014 00:43:26 -0700 (PDT)
Received: from globis01.globis.net (mail.globis.net [IPv6:2001:470:1f15:62e::2]) by ietfa.amsl.com (Postfix) with ESMTP id 56CF51A030E for <homenet@ietf.org>; Sat, 28 Jun 2014 00:43:26 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by globis01.globis.net (Postfix) with ESMTP id 23F16871515; Sat, 28 Jun 2014 09:43:25 +0200 (CEST)
Received: from globis01.globis.net ([127.0.0.1]) by localhost (mail.globis.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1IJi-zHxz-+e; Sat, 28 Jun 2014 09:43:25 +0200 (CEST)
Received: from Rays-iMac.local (unknown [IPv6:2001:470:1f15:73a:14d8:7082:54cf:52cb]) (Authenticated sender: Ray.Hunter@globis.net) by globis01.globis.net (Postfix) with ESMTPSA id E146F871513; Sat, 28 Jun 2014 09:43:24 +0200 (CEST)
Message-ID: <53AE7209.7080408@globis.net>
Date: Sat, 28 Jun 2014 09:43:05 +0200
From: Ray Hunter <v6ops@globis.net>
User-Agent: Postbox 3.0.11 (Macintosh/20140602)
MIME-Version: 1.0
To: Markus Stenberg <markus.stenberg@iki.fi>
References: <54D995D5-6DC9-4AF6-98F9-42A6DC351CA5@iki.fi>
In-Reply-To: <54D995D5-6DC9-4AF6-98F9-42A6DC351CA5@iki.fi>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: http://mailarchive.ietf.org/arch/msg/homenet/RiRg--rHdmwOj0V58DrYU1NthWA
Cc: "homenet@ietf.org Group" <homenet@ietf.org>
Subject: Re: [homenet] Securing HNCP - comments?
X-BeenThere: homenet@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <homenet.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/homenet>, <mailto:homenet-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/homenet/>
List-Post: <mailto:homenet@ietf.org>
List-Help: <mailto:homenet-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/homenet>, <mailto:homenet-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Jun 2014 07:43:28 -0000

inline

Markus Stenberg wrote:
> (This could have been a draft too, but I’m starting my vacation soon and I don’t want to post any more of those. Sorry.-Markus)
>
> Current HNCP draft specifies security very vaguely, as it was originally based on just some napkin thoughts last year on ‘it would be nice to have authenticated TLVs’.
>
> However, what are we protecting against, how, and should we go through the trouble at all? For all of these attacks, we have to assume _some_ network level access to a home network.
>
> Let us consider potential attacks and their applicability on a home network:
>
> [1] Pretend to be a client: no, we cannot protect against this, all clients are not currently authenticated and not in foreseeable future either. 802.1x not to even mention MACSec support on wired ports is mostly nonexistent in home routers.
>
> [2] Replace upstream router on the upstream link. We cannot do anything about this, and as your packets already go to e.g. NSA, assumption of privacy is moot so this battle is lost. This attack may be harder to mount due to upstream link being typically wired, hard to reach, etc.
>
> [3] Pretend to be upstream router on some other link. We can protect against this with fixed categories of interfaces, but securing HNCP has nothing to do with it as upstream router doesn’t talk HNCP.
>
> [4] Pretend to be an inner router.
>
> What are their implications?
>
> [1]: Any resource in-home _can_ be accessed and there is not much that can be done given access to a non-guest link.
>
> [2,3]: Any traffic on the Internet is public (and what else is new?).
>
> [4]: If impersonation is possible, man-in-the-middle and potentially denial of service attacks on home network become possible.
>
> How could [4] be prevented then? In ascending order of complexity..
>
> [S4-1] Manual configuration of categories overriding automated border discovery. Defining either in the actual router product, or via configuration which interfaces to talk HNCP (and RP) on, where potential upstream links may never be, can be or always are.
>
> [S4-2] Punt on security in HNCP, and just use e.g. IPsec with manual keying as currently specified in the draft. Setting up the shared PSK for the set of routers is left to the as manual configuration exercise for the owner of the devices.
>
> [S4-3] HNCP-level PSK shared among all routers. Same bootstrap issues as [S4-2], may be able to get rid of manually keyed IPsec dependency.
>
> [S4-4] Some public key cryptography solution operating with just raw keys (there is a draft in the works on how to do this in HNCP)
>
> [S4-5] Some public key cryptography solution with CA hierarchy (similar to behringer-bootstrap)
>
> The big question is, are the S4-3+ really worth it? And what is the sane way to do it if they are? Can we actually become RFC with just S4-1 and S4-2? In case we go for public key-cryptography: what do we do about routing protocols mostly relying on shared secrets for authentication?
>
> - Markus and Steven
Powerline Ethernet devices have built in encryption, so I think 
consumers do expect some level of protection from accidental 
neighbouring. I agree with you questioning whether this should be solved 
at L2 or L3 and above.

Assuming the solution has to be defined at L3 and above, I think due to 
the lack of any hierarchy, or root node, that you're going to have to 
have individual keys/signatures per device, and that you cannot assume 
existence of a central keying repository.

S4-1 could work but relies on consumers plugging in devices into the 
correct ports. S4-2 does not meet the requirement for 
auto-configuration. S4-3 could work if you could bootstrap it, but that 
is not trivial either because it is chicken/egg. I don't see S5-5 
flying: there is no natural root node or root CA.

The problem seems to boil down to "how can we bootstrap the trust" 
regardless of the encryption technology. Assuming S4-3 or S4-4, when a 
new device is added to the network (as opposed to existing devices being 
replugged) you could check it against a (distributed) DB of existing 
pairing keys (via TBD service discovery technology). If a device hasn't 
paired to at least one other homenet device, HNCP messages from this 
device is ignored until it has. Initiating the pairing should be as 
simple for the end user as pressing a button on 2 connected devices 
(nearly) simultaneously (one new and one already in the web of trust) so 
that both devices go into pairing mode and learn a new HNCP pairing. 
Once homenet is (relatively) stable, you would also be able to flood the 
new pairing to all other devices in the web of trust for potential long 
term storage. At some point you might end up seeing old devices you've 
given to your neighbour, so there should also be a way of clearing the 
pairing DB for a specific device, or automatically flushing entries for 
devices that have not been seen since time X. Alternative is that you 
have to put all devices in homenet into pairing mode simultaneously, but 
that may become less practical as the number of routers increases.

IF you can establish trust using HNCP (an expensive operation), it could 
be the basis for all other trust in the Homenet, so it is potentially a 
big win. e.g. To negotiate any necessary shared key for routing or other 
common Homenet wide parameters: think election of the root bridge in 
802.1 and then that root device chooses a common shared key. Obviously 
distribution of the resulting shared keys from the root is going to have 
to be encrypted.

I can certainly see this solution sketch requiring a lot of code.

-- 
Regards,
RayH