Re: [homenet] Firewall hole punching [was: About Ted's naming architecture...]

Markus Stenberg <markus.stenberg@iki.fi> Wed, 23 November 2016 07:07 UTC

Return-Path: <markus.stenberg@iki.fi>
X-Original-To: homenet@ietfa.amsl.com
Delivered-To: homenet@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 01A151294FD for <homenet@ietfa.amsl.com>; Tue, 22 Nov 2016 23:07:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.821
X-Spam-Level:
X-Spam-Status: No, score=-1.821 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_NEUTRAL=0.779] 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 XwhPP_mya2o5 for <homenet@ietfa.amsl.com>; Tue, 22 Nov 2016 23:07:26 -0800 (PST)
Received: from julia1.inet.fi (mta-out1.inet.fi [62.71.2.231]) by ietfa.amsl.com (Postfix) with ESMTP id 47ECC12947F for <homenet@ietf.org>; Tue, 22 Nov 2016 23:07:26 -0800 (PST)
Received: from poro.lan (80.223.213.20) by julia1.inet.fi (9.0.002.03-2-gbe5d057) (authenticated as stenma-47) id 5782991C03F5F135; Wed, 23 Nov 2016 09:05:05 +0200
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
From: Markus Stenberg <markus.stenberg@iki.fi>
In-Reply-To: <8C298ED7-DF92-4FB7-9D6A-C113E98CABE9@google.com>
Date: Wed, 23 Nov 2016 09:07:23 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <F351E6DB-4829-4EE3-BACE-25DA543B21C5@iki.fi>
References: <871syc54d1.wl-jch@pps.univ-paris-diderot.fr> <CAPt1N1=eXRBh6UqGGqUSK9cH_jY5MvPcE4MFZUPe2Z48LF7bkA@mail.gmail.com> <87lgwj504t.wl-jch@irif.fr> <CAPt1N1kDCMDBEpt7QYhHtPYjaMJAzw8G81=2y2f=y0ZProeCPA@mail.gmail.com> <13675.1479346312@dooku.sandelman.ca> <3B35AF68-4792-4B2A-8277-A7B49206581F@google.com> <74143607-B81E-4D4C-89D3-4754E0DA7DE1@jisc.ac.uk> <790beb67-a62e-b7dc-b64e-a3fcecfbdb12@mtcc.com> <87zikrihl7.wl-jch@irif.fr> <2EEB3CCD-3C25-4844-95B5-DDE31F982EA2@iki.fi> <87oa17i9eq.wl-jch@irif.fr> <2DAA6FEB-8C87-42DA-9465-E740669C563A@iki.fi> <8C298ED7-DF92-4FB7-9D6A-C113E98CABE9@google.com>
To: james woodyatt <jhw@google.com>
X-Mailer: Apple Mail (2.3251)
Archived-At: <https://mailarchive.ietf.org/arch/msg/homenet/2y68l4iZXPSMKR0C_jIbDhvYPqk>
Cc: HOMENET <homenet@ietf.org>
Subject: Re: [homenet] Firewall hole punching [was: About Ted's naming architecture...]
X-BeenThere: homenet@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: IETF Homenet WG mailing list <homenet.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/homenet>, <mailto:homenet-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Wed, 23 Nov 2016 07:07:29 -0000

> On 23 Nov 2016, at 3.34, james woodyatt <jhw@google.com> wrote:
> On Nov 22, 2016, at 14:39, Markus Stenberg <markus.stenberg@iki.fi> wrote:
>> 
>> The recent IoT DDoS publicity is a good example; the devices that are the Mirai botnet are devices that had/have open ports facing the internet.
> Not quite, c.f. <https://krebsonsecurity.com/2016/10/who-makes-the-iot-things-under-attack/>
> 
> The vast majority of those devices were protected from receiving inbound flows over public Internet routes by the stateful filters of IPv4/NAT gateways.

Interesting. I read somewhere elsewhere that upnp igd was part of the problem but not the main one.

> p1. Those ports would not have been open and facing the Internet except they were also configured to use UPnP IGD to punch a hole through their firewall to expose their unsecured services.

So the default opt-out policy of hole punching is broken.

> p2. More importantly, they were also open and facing other compromised hosts on the same network, which were vulnerable not because they had open ports facing the Internet but because they were exposed to malware by legitimate requests to web servers at public Internet destinations.

I did not read that in that article at least. I can believe infested Windows hosts can contaminate anything near them.

> The calls [in both cases p1 and p2] were coming from inside the house.

Default drop inbound policy would have worked in the p1 case; p2 case on the other hand, the moment you have someone inside the network, you are lost, given the modern software quality.

>> It is all about reducing the attack surface.
> What attack surfaces were reduced? None of them were turned on at all. And why? Because, strangely, the industry in which we work engineers so many of the systems, which ordinary people are expected to use, in a way that makes them unusable unless all the security mechanisms that reduce the attack surfaces are disabled or bypassed by default.

At least based on my reading elsewhere, there is quite a bit of IoT hardware that actually has direct IPv4 address as well. And median time to infestation is minutes in the current IPv4 land. I also seem to recall that the ‘unpatched Windows - time to infestation’ benchmark also was minutes already ten years ago. (current Windows has saner default policies though, so I am not sure if that is applicable any more.)

> It’s not about reducing attack surfaces. It’s about making systems that are safe for deployment in close proximity to humans.

Sounds like an impossible dream then, given how prevalent the default username+password has been since 90s. Or buffer overflows. Or SQL injection attacks. All of that has been with us 20+ years and seems to be just more common, not less common, as the time goes by.

> ... and this knowledge is not new. The conficker paper from 2009 found that "144,236 (78.9%) of the infected machines were behind a NAT, VPN, proxy, or firewall". We should know this by now :stateful firewalls do not protect against malware.

There are also two other potential readings to this;

- the nodes could also move and be infected elsewhere, or

- they can make requests to the outside world with bad actor somewhere in the loop. At least earlier, the main _computer_ infection vector were essentially humans, who clicked ‘funny picture.exe’ and ignored security warnings.

IoT land, there is no human in the loop, so there is bit more hope, given software quality is sufficient, as people do not have access to run the ‘funny picture.exe’ as root on the devices.

Cheers,

-Markus