40
Idealized BGPsec: Formally Verifiable BGP 2011.06.14 BGPsec NANOG / Denver 2011.06.14 Randy Bush <randy@psg.com> for the Informal BGPsec Design Team 1

Idealized BGPsec: Formally Verifiable BGP

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Idealized BGPsec: Formally Verifiable BGP

Idealized BGPsec: Formally Verifiable BGP

2011.06.14 BGPsec

NANOG / Denver 2011.06.14

Randy Bush <[email protected]> for the

Informal BGPsec Design Team

1

Page 2: Idealized BGPsec: Formally Verifiable BGP

BGPsec Design Team chris morrow (google) dave ward (juniper) doug maughan (dhs) doug montgomery (nist) ed kern (cisco) heather schiller (uunet) jason schiller (uunet) john scudder (juniper) kevin thompson (nsf) keyur patel (cisco) kotikalapudi sriram (nist) luke berndt (dhs) matt lepinski (bbn)

pradosh mohapatra (cisco) randy bush (iij) rob austein (isc) ruediger volk (deutsche telekom) russ housley (vigilsec) russ mundy (sparta) sam weiler (sparta) sandy murphy (sparta) sharon goldberg (boston uni) steve bellovin (columbia uni) steve kent (bbn) warren kumari (google)

http://www.ietf.org/iesg/statement/design-team.html 2011.06.14 BGPsec 2!

Page 3: Idealized BGPsec: Formally Verifiable BGP

Assume RPKI is a Given

2011.06.14 BGPsec 3

98.128.0.0/16

Public Key

98.128.0.0/20

Public Key

98.128.16.0/20

Public Key

98.128.32.0/19

Public Key

98.128.16.0/24

Public Key

98.128.17.0/24

Public Key

Cert/ARIN

Cert/RGnet Cert/UUNET

Cert/RIPE Cert/APNIC

Cert/IANA CA

CA CA CA

CA CA

SIA

98.128.32.0/24

Public Key

Cert/IIJ CA

Page 4: Idealized BGPsec: Formally Verifiable BGP

Assume ROAs are a Given

2011.06.14 BGPsec 4

98.128.0.0/16

Public Key

98.128.0.0/16

AS 42

EE Cert

ROA

98.128.0.0/16 147.28.0.0/16

Public Key

Owning Cert CA End Entity Cert

can not sign certs. can sign other things e.g. ROAs

This is not a Cert It is a signed blob

Page 5: Idealized BGPsec: Formally Verifiable BGP

Assume RPKI-RTR Given

2011.06.14 BGPsec 5

Global RPKI

RCynic Gatherer

RPKI to Rtr

Protocol

Near/In PoP

BGP Decision Process

Cache / Server

Object Security RCynic

Page 6: Idealized BGPsec: Formally Verifiable BGP

Assume Origin Validation

2011.06.14 BGPsec 6

R3#sh ip bg 98.128.0.0/24 BGP routing table entry for 98.128.0.0/24, version 299 Paths: (2 available, best #2, table default) 65000 3130 10.0.0.1 from 10.0.0.1 (193.0.24.64) Origin IGP, localpref 100, valid, external path 680D859C RPKI State invalid 65001 4128 10.0.1.1 from 10.0.1.1 (193.0.24.65) Origin IGP, localpref 100, valid, external, best path 680D914C RPKI State valid

Page 7: Idealized BGPsec: Formally Verifiable BGP

The Gap

2011.06.14 BGPsec 7

RPKI-based Origin Validation provides neither cryptographic assurance (announcements are not signed), nor assurance of the AS Path of the announcement

Page 8: Idealized BGPsec: Formally Verifiable BGP

Origin Validation is Weak • Today’s Origin Validation only stops

accidental misconfiguration, which is quite useful. But ...

• A malicious router may announce as any AS, i.e. forge the ROAed origin AS.

• This would pass ROA Validation as in draft-ietf-sidr-pfx-validate.

2011.06.14 BGPsec 8!

Page 9: Idealized BGPsec: Formally Verifiable BGP

Full Path Validation • Rigorous per-prefix AS path validation

is the goal

• Protect against origin forgery and AS-Path monkey in the middle attacks

• Not merely showing that a received AS path is not impossible

• Yes, this is S-BGP-like not SO-BGP-like 2011.06.14 BGPsec 9!

Page 10: Idealized BGPsec: Formally Verifiable BGP

Protocol Not Policy •  Policy on the global Internet changes every 36ms

•  We already have a protocol to distribute policy or its effects, it is called BGP

•  We can not know intent, should Mary have announced the prefix to Bob

•  But Joe can formally validate that Mary did announce the prefix to Bob

•  BGPsec validates that the protocol has not been violated, and is not about intent or business policy

2011.06.14 BGPsec 10!

Page 11: Idealized BGPsec: Formally Verifiable BGP

Path Shortening Attack

2011.06.14 BGPsec 11

X

Z

W $ $ $

A B

$

$

Expected Path – A->X->W->B Diverted Path - A->X->Z->W->B There Are Many Many Other Attacks

ZB

XZB WB B

Page 12: Idealized BGPsec: Formally Verifiable BGP

Forward Path Signing

AS hop N signing (among other things) that it is sending the announcement to AS hop N+1 by AS number, is believed to be fundamental to protecting against monkey in the middle attacks

2011.06.14 BGPsec 12!

Page 13: Idealized BGPsec: Formally Verifiable BGP

Forward-Signing

2011.06.14 BGPsec 13

B cryptographically signs the message to W Sb(B->W) W signs messages to X and Z encapsulating B’s message

Sw(W->X (Sb(B->W))) and Sw(W->Z (Sb(B->W)))

X signs the message to A Sx(X->A (Sw(W->X (Sb(B->W))))

Z can only sign Sz(Z->X (Sw(W->Z (Sb(B->W))))

X

Z

W $ $ $

A B

ZB

XWB WB B

X X

Page 14: Idealized BGPsec: Formally Verifiable BGP

Capability Negotiation • It is assumed that consenting routers

will use BGP capability exchange to agree to run BGPsec between them

• The capability will, among other things remove the 4096 PDU limit for updates

• If BGPsec capability is not agreed, then only traditional BGP data are sent

2011.06.14 BGPsec 14!

Page 15: Idealized BGPsec: Formally Verifiable BGP

Replay Attack

2011.06.14 BGPsec 15!

R0

R1

R2

R3 R4

0 1 0

3 1 0

Page 16: Idealized BGPsec: Formally Verifiable BGP

2011.06.14 BGPsec 16!

Replay Attack

R0

R1

R2

R3 R4

0 1 0

3 1 0

0 2 0

X

Page 17: Idealized BGPsec: Formally Verifiable BGP

Replay Reduction • Announcement replay is a vulnerability • Therefore freshness is critical • So originating announcer signs with a

relatively short signature lifetime • Origin re-announces prefix well within

that lifetime, AKA beaconing • Suggested to be days, but can be hours

for truly critical infrastructure 2011.06.14 BGPsec 17!

Page 18: Idealized BGPsec: Formally Verifiable BGP

Per-Router Keys • Needed to deal with compromise of one router

exposing an AS’s private key •  Implies a more complex certificate and key

distribution mechanism • A router could generate key pair and send

certificate request to RPKI for signing •  Certificate, or reference to it, must be in each

signed path element •  If you want one per-AS key, share a router key

2011.06.14 BGPsec 18!

Page 19: Idealized BGPsec: Formally Verifiable BGP

2011.06.14 BGPsec 19!

0/0 AS0-65535

Public Key

98.0.0.0/8 AS3000-4000

Public Key

98.128.0.0/16 AS3130 AS3970

Public Key

PSGnet

ARIN

IANA

98.128.0.0/16-24

AS 3130

ROA

98.128.0.0/16

Public Key

Prefix EE Cert

CA

CA

CA

AS3130

Public Key

AS Cert

Cert / Key Structure for an ISP

Encodes ASN and Router ID

CA

AS3130 rtr-00

Router EE Cert

Public Key AS3130 rtr-00

Router EE Cert

Public Key AS3130 rtr-00

Router EE Cert

Public Key AS3130 rtr-00

Router EE Cert

Public Key AS3130 rtr-00

Router EE Cert

Public Key

Page 20: Idealized BGPsec: Formally Verifiable BGP

Hash Signed (To & Te) by Router Key AS0-Rtr-xx

^RtrCert

Origination by AS0 to AS1

2011.06.14 BGPsec 20!

NLRI AS0 AS1

• To and Te are times of signature origination and expiration

• Signature has a well-jittered validity end time, Te, of days

• Re-announcement by origin, AKA beaconing, every ~(Te-To)/3

• ROA is not needed as prefix is sufficient to find it in RPKI as today

Signed Forward

Reference

Sig0

New Optional Transitive Attribute

Page 21: Idealized BGPsec: Formally Verifiable BGP

2011.06.14 BGPsec 21!

Announcement AS1 to AS2

AS1 AS2 ^RtrCert

• R1 signing over R0’s signature is same as signing over entire R0 announcement

• Non-originating router signatures do not have validity periods

• But when they receive a beacon announcement, they must propagate it

Signed Forward

Reference

^RtrCert NLRI AS0 AS1 Sig0

Hash Signed (To & Te) by Router Key AS0.rtr-xx

Sig1

Hash Signed by Router Key AS1-rtr-yy

Page 22: Idealized BGPsec: Formally Verifiable BGP

Only at Provider Edges • This design protects only inter-domain

routing, not IGPs, not even iBGP • BGPsec will be used inter-provider, only

at the providers' edges • Of course, the provider’s iBGP will have

to carry the BGPsec information • Providers and inter-provider peerings

might be heterogeneous 2011.06.14 BGPsec 22!

Page 23: Idealized BGPsec: Formally Verifiable BGP

Simplex End Site

2011.06.14 BGPsec 23!

Receives Unsigned & Trusts Up-streams

to Validate

Signs Own Prefix(es)

Signs Own Prefix(es)

Only Needs to Have Own Private Key, No Other Crypto or RPKI Data

No Hardware Upgrade!!

Page 24: Idealized BGPsec: Formally Verifiable BGP

Incremental Deployment

Meant to be incrementally deployable in today's Internet, and does not require global deployment, a flag day, etc.

2011.06.14 BGPsec 24!

Page 25: Idealized BGPsec: Formally Verifiable BGP

No Increase of Operator Data Exposure

• Operators wish to minimize any increase in visibility of information about peering and customer relationships etc.

• No IRR-style publication of customer or peering relationships is needed

2011.06.14 BGPsec 25!

Page 26: Idealized BGPsec: Formally Verifiable BGP

iBGP & Confederations •  iBGPsec speakers who are also eBGPsec

speakers naturally carry BGPsec data

• Route Reflectors must be non-signing iBGPsec speakers

• Confederations are eBGP boundaries, but a subAS should not sign to coreAS as that signature would have to be removed.

2011.06.14 BGPsec 26!

Page 27: Idealized BGPsec: Formally Verifiable BGP

Only Prefix & AS-Path

• Until clear vulnerabilities demonstrate a need for more, only the prefix and the AS path are covered by the signature.

•  Other attributes are too variable, are ephemeral, or we do not understand the security needs.

•  I.e. don’t sign what we don’t understand.

• NO-EXPORT etc. are over a [secured] next-hop, and thus do not need signing.]

2011.06.14 BGPsec 27!

Page 28: Idealized BGPsec: Formally Verifiable BGP

Utterly Un-Optimized • This design very intentionally abjures

premature, in fact any, optimization in an attempt to get the semantics of the protocol correct in a simple and understandable way • It is assumed that optimization,

prepends, packing, etc. will be worked out as the design is finalized

2011.06.14 BGPsec 28!

Page 29: Idealized BGPsec: Formally Verifiable BGP

Hash Signed (To & Te) by Router Key AS0.rtr-xx

Hash Signed by Router Key AS1-rtr-yy

An Example Optimization

2011.06.14 BGPsec 29!

AS1 AS2 ^RtrCert

Signed Forward

Reference

^RtrCert NLRI AS0 AS1 Sig0 Sig1 pCNT pCNT

Prepend Count

Page 30: Idealized BGPsec: Formally Verifiable BGP

Uses Global RPKI

It is assumed that any needed global RPKI data can be delivered to routers (or ancillary devices) by augmenting the RPKI to Router Protocol described in draft-ietf-sidr-rpki-rtr-protocol, with the additional PDUs necessary to transport certificates, CRLs, etc.

2011.06.14 BGPsec 30!

Page 31: Idealized BGPsec: Formally Verifiable BGP

Origin Validation Assumed

• We assume that prefix origin validation can be and/or is already being done by routers using ROAs from the RPKI

• We can leverage the ROA being in the router’s prefix trie already, so need not include it in signed updates

2011.06.14 BGPsec 31!

Page 32: Idealized BGPsec: Formally Verifiable BGP

Just Another BGP Decision • The result of validation is similar to

any other BGP decision

• Local policy decides what to do with the result of validity testing, a la origin validation

• And the vendors will give the ops too many knobs

2011.06.14 BGPsec 32!

Page 33: Idealized BGPsec: Formally Verifiable BGP

Some Consequences

2011.06.14 BGPsec 33!

Page 34: Idealized BGPsec: Formally Verifiable BGP

New Hardware Generation

It is likely that routers will have to be upgraded to use this design, likely with much more memory and probably with hardware crypto assistance. It is accepted that this means that it will be some years, O(IPv6 ASIC upgrades) before there is more than test deployment

2011.06.14 BGPsec 34!

Page 35: Idealized BGPsec: Formally Verifiable BGP

RIB Size Estimation – – Relative Measure of Contributions due to IGP / eBGP Prefixes

•  Estimate for Route Reflector (prefix path multiplier factor = 9.55) •  Contribution to RIB size due to internal prefixes (unsigned) is very small •  Signed eBGP prefixes dominate

BGPSECRSA-2048

0

4

8

12

16

20

24

28

32

2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025

YEAR

RIB

MEM

OR

Y (G

B)

Total RIB (BGPSEC)EBGP only (BGPSEC)Total RIB (BGP-4)EBGP only (BGP-4)Internal Prefixes

NIST

2011.06.14 BGPsec 35!

Page 36: Idealized BGPsec: Formally Verifiable BGP

No PDU Packing • This ‘idealized’ protocol has only one

prefix in each announcement PDU

• Routers currently unpack prefixes from PDUs, and subsequent re-announcement repacks and reorders rather arbitrarily

• PDU optimization can be studied after the protocol semantics are solid

2011.06.14 BGPsec 36!

Page 37: Idealized BGPsec: Formally Verifiable BGP

Route Servers

BGPsec can’t forward sign across an AS-transparent route server as you do not know the peer AS

2011.06.14 BGPsec 37!

Page 38: Idealized BGPsec: Formally Verifiable BGP

Proxy Aggregation

Proxy Aggregation, i.e. AS-Sets, is not supported

2011.06.14 BGPsec 38!

Page 39: Idealized BGPsec: Formally Verifiable BGP

Does Not Lock Data Plane

• It is acknowledged that rigorous control plane verification does not in any way guarantee that packets follow the control plane

• See IMC 2009 paper which shows that 70% of the ASs in the so-called ‘default free zone’ also have default

2011.06.14 BGPsec 39!

Page 40: Idealized BGPsec: Formally Verifiable BGP

THIS WORK IS SPONSORED IN PART BY THE DEPARTMENT OF HOMELAND SECURITY UNDER AN INTERAGENCY AGREEMENT WITH THE AIR FORCE RESEARCH LABORATORY (AFRL).

2011.06.14 BGPsec 40!

They Take your Scissors Away and we turn them into plowshares