29
Eric Vyncke, May 12th 2015 How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer [email protected] @evyncke

How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

  • Upload
    lephuc

  • View
    260

  • Download
    0

Embed Size (px)

Citation preview

Page 1: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer [email protected] @evyncke

Page 2: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

Agenda

•  Special use case •  Security of Routing Header & RFC 5095 •  Segment Routing Security •  Packets with Extension Headers are lost?

2

Page 3: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

3

Special Use Case

Page 4: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

SR-IPv6 Capable Service Chaining

•  With SR-capable service instances, "service chaining leverages the SRH

–  Still interoperable with NSH

•  No need to support SR across the network –  Transparent to network infrastructure

•  Next Step: allow SR service chaining with non-SR applications…

–  Work in progress

Service Instance S1

X H A G

D

F

C B

E

PAYLOAD  

IPv6  Hdr:  DA=Y,  SA=X  

Service Instance S2

Y

IPv6  Hdr:  DA=S1,  SA=X  

SR  Hdr:  SL=  S1,  S2,  Y  

PAYLOAD  

IPv6  Hdr:  DA=S2,  SA=X  

SR  Hdr:  SL=  S1,  S2,  Y,  

PAYLOAD  

IPv6  Hdr:  DA=Y,  SA=X  

SR  Hdr:  SL=  S1,  S2,  Y  

PAYLOAD  

IPv6  Hdr:  DA=Y,  SA=X  

PAYLOAD  

IPv6  Hdr:  DA=S2,  SA=X  

SR  Hdr:  SL=  S1,  S2,  Y  

PAYLOAD  

IPv6  Hdr:  DA=S1,  SA=X  

SR  Hdr:  SL=  S1,  S2,  Y  

PAYLOAD  

Page 5: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

§  What about mobile node away from SP network?

“Extreme Traffic Engineering” from CPE/Set-up Box?

PE1

PE3

PE4

SR-IPv6 core

PE2

(SDN) controller Image source wikimedia

Page 6: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

§  What about mobile node away from SP network?

“Extreme Traffic Engineering” from CPE/Set-up Box?

PE1

PE3

PE4

SR-IPv6 core

PE2

(SDN) controller Image source wikimedia

A -> B Via ....

Page 7: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

§  What about mobile node away from SP network?

“Extreme Traffic Engineering” from CPE/Set-up Box?

PE1

PE3

PE4

SR-IPv6 core

PE2

(SDN) controller Image source wikimedia

I’m a dumb stateless router but not stupid!!!!Let’s

check authorization

A -> B Via ....

Page 8: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

§  What about mobile node away from SP network?

“Extreme Traffic Engineering” from CPE/Set-up Box?

PE1

PE3

PE4

SR-IPv6 core

PE2

I’m a dumb

stateless router

(SDN) controller Image source wikimedia

I’m a dumb stateless router but not stupid!!!!Let’s

check authorization

A -> B Via ....

Page 9: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

§  What about mobile node away from SP network?

“Extreme Traffic Engineering” from CPE/Set-up Box?

PE1

PE3

PE4

SR-IPv6 core

PE2

A -> B

Via ....

I’m a dumb

stateless router

I’m a dumb

stateless router

A -> B

Via .... (SDN) controller

Image source wikimedia

I’m a dumb stateless router but not stupid!!!!Let’s

check authorization

A -> B Via ....

Page 10: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

10

Huh??? Source Routing Security?"What about RFC 5095?

Page 11: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

IPv6 Routing Header •  An extension header, processed by intermediate routers •  Three types

–  Type 0: similar to IPv4 source routing (multiple intermediate routers) –  Type 2: used for mobile IPv6 –  Type 3: RPL (Routing Protocol for Low-Power and Lossy Networks)

Routing Type!Ext Hdr Length Next Header RH Type

IPv6 Basic Header

Routing Header

Next Header = 43 Routing Header

Routing Header

Segments Left!

Routing Header Data

Page 12: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

RH0: Amplification Attack •  What if attacker sends a packet with RH containing

–  A -> B -> A -> B -> A -> B -> A -> B -> A .... •  Packet will loop multiple time on the link A-B •  An amplification attack!

A B

Page 13: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

RH0: Amplification Attack •  What if attacker sends a packet with RH containing

–  A -> B -> A -> B -> A -> B -> A -> B -> A .... •  Packet will loop multiple time on the link A-B •  An amplification attack!

A B

Page 14: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

RH0: Amplification Attack •  What if attacker sends a packet with RH containing

–  A -> B -> A -> B -> A -> B -> A -> B -> A .... •  Packet will loop multiple time on the link A-B •  An amplification attack!

A B

Page 15: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

RH0: Amplification Attack •  What if attacker sends a packet with RH containing

–  A -> B -> A -> B -> A -> B -> A -> B -> A .... •  Packet will loop multiple time on the link A-B •  An amplification attack!

A B

Page 16: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

What RFC 5095 Says

“The severity of this threat is considered to be sufficient to warrant deprecation of RH0 entirely. A side effect is that this also eliminates benign RH0 use-cases;

however, such applications may be facilitated by future Routing Header specifications.”

J. Abley Afilias

P. Savola CSC/FUNET

G. Neville-Neil

Neville-Neil Consulting

December 2007

Deprecation of Type 0 Routing Headers in IPv6 RFC 5095

Page 17: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

Type 1: NIMROD

•  A 1994 project funded by DARPA – Mobility – Hierarchy of routing (kind of LISP)

•  Type 1 was deprecated in 2009 – not because of security – but project was defunct and AFAIK not a single NIMROD packet was sent over IPv6...

Source: Clipartpanda.com

Page 18: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

Routing Type!Ext Hdr Length

IPv6 Type 2 Routing Header: no problem

•  Rebound/amplification attacks impossible – Only one intermediate router: the mobile node home address

Next Header RH Type= 2

IPv6 Basic Header Routing Header

Next Header = 43 Routing Header

Routing Header Segments Left= 1!

Mobile Node Home Address

Page 19: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

RH-3 for RPL: no problem •  Used by Routing Protocol for Low-Power

and Lossy Networks •  But only within a single trusted network

(strong authentication of node), never over a public untrusted network –  Damage is limited to this RPL network –  If attacker was inside the RPL network, then he/she

could do more damage anyway

19

Page 20: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

20

Segment Routing Security

Page 21: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

Segment Routing Security •  Addresses concerns of RFC5095

–  HMAC field to be used at ingress of a SR domain in order to validate/authorize the SRH

–  Inside SR domain, each node trust its brothers (RPL model)

•  HMAC requires a shared secret (SDN & SR ingress routers) –  Outside of current discussions –  Pretty much similar to BGP session security or OSPFv3 security

Page 22: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

SRH: identical to RFC 2460 •  Next Header: 8-bit selector. Identifies the

type of header immediately following the SRH •  Hdr Ext Len: 8-bit unsigned integer. Defines

the length of the SRH header in 8-octet units, not including the first 8 octets

•  Routing Type: TBD by IANA (SRH) •  Segment Left: index, in the Segment List, of

the current active segment in the SRH. Decremented at each segment endpoint.

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First Segment | Flags | HMAC Key ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |

... | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[n] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ... | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[3] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // HMAC // // (256 bits, optional) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 23: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

SRH: New •  First Segment: offset in the SRH, not

including the first 8 octets and expressed in 16-octet units, pointing to the last element of the Segment List

•  Flags: –  bit-0: cleanup –  bit-1: rerouted packet –  bits 2 and 3: reserved –  bits 4 to 15: policy flags

•  Segment List[n]: 128 bit IPv6 addresses representing each segment of the path. The segment list is encoded in the reverse order of the path: the last segment is in the first position of the list and the first segment is in the last position

•  Policy List[n] (optional): to mark ingress/ingress SR address, to remember original source address

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First Segment | Flags | HMAC Key ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |

... | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[n] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ... | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[2] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // HMAC // // (256 bits, optional) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 24: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

SRH: New for Security •  HMAC Key-id: identifies the shared secret

used by HMAC. If 0, HMAC field is not present

•  HMAC: SRH authentication (optional)

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First Segment | Flags | HMAC Key ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |

... | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[n] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | ..... | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[3] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // HMAC // // (256 bits, optional) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 25: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

SRH: HMAC Coverage •  Source Address (not shown): as it is

immutable and to prevent SR service stealing •  First Segment: offset in the SRH, not

including the first 8 octets and expressed in 16-octet units, pointing to the last element of the Segment List

•  Flags: –  bit-0: cleanup

–  bit-1: rerouted packet –  bits 2 and 3: reserved –  bits 4 to 15: policy flags

•  HMAC Key ID: •  Segment List[n]: all segments

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First Segment | Flags | HMAC Key ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |

... | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[n] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[0] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | .... | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Policy List[3] (128 bits ipv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // HMAC // // (256 bits, optional) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Page 26: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

26

Lost of Packets with Extension Headers

Page 27: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

Issue: Ext Hdr are dropped on the Internet •  draft-gont-v6ops-ipv6-ehs-in-real-world

– About 20-40% of packets with Ext Hdr are dropped over the Internet

•  SRH works only within one administrative domain – => not an issue as operator set the security/drop policy

•  Test on your own: http://www.vyncke.org/sr.php – And let us know !

Page 28: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Eric Vyncke, May 12th 2015

Another View of Packet Drops

•  Current research by Polytechnique Paris (Mehdi Kouhen) and Cisco (Eric Vyncke)

•  And VM provided by Sander Steffann •  http://btv6.vyncke.org/exthdr/index.php?ds=bgp&t=rh4 (work in

progress!) 28

Page 29: How to Secure Routing Header for Segment Routing? · How to Secure Routing Header for Segment Routing? Eric Vyncke, Distinguished Engineer ... What about mobile node away from SP

Questions?