Top Banner
RPKI TMA PARIS 2019
57

RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Aug 16, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

RPKI

TMA PARIS 2019

Page 2: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

NLnet labs?

Page 3: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Purveyors of fine open source software

since 1999

Page 4: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

OPENDNSSEC

GETDNSLDNS

STUBBY

DNSSEC TRIGGER NET::DNSDNSTHOUGHT

Page 5: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Agenda

• Part 1 - Theory (1,5 hours)

• Introduction into BGP routing concepts and RPKI

• RPKI repository and object structure

• RPKI uptake, data quality and future

• Part 2 - Workshop (1,5 hours)

• Protect yourself

• Hijack your neighbour

Page 6: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Part 1introduction

Page 7: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

BGP?

Page 8: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

1989

https://weare.cisco.com/c/r/weare/amazing-stories/amazing-things/two-napkin.html

1989: RFC 1105 (BGP)1990 RFC 1163 (BGP-2)1991: RFC 1267 (BGP-3)1994: RFC 1654 (BGP-4)1995: RFC 1771 (BGP-4)2006: RFC 4271 (BGP-4)

Many updates (extensions), but not obsoleted

Page 9: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

BGP

• Networks are identified by Autonomous System Numbers (AS)

• ASNs announce their own routes (IP Prefixes and own AS) to neighbours

• ASNs import routes (Prefix and AS path) from neighbours

• ASNs do best path selection

• ASNs export routes to neighbours

Page 10: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

prefix

10. 0. 0. 0 / 20

0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

network prefix (20 bits) host identifier (12 bits)

Page 11: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

BGP Basics

AS65001

10.0.0.0/20 AS65001

AS65003

AS65004 AS65005

10.0.0.0/20 AS65002

10.0.

0.0/2

4 AS6

5003

10.0.0.0/20 65004-6500210.0.0.0/24

65004-65003

AS65002

anycast

most specific

wins

Page 12: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

BGP• Anyone can claim any ASN

• Or add any ASN anywhere in the path

• Anyone can claim any prefix as their own

• Leaking.. (should have filtered)

• The numbers on a keyboard are really close together..

Page 13: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Simple HIjacks

AS65001

AS65003

AS65004 AS65005

AS65002

10.0.0.0/20 AS65001

10.0.0.0/20 AS65002

10.0.

0.0/2

4 AS6

5003

10.0.0.0/20 65004-6500210.0.0.0/24

65004-65003

Page 14: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

“Is this BGP route origination authorised by the legitimate holder of the IP space?”

Page 15: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Internet routing registry

(IRR)

Page 16: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

internet routing registry

route: 185.49.140.0/22descr: Stichting NLnet Labsorigin: AS199664mnt-by: NLNETLABS-MNTcreated: 2014-03-10T12:25:24Zlast-modified: 2015-02-23T11:56:03Zsource: RIPE

!

Page 17: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AFRINIC, ALTDB, AOLTW, APNIC, ARIN, BELL, BBOI, CANARIE, EASYNET, EPOCH, HOST, JPIRR, LEVEL3, NESTEGG, NTTCOM, OPENFACE, OTTIX, PANIX, RADB, REACH, RGNET, RIPE, RISQ, ROGERS, TC

irr.net/docs/list.html

Page 18: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

resource public key Infrastructure

(RPKI)

Page 19: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

SIGN with Asymmetric keys

PRIVATE

PUBLIC

HASH

Page 20: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

“How does one learn about public keys?”

Page 21: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AS0 – AS42949672950.0.0.0/0::/0

PUBLIC TA

!PRIVATE TA

TRUST ANCHOR

A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent.

Trust starts with a so-called Trust Anchor (TA) which has no parent. It is self-signed and inherently trusted.

Page 22: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AS0 – AS42949672950.0.0.0/0::/0

PUBLIC TA

!PRIVATE TA

public key infrastructure

AS199664185.49.140.0/222a04:b900::/29

PUBLIC NLNET LABS

!

Page 23: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AS0 – AS42949672950.0.0.0/0::/0

PUBLIC TA

!PRIVATE TA

Route origin authorization

AS199664185.49.140.0/222a04:b900::/29

PUBLIC NLNET LABS

!

AS199664185.49.140.0/22, 22

!

PRIVATE NLNET LABS

Page 24: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

ROV

Page 25: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

verified ROA payloads

ROA AS65000

10.0.0.0/22 24 10.0.3.0/22 24

Relying Party

Software

validated cache

AS Prefix Max Length

65000 10.0.0.0/22 24

10.0.3.0/22 24

199664 2a04:b900::/29 29

... ... ...

Page 26: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

ROA Origin validation

route AS65000

10.0.0.0/24

AS Prefix Max

65000 10.0.0.0/22 24

10.0.3.0/22 24

65001 10.0.0.0/20 20

... ... ...

AS Prefix Max

65000 10.0.0.0/22 24

65001 10.0.0.0/20 20

0 covering NOT FOUND

at least1 valid VALID

covering, no valids INVALID

Page 27: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

route origin validation

AS65001

AS65003

AS65004 AS65005

AS65002

ROA

AS65001 10.0.0.0/20

max 24

10.0.0.0/20 AS65001

10.0.0.0/20 AS65002

10.0.

0.0/2

4 AS6

5003

10.0.0.0/20 65004-65001

Page 28: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

The Moving Parts

Page 29: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

SEPARATE COMPONENTS

CERTIFICATE AUTHORITY

creates & signs

PUBLICATION

SERVER

makes available

RELYINGPARTY

validates

Page 30: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

ARIN LACNIC AFRINIC RIPE NCC APNIC

Page 31: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

LACNICAFRINIC APNIC ARIN RIPE NCC

NIR

MEMBERS

Customers

Page 32: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Hosted vs. Delegated RPKI

• Hosted RPKI

• The resource issuer — RIR, NIR, LIR — offers RPKI as a service

• Certificates, keys, and signed products are all kept and published in their infrastructure

• Delegated RPKI

• Run your own Certificate Authority, generate your own signed products and publish them yourself

Page 33: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called
Page 34: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

LACNIC repository

NIR repository

LIR repository

ARIN repository

rsync

RPKI-RTR

RPKI VALIDATION

Relying Party

Software

validated cache

Page 35: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

RPKI RP SOFTWARE — TODAY

• rcynic, by Dragon Research Labs (in Python)

• RIPE NCC RPKI Validator (v2 in scala, v3 in Java)

• RPSTIR, by Raytheon BBN Technologies (in C)

• Routinator, by NLnet Labs (in Rust)

• OctoRPKI, by Cloudflare (in Go)

• Coming soon: OpenBSD rpki-client(1) (in C)

• Coming soon: FORT Validator, by NIC.mx (in C)

Page 36: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

RPKI CA SOFTWARE — TODAY

• RIR implementations (closed source)

• rpki, by Dragon Research Labs (in Python)

• Coming soon: Krill by NLnet Labs (in Rust)

Page 37: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Part 2the rpki repository

Page 38: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Part 3uptake, data, future..

Page 39: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Coverage

https://nlnetlabs.nl/projects/rpki/rpki-analytics/ https://github.com/NLnetLabs/secure-routing-stats

Take aggregated routes from the RIPE RIS Route Collectors

Compare to RIR stats for country codes

Analyse fraction of all IPv4 and IPv6 announcements covered by at least one ROA

Page 40: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

accuracy

https://nlnetlabs.nl/projects/rpki/rpki-analytics/ https://github.com/NLnetLabs/secure-routing-stats

The fraction of valid announcements out of all covered announcements.

In most countries with serious uptake the value is 98%+

Page 41: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

VRPs over time

1st day RIPEdata validates

Three ASes deaggregateROAs ('disable' MaxLength)

Single ASdeaggregates ROAs

0

10000

20000

30000

40000

2011 2012 2013 2014 2015 2016 2017 2018 2019

Num

ber o

f VR

Ps (I

Pv4

pref

ixes)

AFRINIC

APNIC

ARIN

LACNIC

RIPE

Page 42: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

vrps over time (v6)

1st day RIPEdata validates

Mass deaggregation of ROAs

0

2000

4000

6000

2011 2012 2013 2014 2015 2016 2017 2018 2019

Num

ber o

f VR

Ps (I

Pv6

pref

ixes)

AFRINIC

APNIC

ARIN

LACNIC

RIPE

Page 43: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

asns dropping invalids?

• Hard to measure

• For a long time people were not dropping

• However, this changed mid 2018

• Improved data quality

• Amazon (AS16509) Route53 hijack – April2018

• Many IX's offer as service, many Dutch networks (fusix, xs4all,..), cloudlfare, AT&T

Page 44: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

future work?

Page 45: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AS65001

AS65003

AS65004 AS65005

ROA

AS65001 10.0.0.0/20

max 24

10.0.0.0/20 AS65001

10.0.

0.0/2

4

6500

3-65

001

10.0.0.0/20 65004-65001

AS65001

10.0.0.0/24 AS65001

prepends with AS65001

10.0.0.0/24 65004-65003-65001

PATH SPOOFING

Page 46: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AS0 – AS42949672950.0.0.0/0::/0

PUBLIC TA

!PRIVATE TA

bgpsec: Router certificate

AS199664185.49.140.0/222a04:b900::/29

!

PUBLIC NLNET LABSAS199664

!

PRIVATE NLNET LABS

PUBLIC NLNET LABS

Page 47: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

bgpsec: Validators

router cer AS65000

Relying Party

Software

validated cache

AS Key

65000

65000

199664

... ...

Page 48: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

bgpsec: routers

AS65001 AS65002 AS65003

! 65002

AS65002

! 65001

10.0.0.0/20 AS65001

! 65001

10.0.0.0/20 AS65001

SIGN SIGNVERIFY VERIFY

Page 49: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

BGPsec: undeployable

• Downgrade is not signing. Only two states: VALID, INVALID

• No incremental deployment (NOT FOUND), everyone has to do it

• No support in hardware routers (too resource expensive)

Page 50: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

AS0 – AS42949672950.0.0.0/0::/0

PUBLIC TA

!PRIVATE TA

ASPA: pragmatic path sec

AS199664185.49.140.0/222a04:b900::/29

!

PUBLIC NLNET LABSfrom: AS199664

!

PRIVATE NLNET LABS

to: AS65000

Page 51: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

from AS to AS

65000 65001

65000 65002

65001 65003

... ...

aspa: Validators

ASPA

AS65000 AS65001

Relying Party

Software

validated cache

0 match from AS NOT FOUND

>=1 match from AS and to AS VALID

>=1 match from AS, no match to AS INVALID

Page 52: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

bgpsec: routers

AS65001 AS65002 AS65003

AS6500210.0.0.0/20

AS65001

10.0.0.0/20 AS65001

REJECT INVALID

REJECT INVALID

Page 53: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

aspa: Deployability

• Dra"s recently adopted in IETF sidrops WG

• Incremental possible (VALID, INVALID, NOT FOUND)

• Incremental value: protect your own be#er, even if it's a bit

• Spoofing requires longer and longer documented path fragments, path is plausible, but not guaranteed to be the actual path. 80% solution that can be used in the real world

Page 54: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

workshop

Page 55: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Workshop

• 1 virtual machine acting as a transit AS without filtering • 1 virtual machine acting as a transit AS with filtering • 17 virtual machines, connected to both transit AS's

• No filtering done by default • Announcing some address space, and hijacking some other space

• Objectives • Authorise your own announcements • Fix your own hijacks, or be evil. Choose your path! • Enable RPKI filtering on your sessions

Page 56: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

network topology

AS65101 student-1

AS65102 student-2

AS65000 master

AS65001 filter

Page 57: RPKI - tma.ifip.org · TRUST ANCHOR A certificate ties a public key to a set of Internet Number Resources and is signed by the private key of the parent. Trust starts with a so-called

Materials

h#ps://github.com/NLnetLabs/tma-phd-school-2019