Verified Secure Routing David Basin ETH Zurich EPFL, Summer Research - - PowerPoint PPT Presentation

verified secure routing
SMART_READER_LITE
LIVE PREVIEW

Verified Secure Routing David Basin ETH Zurich EPFL, Summer Research - - PowerPoint PPT Presentation

Verified Secure Routing David Basin ETH Zurich EPFL, Summer Research Institute June 2017 Team Members Verification Team Scion Design & Development Team Information Security David Basin Tobias


slide-1
SLIDE 1

Verified Secure Routing

David Basin ETH Zurich


 EPFL, Summer Research Institute June 2017
 
 
 
 
 


slide-2
SLIDE 2

Scion Design & Development Team

Team Members

2

Verification Team

Information Security David Basin Tobias Klenze Ralf Sasse Christoph Sprenger Thilo Weghorn 
 Programming Methodology
 Marco Eilers Peter Müller 
 Network Security Samuel Hitz Adrian Perrig

slide-3
SLIDE 3

Motivation and Context

Routing problems with the status quo (inter-AS routing)

slide-4
SLIDE 4

Routing between autonomous systems

4

  • Network of networks run by different institutions
  • Nodes correspond to Autonomous Systems (ASes)
  • Set of routers run by common institution (Telcos, ISPs, companies)
  • 50,000+ ASes, e.g., your typical university or large corporation.
slide-5
SLIDE 5

AS 2 AS 3 AS 1 AS 4

Autonomous systems and routers

5

  • Multiple paths between ASes: 2,1,4 and 2,3,4
  • Computed in background by Border Gateway Protocol (BGP) 


and just one will be selected and used to configure routers

  • 1. finds paths between ASes 


(and within ASes)

  • 2. forwards data along paths
slide-6
SLIDE 6

Path between two ASes

computed using Border Gateway Protocol (BGP)

6

8 3 1 2 5 4 7 6 Path: 8,7,5,4,2,1 Traffic flow: 1,2,4,5,7,8

Source Destination

slide-7
SLIDE 7

Boarder Gateway Protocol

7

  • ASes exchange reachability information (paths)
  • Policies programmed by network operators
  • Decisions on what is accepted, rejected, or propagated
  • Any AS can announce any address range it wants
  • It is all based on trust! Motivations may vary!

5 7 8

ip

“I can reach ip”

“I can reach ip

  • ver AS 8”

data data

Destination ip: some IP address range,
 e.g., 208.65.153.0/24

My network, my rules!

slide-8
SLIDE 8

Who controls the Internet?

8

  • Control over paths is completely distributed
  • Border Gateway Protocol (BGP): all nodes flood path announcements
  • No inbound traffic control

Routers on path can 
 read and modify data

NSA data storage 
 center Utah

slide-9
SLIDE 9

9

Who controls Internet paths?

slide-10
SLIDE 10

208.65.153.0/24

Pakistan DoS against Youtube (2 hours, 2008)

208.65.153.0/22

Three concrete examples

10

Ukraine ISP hijacks UK routes 
 including UK Atomic Weapons Fribourg’s government address space stolen for 3 days by SPAMers

slide-11
SLIDE 11

Scion

Routing as it should be

slide-12
SLIDE 12

12

▪ Design & Implementation, 75+ man years ▪ Design of routing / forwarding protocols, 
 support ecosystem, and numerous extensions ▪ Clean slate, yet compatible with existing Internet ▪ Not just a research prototype: 
 Growing deployment on 5 continents, 4 ISDs, 26 ASes ▪ See www.scion-architecture.net and related publications


CACM 2017, IEEE S&P 2011, CCS 2015, NDSS 2016, S&P 2016

Scion Project


Secure Future Internet Architecture

slide-13
SLIDE 13

SCION Overview

▪ Isolation Domains (ISD) ▪ Control Plane: routing ▪ Path exploration ▪ Path registration ▪ Path resolution ▪ Data Plane: packet forwarding

13

slide-14
SLIDE 14

A B D C

ISD core ISD

TRC

14

A B D E C H I G F

ISD core ISD core ISD ISD core ISD ISD ISD core ISD

TRC TRC TRC TRC

SCION Isolation Domain (ISD)

(1) Agreement: Each regions agrees on a common trust root. (2) Failure Isolation: No ISD can influence another ISD’s control plane.

slide-15
SLIDE 15

15

SCION Routing (Control Plane)

A B D C

ISD core ISD

TRC

4 2 2 1 1 2 3 4 5 1

G 3 F

1 2 3

H

3

E

1 1

I

1 2 3 4 5

Routing Phases: (1) Path Exploration (2) Path Registration (3) Path Resolution

Beaconing Core: Out: 4 AS E: In: 1, Out: 4

PCB

AS F: In: 1, Out: 3 AS B: In: 1

  • Path Construction Beacons (PCB) are

Sequence of signed Hop Fields

  • Hop Fields (HF) carry the 


routing information for one AS

AS X: In: y, Out: z

slide-16
SLIDE 16

16

SCION Routing (Control Plane)

A B D C

ISD core ISD

TRC

4 2 2 1 1 2 3 4 5 1

G 3 F

1 2 3

H

3

E

1 1

I

1 2 3 4 5

Routing Phases: (1) Path Exploration (2) Path Registration (3) Path Resolution

Beaconing Core: Out: 4 AS E: In: 1, Out: 4

PCB

AS F: In: 1, Out: 3 AS B: In: 1

  • Path Construction Beacons (PCB) are

Sequence of signed Hop Fields

  • Hop Fields (HF) carry the 


routing information for one AS

AS X: In: y, Out: z

slide-17
SLIDE 17

17

SCION Routing (Control Plane)

A B D C

ISD core ISD

TRC

Path Server 4 2 2 1 1 2 3 4 5 1

G 3 F

1 2 3

H

3

E

1 1

I

1 2 3 4 5

Routing Phases: (1) Path Exploration (2) Path Registration (3) Path Resolution

Core: Out: 4 AS E: In: 1, Out: 4

PCB

AS F: In: 1, Out: 3 AS B: In: 1

I I B

Beaconing

slide-18
SLIDE 18

18

SCION Routing (Control Plane)

A B D C

ISD core ISD

TRC

Path Server 4 2 2 1 1 2 3 4 5 1

G 3 F

1 2 3

H

3

E

1 1

I

1 2 3 4 5

Routing Phases: (1) Path Exploration (2) Path Registration (3) Path Resolution

I I B

Core: Out: 4 AS E: In: 1, Out: 4

PCB

AS F: In: 1, Out: 3 AS B: In: 1 Core: Out: 4 AS E: In: 1, Out: 3

PCB

AS G: In: 1, Out: 4 AS I: In: 1 AS H: In: 1, Out: 2

=

Packet Header

slide-19
SLIDE 19

Packet header Forwarding along:

  • Up-Segment
  • Core-Segment
  • Down-Segment

Segments are sequences of Hop Fields (HFs). Hop Field contain routing information of

  • ne AS.

Up- Segment

19

SCION Forwarding (Data Plane)

A B D C

ISD core ISD

TRC

4 2 2 1 1 2 3 4 5 1

G 3 F

1 2 3

H

3

E

1 1

I

1 2 3 4 5 AS E: In: 1, Out: 4 AS F: In: 1, Out: 3 AS B: In: 1, Out: ⊥

Down- Segment

AS E: In: 1, Out: 3 AS G: In: 1, Out: 4 AS I: In: 1, Out: ⊥ AS H: In: 1, Out: 2

Common Header

slide-20
SLIDE 20

Verification

High-level, omitting formal details

slide-21
SLIDE 21
  • Control and data plane guarantees
  • Functional correctness of actual code
  • Suitable for high-assurance business cases
  • Ensures that routers are backdoor-free
  • Scion routers are simple and stateless
  • This is the key to their (feasible) verification
  • Not possible for current Internet with highly complex routers


and giant code bases of millions of lines

Can We Verify Scion?

21

slide-22
SLIDE 22

Correctness and Security

SCION approach

  • Abstract models of network & 


network-wide properties

  • Protocol verification guarantees 


that security properties hold in an 
 adversarial environment, assuming 
 that each SCION component 
 behaves as specified

22

Code Properties

  • Code-level guarantees


(e.g., secure information flow)

  • Guarantees that each SCION

component behaves as specified

Verification of the components at the code level Protocol Properties Verification of the protocol at the network level

Initial focus Router code Data Plane

slide-23
SLIDE 23

Network-Level Verification: Approach

▪ Formal specification of network and network-wide properties

  • Description of network topology, beaconing and path construction, …
  • Network adversary (on and off-path)
  • Network-wide security properties

▪ Formal verification: refinement used to go from high-level models to precise assumptions on the individual components needed to ensure security properties.

  • Correctness by construction: stepwise refinement between (transition) systems
  • Proofs: forward simulation and invariant preservation
  • Invariants preserved under refinement

▪Tool support: verification using Isabelle/HOL 
 system with ETH Zurich developed theory extensions.

23

slide-24
SLIDE 24

Scion Properties

On both control and data planes Control planes properties: address beacons’ authenticity

  • Security critical, but not in focus of this talk

Data plane properties: address how routers forward messages

  • Path Authorization: Packets traverse the network only along

previously authorized paths.

  • Weak Detectability: An active attacker cannot hide his

presence on the path.

24

slide-25
SLIDE 25

SCION Border Routers

25

PCB PCB PCB PCB

core

K A B E Z1 ISD C D Z3 Z2

AS Prov.-Cust. link Peering link ISD

AS

Internal router Border router

C

def router(): while (pkt.nxt()): pkt.process()

slide-26
SLIDE 26

Concrete Attacker Model

We use a localized, colluding Dolev-Yao attacker model

26

A B D C

ISD core ISD

TRC

Attacker controls entire ASes Attacker controls the entire network

slide-27
SLIDE 27

System & Environment

27

Environment Border Router Attacker Network End hosts OS & Libraries

System

slide-28
SLIDE 28

SCION Router Verification Overview

28

Protocol Security Properties Code Security Properties

Environment Model

attacker, network Model

Router Model

}

Real Environment

Router Code

Reality

satisfies refined by unproven justified proven

slide-29
SLIDE 29

SCION Router Verification Overview

29

Protocol Security Properties Code Security Properties

Environment Model

attacker, network Model

Router Model

}

Real Environment

Router Code

Reality

satisfies refined by unproven justified proven

slide-30
SLIDE 30

Abstract Packet Format

30

HF4 HF5 HF6 HF1 HF2 HF3 Future Path Past Path

Example: The Path (consisting of Past and Future) contains Hop Fields (HF)

=

The Path is the Packet A Hop Field contains routing information of one AS

slide-31
SLIDE 31

Refinement Overview

31

A ( ,A, ) ( ,A, , ) ( ,A, , )

Communication channels Hop Field format Attacker

A

Idea: strengthen attacker while increasing protection of paths.

: Neighbor ASes

Refinement

: MAC : Fields protected by MAC : Message set

slide-32
SLIDE 32

Simplified Scenario (Initially)

Packet traversal along a single up-segment

  • A set of authorized-paths from path server is given as parameter
  • Path is an up-segment. Simplify setting for now:
  • Ignore for now core- and down-segments
  • No peering or core links
  • No inter-domain communication (single ISD)
  • No changes in link status (up/down)

32

Verification is still challenging enough!

slide-33
SLIDE 33

Simplified Scenario

33

A B D C

ISD core ISD

TRC

C A B

C B A

slide-34
SLIDE 34

Data Plane Model 0

34

Future Path Past Path

Send0 Up0 Recv0 Up0

A B C A B C A B C A B C

Future Past

Example of one Packet along a simple Path

C B A

slide-35
SLIDE 35

Data Plane Model 0

Past Path

Attr0 Recv0 Up0

D A B C D A B C D A B C

Problem: Past Path is unreliable

Future Path

C B A A

slide-36
SLIDE 36

Real Path

  • Add a new component to the message: the real path
  • records the actually traversed path so far
  • Not part of the system, no correspondence in implementation
  • used for property specification only
  • Corresponds to a “history variable”

36

Past Path Future Path Real Path

slide-37
SLIDE 37

Data Plane Model 0

37

Attr0 Recv0 Up0

A, B A, B, C

Future Past

D A B C A D A B C D A B C

Real C B A

Past Path Future Path Real Path

A

slide-38
SLIDE 38

Formalized Properties of Model 0

Interface with control plane: We assume a set authorized-paths that contains the paths determined by the control plane.

  • Path Authorization Packets traverse the network only along

previously authorized paths.

  • Weak Detectability An attacker cannot hide his presence on the
  • path. This follows from property: the real path is a suffix of the past path.

38

Past Path Future Path Real Path

Past Path Real Path

∈ authorized-paths

Future Path Real Path

slide-39
SLIDE 39

( ,A, )

Data Plane Model 1

39

Past Path Future Path Real Path

A

Hop Field format is refined: Added: references to previous and next AS

Model 0 Model 1

slide-40
SLIDE 40

Data Plane Model 1

40

C B A

A B B C

Send1 Up1 Recv1

A

Up1

A, B A, B, C (⊥, A, B) (A, B, C) (B, C, ⊥) (⊥, A, B) (A, B, C) (B, C, ⊥) (⊥, A, B) (A, B, C) (B, C, ⊥) (⊥, A, B) (A, B, C) (B, C, ⊥) Past Path Future Path Real Path

slide-41
SLIDE 41

Data Plane Model 2: "Chaining" of MACs

41

  • MAC at A is produced with a key(A) known only to A
  • MAC includes data and MAC of subsequent Hop Field (needed for

verification) Simplified representation:

( ,D,⊥, ) ( ,C, , ) ( ,B, , ) (⊥,A, , ) (⊥)

( , A, , ) ( , B, , ) ( , C, , ) ( , D, , )

Hop Field format is further refined by adding a MAC

slide-42
SLIDE 42

Data Plane Model 2

42

Send2 Up2 Recv2 Up2

(⊥, A, B, ) (A, B, C, ) (B, C, ⊥, ) (⊥, A, B, ) (A, B, C, ) (B, C, ⊥, ) (⊥, A, B, ) (A, B, C, ) (B, C, ⊥, ) (⊥, A, B, ) (A, B, C, ) (B, C, ⊥, )

C B A

A B B C

A A, B A, B, C Past Path Future Path Real Path

slide-43
SLIDE 43

Out put in where

Action

( 2, A2, 2, 2) ... ( 1, A1, 1, 1) ... =

'

Up-Event in Model 2

43

In select in Check /\ 1= valid MAC using key(A1) /\ 2= valid MAC using key(A2) /\ 1 = A2 /\ 2 = A1

Guard

'

( 2, A2, 2, 2) ... ( 1, A1, 1, 1) ... =

=

slide-44
SLIDE 44

Refining Model 2

44

A

Refinement

Model 2 Model 3

Global Message Set Inter-AS Message Sets

slide-45
SLIDE 45

Action

Out put in ... ... ( 1, A1, 1, 1) =

'

A1

Up-Event in Model 3

45

In select from Check /\ 1= valid MAC using key(A1) /\ 1 = /\ 1 =

Guard

... ( 1, A1, 1, 1) = A1

'

...

=

slide-46
SLIDE 46

SCION Router Verification Overview

46

Protocol Security Properties Code Security Properties

Environment Model

attacker, network Model

Router Model

}

Real Environment

Router Code

Reality

satisfies refined by unproven justified proven

slide-47
SLIDE 47

Router Model vs. Code

47

Environment Model

attacker, network Model

Router Model

Real Environment

Router Code

Reality

def router(): while (pkt.next()): pkt.process() ...

Guard Action

In
 Check Out

...

( , , , ) ( , , , )

...

( , , , ) ( , , , )

slide-48
SLIDE 48

Code-Level Verification

▪Main goal: prove functional correctness.

  • Code refines the protocol.


▪Other desirable properties only on code level:

  • Safety: Code does not raise runtime exceptions

  • r have data races.
  • Secure information flow: Code does not leak 


any information about crypto keys.

  • Liveness and deadlock freedom


▪Focus on the SCION code base.

  • Used libraries are given specifications, assumed to be correct.
  • Runtime, OS, ..., are assumed to be correct.

48

Router Model Code Security Properties Router Code

Real Environment

slide-49
SLIDE 49

Program Verification

▪Formal specification for each method

  • Pre- and postcondition, loop invariants


▪Formal proof that 
 implementation satisfies specification.

  • Assuming precondition holds at the beginning, prove that

postcondition holds after return (partial correctness).

  • For all possible inputs, schedules, callers, ...
  • Additional proof obligations for special properties, like progress


49

def sqrt(n): ... return result

{n > {n =

slide-50
SLIDE 50

Code-based Verification

▪Scion in Python 3

  • ~11k LOC


▪Substantial subset of Python

  • Most standard OOP features
  • e.g. inheritance, exceptions,

concurrency


▪Focus on router first
 ▪Use Viper Toolchain with Python front end

50

Python standard libraries External libraries

SCION libraries
 (e.g. packets)

Router Beacon Server Path Server

Viper

Intermediate
 verification language Automatic verifiers Front-end SMT solver

slide-51
SLIDE 51

Linking it all up via Input-Output Specifications

(Code can be viewed as a transition system)

51

Based on: Pennickx, Jacobs, Piessens, “Sound, modular and compositional verification of the input/output behavior

  • f programs”, ESOP 2015.

In
 Check

/\ ...

Out

pkt = receive() send(concr( ) ) matches(abs(pkt), ) && 
 check( ... )

Guard Action

...

( , , , ) ( , , , )

= ...

( , , , ) ( , , , )

slide-52
SLIDE 52

SCION Router Verification Overview

52

Protocol Security Properties Code Security Properties

Environment Model

attacker, network Model

Router Model

}

Real Environment

Router Code

Reality

satisfies refined by unproven justified proven

slide-53
SLIDE 53

Status

▪Code verification tools built and prototyped ▪First three levels of refinement completed

  • Improved understanding of protocols and properties
  • Uncovered numerous bugs and omissions
  • Revealed during modeling & formalization
  • Verified against implementation

▪Next step: formally connect the two parts

53

slide-54
SLIDE 54

▪Internet, as designed, is insecure ▪Scion architecture offers much stronger guarantees ▪These can be put on a formal footing via refinement + code-level verification ▪Long term objective: guaranteed back-door-free routers,
 made in Switzerland

Conclusions

54

anapaya systems a

slide-55
SLIDE 55

Want to be a Scion AS?