Verified Secure Routing
David Basin ETH Zurich
EPFL, Summer Research Institute June 2017
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
David Basin ETH Zurich
EPFL, Summer Research Institute June 2017
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
Routing problems with the status quo (inter-AS routing)
Routing between autonomous systems
4
AS 2 AS 3 AS 1 AS 4
Autonomous systems and routers
5
and just one will be selected and used to configure routers
(and within ASes)
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
Boarder Gateway Protocol
7
5 7 8
ip
“I can reach ip”
…
“I can reach ip
data data
Destination ip: some IP address range, e.g., 208.65.153.0/24
My network, my rules!
Who controls the Internet?
8
Routers on path can read and modify data
NSA data storage center Utah
9
Who controls Internet paths?
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
Routing as it should be
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
SCION Overview
▪ Isolation Domains (ISD) ▪ Control Plane: routing ▪ Path exploration ▪ Path registration ▪ Path resolution ▪ Data Plane: packet forwarding
13
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.
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
Sequence of signed Hop Fields
routing information for one AS
AS X: In: y, Out: z
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
Sequence of signed Hop Fields
routing information for one AS
AS X: In: y, Out: z
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
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
Packet header Forwarding along:
Segments are sequences of Hop Fields (HFs). Hop Field contain routing information of
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
High-level, omitting formal details
and giant code bases of millions of lines
Can We Verify Scion?
21
Correctness and Security
SCION approach
network-wide properties
that security properties hold in an adversarial environment, assuming that each SCION component behaves as specified
22
Code Properties
(e.g., secure information flow)
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
Network-Level Verification: Approach
▪ Formal specification of network and network-wide properties
▪ Formal verification: refinement used to go from high-level models to precise assumptions on the individual components needed to ensure security properties.
▪Tool support: verification using Isabelle/HOL system with ETH Zurich developed theory extensions.
23
Scion Properties
On both control and data planes Control planes properties: address beacons’ authenticity
Data plane properties: address how routers forward messages
previously authorized paths.
presence on the path.
24
SCION Border Routers
25
PCB PCB PCB PCBcore
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()
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
System & Environment
27
Environment Border Router Attacker Network End hosts OS & Libraries
System
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
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
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
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
Simplified Scenario (Initially)
Packet traversal along a single up-segment
32
Verification is still challenging enough!
Simplified Scenario
33
A B D C
ISD core ISD
TRCC A B
C B A
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
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
Real Path
36
Past Path Future Path Real Path
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
Formalized Properties of Model 0
Interface with control plane: We assume a set authorized-paths that contains the paths determined by the control plane.
previously authorized paths.
38
Past Path Future Path Real Path
Past Path Real Path
∈ authorized-paths
Future Path Real Path
Data Plane Model 1
39
Past Path Future Path Real Path
Hop Field format is refined: Added: references to previous and next AS
Model 0 Model 1
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
Data Plane Model 2: "Chaining" of MACs
41
verification) Simplified representation:
( ,D,⊥, ) ( ,C, , ) ( ,B, , ) (⊥,A, , ) (⊥)
( , A, , ) ( , B, , ) ( , C, , ) ( , D, , )
Hop Field format is further refined by adding a MAC
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
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) ... =
Refining Model 2
44
A
Refinement
Global Message Set Inter-AS Message Sets
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
'
...
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
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
...
( , , , ) ( , , , )
...
( , , , ) ( , , , )
Code-Level Verification
▪Main goal: prove functional correctness.
▪Other desirable properties only on code level:
any information about crypto keys.
▪Focus on the SCION code base.
48
Router Model Code Security Properties Router Code
Real Environment
Program Verification
▪Formal specification for each method
▪Formal proof that implementation satisfies specification.
postcondition holds after return (partial correctness).
49
def sqrt(n): ... return result
{n > {n =
Code-based Verification
▪Scion in Python 3
▪Substantial subset of Python
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
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
In Check
/\ ...
Out
pkt = receive() send(concr( ) ) matches(abs(pkt), ) && check( ... )
Guard Action
...
( , , , ) ( , , , )
= ...
( , , , ) ( , , , )
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
Status
▪Code verification tools built and prototyped ▪First three levels of refinement completed
▪Next step: formally connect the two parts
53
▪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
Want to be a Scion AS?