Re: [sidr] BGPSEC Threat Model ID

Brian Dickson <brian.peter.dickson@gmail.com> Fri, 04 November 2011 22:40 UTC

Return-Path: <brian.peter.dickson@gmail.com>
X-Original-To: sidr@ietfa.amsl.com
Delivered-To: sidr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3859521F8B58 for <sidr@ietfa.amsl.com>; Fri, 4 Nov 2011 15:40:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.618
X-Spam-Level:
X-Spam-Status: No, score=-3.618 tagged_above=-999 required=5 tests=[AWL=-0.019, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L0dLiR2pzOQl for <sidr@ietfa.amsl.com>; Fri, 4 Nov 2011 15:40:35 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by ietfa.amsl.com (Postfix) with ESMTP id E083421F8B57 for <sidr@ietf.org>; Fri, 4 Nov 2011 15:40:34 -0700 (PDT)
Received: by faas12 with SMTP id s12so3732688faa.31 for <sidr@ietf.org>; Fri, 04 Nov 2011 15:40:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=BlsjpGb8umUU6nqyr/StegMgdg2rmUgQm3KdEM0R07A=; b=dgviDuP4vH2okpiis/ryPZPanWQQ9hmeLxvhBlR840KPWXAeW61RY/8Bu80MspPhNO +d0SGGLe0o/g+B2zt2gyMuA3dqXUfv7Eljqo0hhgYMYlJ4t53MfyU/oF/DjbeyddkLuE 6NVvs56in6GacBLd7nM31oRzN71LSw9e0HI+o=
MIME-Version: 1.0
Received: by 10.223.94.143 with SMTP id z15mr23009487fam.32.1320446434002; Fri, 04 Nov 2011 15:40:34 -0700 (PDT)
Received: by 10.223.54.15 with HTTP; Fri, 4 Nov 2011 15:40:33 -0700 (PDT)
In-Reply-To: <CAL9jLaZj1wcmDnbm1f9=csUv2Uuq_w3rS6UEYmUHAQDPWT9zFg@mail.gmail.com>
References: <E96517DD-BAC7-4DD8-B345-562F71788C6A@tcb.net> <p06240807cad42f85eb7d@193.0.26.186> <32744.216.168.239.87.1320175657.squirrel@webmail.tcb.net> <p06240801cad6ab773279@193.0.26.186> <D9A38669-883D-4090-9F95-BC5C63220950@tcb.net> <p06240801cad800485596@193.0.26.186> <EEBF68E0-FAD9-4AF3-B81B-78760D200D9B@tcb.net> <p06240808cad85ff73d61@193.0.26.186> <080F8FFF-D2C7-4414-B53A-233F88D2009F@vpnc.org> <CAFU7BATC-6DUDNuadakwSa5wj0ryy0=49=XveBXD5Wv=5JL-ag@mail.gmail.com> <m2aa8c489s.wl%randy@psg.com> <53FA9B4A-552C-4998-8F69-592A0F5AA13B@verisign.com> <CAL9jLaZj1wcmDnbm1f9=csUv2Uuq_w3rS6UEYmUHAQDPWT9zFg@mail.gmail.com>
Date: Fri, 04 Nov 2011 18:40:33 -0400
Message-ID: <CAH1iCiqmRjPTX7RFK+q=CJRWv9qwdMGdRc_G7GhKrV57dM-K3w@mail.gmail.com>
From: Brian Dickson <brian.peter.dickson@gmail.com>
To: Christopher Morrow <morrowc.lists@gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: sidr wg list <sidr@ietf.org>
Subject: Re: [sidr] BGPSEC Threat Model ID
X-BeenThere: sidr@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Secure Interdomain Routing <sidr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sidr>, <mailto:sidr-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/sidr>
List-Post: <mailto:sidr@ietf.org>
List-Help: <mailto:sidr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sidr>, <mailto:sidr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Nov 2011 22:40:36 -0000

On Fri, Nov 4, 2011 at 5:07 PM, Christopher Morrow
<morrowc.lists@gmail.com> wrote:
> On Fri, Nov 4, 2011 at 3:05 PM, Eric Osterweil <eosterweil@verisign.com> wrote:
> I'm not randy, but I was talking about this very thing in the office
> today with a co-worker... I'm not clear on how anything can stop an
> instance like:
> src      time                                        prefix
> puck    2011-11-04 16:15:49.157742      8.10.160.0/23
>   path
>   2914 2828 12989 12189 3356 19181 19181 19181
>  Contact   score  blame_asn
>   2828 3       12989
>
> As I read this, 12989 (highwind) is 'accidentally' announcing
> reachability for 8.10.160.0/23 (CWIE? AS19181). Looking at one popular
> source of routing data:
>  <http://www.robtex.com/as/as19181.html>
>
> it actually seems that the 2 people may be peers :( the route that we
> see is merely an artifact of their connectivity and 'poor route
> selection' inside their networks :(

I suspect that it is a case of "accidental back-up transit via a peer".
(I have seen this personally, where it was "malicious" instead of "accidental".)

Generally, the problem with prefix-only filtering is it ignores the as-path.
If you build your upstream filter based on who your customers are (nominally)
instead of based on where that route was learned, this can happen.

> Point being that in cases like this (or really all route leak cases)
> the only thing that stops this is filtering routes between bgp peers.
> (transits, customers, SFP peers) There isn't anything in the protocol
> itself (which is Stephen's, Russ's, Randy's comment through out) that
> tells you/me/them that 12989 should not be permitted to announce this
> route. (looking at available data, it seems that they SHOULD, perhaps
> not with this ASPath, but...)

It's actually tricky to do in reality. You have to build prefix filters AND
as-path filters AND ensure that BOTH filters are applied to everything.
And that doesn't necessarily always work either. Communities are a big
help...

> How would you go about telling, from the data on the wire in bgp, that
> a route is a hijack?
> How would you propose changing the data on the wire in bgp today to do
> this tomorrow?

I would propose adding a mandatory "bit" signaling "customer" or "non-customer".

In the BGPSEC context, the bit would need to be signed and kept AS-hop-by-hop,
added in a way that unambiguously shows exactly where in the AS-path
it is applied,
and where the bit requires both sides of the peering agree on it. No
unilateral bit-setting.

The status from the last AS-hop, however is all that is really needed.
Local announcements start with the bit set.
Going "upstream", the customer bit gets kept. Upstream is only allowed
if the bit is set.
Downstream is always allowed, and the bit is always cleared.
Sending to peers is only allowed if the bit is set, and in the process
the bit is cleared.

(Mutual transit means the bits are kept and all routes are sent.)

Once a route crosses a peer connection or goes "downhill", it can no
longer go "uphill"
or cross another peering link.

Uphill N times, one peering link (optional), downhill M times. No exceptions.

Of course, filtering or marking to restrict individual prefixes can be
added to this,
without violating the restrictions. (More restrictive, good. Less
restrictive, very bad.)

In fact, I'd add it to the negotiated capabilities (being
offered/requested) so it gets configured
on each "neighbor" statement: Transit-Offered; Transit-Accepted; or in
the oddball case, both.
Only if there is match between one side offering transit and the other
accepting it, is the status
set.

In a left-to-right representation of an AS path, there would be four
possibilities:
XXX <t> YYY (Y provides transit to X)
XXX <c> YYY (X provides transit to Y, i.e. Y is a customer of X)
XXX <p> YYY (X and Y are peers)
XXX <tc> YYY (X and Y are mutual transit buddies)

An example representation of AS-path-plus-bit might look like:

2914 <c> 2828 <c> 12989 <t> 12189 <t> 3356 <c> 19181 19181 19181

In the above case, the sequence "<c> .* <t>" shows where the problem was.
Having the protocol enforce the restrictions would have stopped the leak.

> Would having data you could mechanically verify about the routes and
> origins and relationships (say connectivity only?) between bgp peers
> help solve this problem?

Yes, and I believe the relationship info, even on the most recent AS-hop,
would be sufficient. While the protocol enforcing it would fix things, there
is the issue of trusting the implementation/implementors, so I think there
would still be a requirement to sign at each leg, and validate all signatures
and hops.

The sender signing her interpretation of the status, with the receiver
authenticating
and having the ability to reject if either the signature is bad, OR if
the signed
status of the relationship does not agree with the receiver's idea of
the status,
ensures local bad actors are caught right away. Non-local bad actors is what
further requires all signatures be built with the peering-type. Enforcing the
restriction on the peering-type-path stops the leaks.

> In my view I don't see a change to the BGP wire format helping, I do
> see existence of data to mechanically verify ownership (and perhaps
> connectivity information?) helping.

Yep - and without requiring extrinsic information (i.e. does not
require the information
be in an IRR-type database, can be marked locally in the path, as long as the
peering type is mutually negotiated at each hop.)

Brian