verifying rfc 6980 implementations on varying operating ... · o introduction o setup o test...

37
1 RFC 6980 Implementations on Different Operating Systems Jacky Hammer [email protected] / @pennylane0815

Upload: others

Post on 12-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

1

RFC 6980 Implementations on Different Operating Systems

Jacky Hammer [email protected] / @pennylane0815

Page 2: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

22

Agenda

o Introduction

o Setup

o Test Results

o Conclusions

Page 3: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

3

Introduction

Concerning Routers

Page 4: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

4

Router Role in IPv6?

o RFC 2461: “Routers advertise their presence together with various link and Internet parameters either periodically, or in response to a Router Solicitation message”.

o In IPv6 , a router is not just a forwarding device but a provisioning system as well.

Page 5: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

5

o Neighbor Discovery is a fundamental part of “IPv6 DNA”.

o Router Advertisements are an integral part of that

o A local link is regarded trustworthy in IPv6 world

o All ND (including RAs) unauthenticated by default

o Attacker interferes with router discovery

o Traffic redirection by spoofed RAs

© ERNW GmbH | Breslauer Straße 28 | D-69124 Heidelberg #5

About Router Advertisements

Page 6: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

6

Page 7: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

7

The Lab Setup

Basic Parameters and Environment

Page 8: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

8

Page 9: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

9

Toolkit

./chiron_local_link.py enp0s25 \

–ra \

–pr 2001:db8:10:50:: \

-pr-length 64 \

–mtu 1400 \

–s fe80::ee9a:74ff:fef5:a385

o Cisco Catalyst 3560 firmware version 15.2(2)E4o TCPdump && Wiresharko Chiron

o For injection of fake RAso by Antonios Atlasis [www.secfu.net]

Page 10: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

10

Executed Tests

o Baseline RAo Plain RA, unfragmented, no Extension Headers

o Unfragmented RA o Destination Option and/or HBH Headers

o Fragmented RAso Two, three or four fragments

o Hop By Hop, Destination Options and/or Routing Headers in fragmentable part

o Hop By Hop, Destination Options and/or Routing Headers in unfragmentable part

Page 11: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

11

Test Results

Initial Testing on Windows Server 2016

Page 12: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

12

First Test

o Windows Server 2016

o Early 2017

o By-product of general Windows IPv6 testing

o Very bad results -> wanted to look farther

Page 13: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

13

First Tests on Windows Server 2016

# Fragments 1 2 4 1 1 1

Extension Headers+ 1 DestOpt + 1 HBH

+ 1 DestOpt+ 1 DestOpt+ 1 HBH

Message Part

✔✘ ✔ ✘ ✘ ✔ ✔ ✘

Page 14: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

14

First Tests on Windows Server 2016

# Fragments 2 2 2 2 2 2

Extension Headers + 1 DestOpt+ 1 HBH+ 1 DestOpt

+ 1 HBH+ 2 DestOpt

+ 1 DestOpt + 1 RtgHdr + 1 HBH

Message Part U U U F F F

✔✘ ✘ ✘ ✘ ✔ ✔ ✘

Page 15: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

15

First Tests on Windows Server 2016

# Fragments 2 4 2 2 4 3

Extension Headers + 2 DestOpt + 2 DestOpt + 2 RtgHdr+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

Message Part F F F F F F

✔✘ ✔ ✔ ✔ ✔ ✘ ✔

Page 16: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

16

Anything we can do about it?

o RFC 6105 proposes “IPv6 Router Advertisement Guard”

o RFC 7113 update on “Implementation Advice”

o Most current switching hardware supports that mechanism

o Cisco: ipv6 nd raguard

Page 17: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

17

First Tests on Windows Server 2016

# Fragments 1 2 4 1 1 1

Extension Headers+ 1 DestOpt + 1 HBH

+ 1 DestOpt+ 1 DestOpt+ 1 HBH

Message Part

✔✘ ✔ ✘ ✘ ✔ ✔ ✘

RA Guard enabled ✘ ✘ ✘ ✘ ✘ ✘

Page 18: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

18

First Tests on Windows Server 2016

# Fragments 2 2 2 2 2 2

Extension Headers + 1 DestOpt+ 1 HBH+ 1 DestOpt

+ 1 HBH+ 2 DestOpt

+ 1 DestOpt + 1 RtgHdr + 1 HBH

Message Part U U U F F F

✔✘ ✘ ✘ ✘ ✔ ✘ ✘

RA Guard enabled ✘ ✘ ✘ ✘ ✘ ✘

Page 19: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

19

First Tests on Windows Server 2016

# Fragments 2 4 2 2 4 3

Extension Headers + 2 DestOpt + 2 DestOpt + 2 RtgHdr+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

Message Part F F F F F F

✔✘ ✔ ✔ ✔ ✔ ✘ ✔

RA Guard enabled ✘ ✔ ✘ ✘ ✘ ✔

Page 20: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

20

Test Results

In-depth Testing on Linux and FreeBSD Systems

Page 21: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

21

Tested Systems (mid/late 2017)

o Arch Linux 171101

o CentOS 7

o Debian 9

o FreeBSD 10.3

o FreeBSD 11

o OpenSUSE Leap 42.3

o Ubuntu Server 16.04 LTS

o Ubuntu Server 17.10

Page 22: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

22

Detailed Testing on Linux and BSD (without RA Guard | with RA Guard)

# Fragments 1 2 4 1 1 1

Extension Headers+ 1 DestOpt + 1 HBH

+ 1 DestOpt+ 1 DestOpt+ 1 HBH

Message Part

Arch Linux 171101 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

CentOS 7 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

Debian 9 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

FreeBSD 10.3 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

FreeBSD 11.0 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

OpenSUSE 42.3 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

Ubuntu 16.04/17.10 ✔ ✘ ✘ ✘ ✔ ✘ ✔ ✘ ✘

Page 23: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

23

Detailed Testing on Linux and BSD (without RA Guard | with RA Guard)

# Fragments 2 2 2 2 2 2

Extension Headers + 1 DestOpt+ 1 HBH+ 1 DestOpt

+ 1 HBH+ 2 DestOpt

+ 1 DestOpt + 1 RtgHdr + 1 HBH

Message Part U U U F F F

Arch Linux 171101 ✘ ✘ ✘ ✔ ✘ ✘ ✘

CentOS 7 ✘ ✘ ✘ ✔ ✘ ✘ ✘

Debian 9 ✘ ✘ ✘ ✘ ✘ ✘

FreeBSD 10.3 ✘ ✘ ✘ ✔ ✘ ✘ ✘

FreeBSD 11.0 ✘ ✘ ✘ ✔ ✘ ✘ ✘

OpenSUSE 42.3 ✘ ✘ ✘ ✘ ✘ ✘

Ubuntu 16.04/17.10 ✘ ✘ ✘ ✘ ✘ ✘

Page 24: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

24

Detailed Testing on Linux and BSD (without RA Guard | with RA Guard)

# Fragments 2 4 2 2 4 3

Extension Headers + 2 DestOpt + 2 DestOpt + 2 RtgHdr+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

Message Part F F F F F F

Arch Linux 171101 ✔ ✘ ✔ ✘ ✘ ✘ ✘ ✘

CentOS 7 ✔ ✘ ✔ ✘ ✘ ✘ ✘ ✘

Debian 9 ✘ ✘ ✘ ✘ ✘ ✘

FreeBSD 10.3 ✘ ✘ ✘ ✘ ✘ ✘

FreeBSD 11.0 ✔ ✘ ✔ ✔ ✘ ✔ ✘ ✘ ✔

OpenSUSE 42.3 ✘ ✘ ✘ ✘ ✘ ✘

Ubuntu 16.04/17.10 ✘ ✘ ✘ ✘ ✘ ✘

Page 25: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

25

Detailed Wireshark Observations

o Without RA Guard, all RAs are correctly transmitted and received

o With RA Guard enabled, complete RAs or fragmented RAs with EHs in unfragmentable part are dropped

o With RA Guard and Extension Headers placed in fragmentable part:o All fragments (but no RA) can be observed in Wireshark

o Only the main RA (first packet) is dropped

o Should not be - but obviously are - evaluated in some cases!

Page 26: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

26

First Discussions

What happened afterwards …

Page 27: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

27

Outcomes from DENOG9 Presentation

o FreeBSD Bug 224247

o Summary: [patch] RFC 6980 requires to drop fragmented IPv6 neighbour discovery

o Status: Closed FIXED

o Version: 11.1-STABLE

o Special thanks to Lutz!

Page 28: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

28

Further Implications & Discussion

o High impact targets vs low-hanging fruitso Data Centers are high impact but more controlled environments

o Client networks are the low-hanging fruits, thus attractive targets

o With RA guard evasion possible, not even office nets are secure

o More targeted research on common operating systems for clientso Windows 10, MacOS X ?

o Research on behavior of IoT devices and mobile phones necessary

Page 29: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

29

Test Results

Latest Tests on Common Client Operating Systems

Page 30: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

30

Tested Systems (recent)

o Arch Linux (20180401)

o Debian Buster (20180424)

o FreeBSD 11.1

o Mac OS X Sierra (10.12.6)

o OpenSUSE Tumbleweed (20180420)

o Ubuntu Desktop 18.04

o Windows 10 Pro (1709)

Page 31: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

31

Recent Testing on Common Client Operating Systems

# Fragments 1 2 4 1 1 1

Extension Headers+ 1 DestOpt + 1 HBH

+ 1 DestOpt+ 1 DestOpt+ 1 HBH

Message Part

Arch Linux ✔ ✘ ✘ ✔ ✔ ✘

Debian Buster ✔ ✘ ✘ ✔ ✔ ✘

FreeBSD 11.1 ✔ ✘ ✘ ✔ ✔ ✘

Mac OS X Sierra ✔ ✘ ✘ ✔ ✔ ✘

OpenSUSE ✔ ✘ ✘ ✔ ✔ ✘

Ubuntu 18.04 ✔ ✘ ✘ ✔ ✔ ✘

Windows 10 Pro ✔ ✘ ✘ ✔ ✔ ✘

Windows 10 IoT Core ✔ ✘ ✘ ✔ ✔ ✘

Page 32: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

32

Recent Testing on Common Client Operating Systems

# Fragments 2 2 2 2 2 2

Extension Headers + 1 DestOpt+ 1 HBH+ 1 DestOpt

+ 1 HBH+ 2 DestOpt

+ 1 DestOpt + 1 RtgHdr + 1 HBH

Message Part U U U F F F

Arch Linux ✘ ✘ ✘ ✘ ✘ ✘

Debian Buster ✘ ✘ ✘ ✘ ✘ ✘

FreeBSD 11.1 ✘ ✘ ✘ ✔ ✔ ✘

Mac OS X Sierra ✘ ✘ ✘ ✘ ✘ ✘

OpenSUSE ✘ ✘ ✘ ✘ ✘ ✘

Ubuntu 18.04 ✘ ✘ ✘ ✔ ✘ ✘

Windows 10 Pro ✘ ✘ ✘ ✔ ✔ ✘

Windows 10 IoT Core ✘ ✘ ✘ ✔ ✔ ✘

Page 33: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

33

Recent Testing on Common Client Operating Systems

# Fragments 2 4 2 2 4 3

Extension Headers + 2 DestOpt + 2 DestOpt + 2 RtgHdr+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

+ 2 RtgHdr+ 2 DestOpt

Message Part F F F F F F

Arch Linux ✘ ✘ ✘ ✘ ✘ ✘

Debian Buster ✘ ✘ ✘ ✘ ✘ ✘

FreeBSD 11.1 ✔ ✔ ✔ ✔ ✘ ✔

Mac OS X Sierra ✘ ✘ ✘ ✘ ✘ ✘

OpenSUSE ✘ ✘ ✘ ✘ ✘ ✘

Ubuntu 18.04 ✔ ✔ ✘ ✘ ✘ ✘

Windows 10 Pro ✔ ✔ ✔ ✔ ✘ ✔

Windows 10 IoT Core ✔ ✔ ✔ ✔ ✘ ✔

Page 34: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

34

Conclusion

What cannot be unseen …

Page 35: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

35

Conclusions

o Behavior depends not only on OS, but also on versions and kernels

o Should be carefully evaluated and tested in each specific environment

o Security mechanisms can be evaded

o By design of IPv6 probably impossible to be bulletproof

o Strict implementations of standards conflicts with Robustness Principle:

o “Be conservative in what you do, be liberal in what you accept from others.” (Jon Postel, RFC 761)

Page 36: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

36

Implications

o Users are vulnerable to rogue RAs and thus to traffic interception on the local linko This applies to any public, home and even office network

o We MUST NOT rely on transport layer security mechanisms like RA guardo Detailed datagram analysis is not possible on common network hardware

o RFC compliance MUST be tested more thoroughly by vendors and our community

o Even if standards may seem like “formalities”, they may have considerable security impacts and MUST NOT be underestimated

Page 37: Verifying RFC 6980 Implementations on varying Operating ... · o Introduction o Setup o Test Results o Conclusions. 3 Introduction Concerning Routers. 4 ... o Ubuntu Server 16.04

37

www.ernw.de

www.insinuator.net

Thank you for your attention!

Any questions?

[email protected]

@pennylane0815