A Hypothesis Testing Framework for Network Security
- P. Brighten Godfrey
University of Illinois at Urbana-Champaign TSS Seminar, September 15, 2015
A Hypothesis Testing Framework for Network Security P. Brighten - - PowerPoint PPT Presentation
A Hypothesis Testing Framework for Network Security P. Brighten Godfrey University of Illinois at Urbana-Champaign TSS Seminar, September 15, 2015 Part of the SoS Lablet with David Nicol Kevin Jin Matthew Caesar Bill Sanders Work with
University of Illinois at Urbana-Champaign TSS Seminar, September 15, 2015
David Nicol Bill Sanders Kevin Jin Matthew Caesar
Anduo Wang Wenxuan Zhou Dong Jin Jason Croft Matthew Caesar Xuan Zhou with Haohui Mai Ahmed Khurshid Sam King Rachit Agarwal
Haohui Mai, Ahmed Khurshid, Rachit Agarwal, Matthew Caesar, P . Brighten Godfrey, and Samuel T. King. Debugging the Data Plane with Anteater. ACM SIGCOMM, August 2011. Ahmed Khurshid, Xuan Zou, Wenxuan Zhou, Matthew Caesar, and P . Brighten Godfrey. VeriFlow: Verifying Network-Wide Invariants in Real Time. 10th USENIX Symposium on Networked Systems Design and Implementation (NSDI), April 2013. Wenxuan Zhou, Dong Jin, Jason Croft, Matthew Caesar, and P . Brighten Godfrey. Enforcing Customizable Consistency Properties in Software-Defined Networks. 12th USENIX Symposium on Networked Systems Design and Implementation (NSDI), April 2015. Anduo Wang, Brighten Godfrey, and Matthew Caesar. Ravel: Orchestrating Software-Defined Networks. Demo in SOSR’15.
Background: Network Verification
that config changes are bug-free
concerned that changes would cause problems with existing functionality
– Survey of network operators: [Kim, Reich, Gupta, Shahbaz, Feamster, Clark, USENIX NSDI 2015]
Flow monitoring
Screenshot from Scrutinizer NetFlow & sFlow analyzer, snmp.co.uk/scrutinizer/
Configuration verification
e.g.: RCC for BGP [Feamster & Balakrishnan, NSDI’05]
device software device software device software device software device software device software
protocols protocols protocols protocols protocols protocols
Input Predicted
data plane state
Input Predicted Verify the network as close as possible to its actual behavior
data plane state
Input Predicted Verify the network as close as possible to its actual behavior
“Service S reachable
“Is segment isolated?”
Verifier
Diagnosis
Building It
(x4 ∨ x7 ∨ ¯ x1) ∧ (. . .) ∧ (. . .) ∧ (. . .)
x[4] = 1 x[7] = 1 x[1] = 0
A B Packet: x[0] x[1] x[2] … x[n] NP-complete!
Express data plane and invariants as SAT
Check with off-the-shelf SAT solver (Boolector)
Define P(u, v) as the expression for packets traveling from u to v
v) if and only if it satisfies P(u, v)
u v Destination Action 10.1.1.0/24
Fwd to v
P(u, v) = dst_ip ∈10.1.1.0/24
Goal: reachability from u to w ==
C = (P(u, v) ∧ P(v,w)) is satisfiable u v w
Hjalmtysson, Rexford, INFOCOM’05]
Essential to model MPLS, QoS, NAT, etc.
v w u
label = 5?
dst_ip ∈ 0.1.1.0/24
(pi.dst ip ∈ 0.1.1.0/24) ∧ (pi+1.label = 5)
pi+1 = f(pi)
More generally:
Experience with an
Evaluated Anteater with operational network
Revealed 23 bugs with 3 invariants in 2 hours
Loop Packet loss Consistency Being fixed 9 Stale config. 13 1 Total alerts 9 17 2
Backbone
IDP was overloaded,
bypass Bypass routed campus traffic to IDP through static routes Introduced 9 loops
…
building IDP bypass
u
u u’ Admin. interface 12.34.56.0/24
Packet loss
machines at IP level
From Sep, 2008
Consistency
admin interface in FIB
address range
Can we verify networks in real time?
Challenge #1: Obtaining real time view of network Challenge #2: Verification speed
“Service S reachable
Verifier
Diagnosis
Thin, standard interface to data plane (e.g. OpenFlow) Logically centralized controller software abstractions app app
Thin, standard interface to data plane (e.g. OpenFlow) software abstractions app app VeriFlow Logically centralized controller
Veriflow
Generate Equivalence Classes Updates
Fwd’ing rules Equiv classes
0.0.0.0/1 64.0.0.0/3
Find only equivalence classes affected by the update via a multidimensional trie data structure
Veriflow
Generate Forwarding Graphs Generate Equivalence Classes Updates
All the info to answer queries!
Veriflow
Diagnosis report
violation
Generate Forwarding Graphs Generate Equivalence Classes Run Queries Updates
Good rules Bad rules
Simulated network
totaling 5 million RIB entries
Measure time to process each forwarding change
Views
97.8% of updates verified within 1 ms
Towards a Science of Security: Network Hypothesis Testing
1
Modeling dynamic networks
2
Networks as databases
3
Provably correct virtual networks
Modeling dynamic networks
Controller
Remove rule 1 (delayed) Install rule 2
Rule 1 Rule 2 Switch A Switch B
Possible network states:
One solution: “consistent updates” [Reitblatt, Foster, Rexford, Schlesinger, Walker, “Abstractions for Network Update”, SIGCOMM 2012]
CCG Stream of Updates Update queue Verifier Network Model Verification Engine Confirmations Yes Controller A should reach B Safe? No
A B C D E F G H
2 1 3 4
1 mod A->C to A->F 2 add F->G 3 add G->H 4 add H->B
Enforcing dynamic correctness with heuristically maximized parallelism
Can the system “deadlock”?
[Reitblatt et al, SIGCOMM 2012]
Is it fast?
GCC Consistent Updates
CCG
Figure 11: Network-trace-driven emulations: (1) immediate application of updates; (2) CCG (with CU as fallback); and (3) CU.
0.5 1 1.5 2 90 91 92 93 94 95 Throughput (Gbps) Second CCG Consistent updates 0.5 1 1.5 2 90 95 100 105 110 115 120 125 130 Throughput (Gbps) Second CCG Consistent updates
CCG
0.5 1 1.5 2 90 91 92 93 94 95 Throughput (Gbps) Second CCG Consistent updates 0.5 1 1.5 2 90 95 100 105 110 115 120 125 130 Throughput (Gbps) Second CCG Consistent updates
CCG
0.5 1 1.5 2 90 91 92 93 94 95 Throughput (Gbps) Second CCG Consistent updates 0.5 1 1.5 2 90 95 100 105 110 115 120 125 130 Throughput (Gbps) Second CCG Consistent updates
Software-defined Networks as Databases
Thin, standard interface to data plane (e.g. OpenFlow) Logically centralized controller software abstractions app app
Network base tables query, update notification events Openflow control app view app view app view standard SQL database app view
balance load
base view
configuration traffic matrix tenant virtual network
access control
shortest path
load balancer
add_flow del_flow verify 3 2 1 compute path
view
balance load configuration traffic matrix tenant virtual network
access control
shortest path
load balancer
add_flow del_flow verify 3 2 1 compute path
Abstraction via SQL Orchestration via data- sharing “Bonus” DB services
via view maintenance, update
Impact of Network Verification
Configuration verification
Yuan2006]
Firewall verification
Krishnamurthi, LISA’10]
Caesar, G., King, SIGCOMM’11]
Caesar, G., HotSDN’12, NSDI’13]
NSDI’15]
[Kazemian, Varghese, and McKeown, NSDI ’12]
Zeng, Varghese, McKeown, Whyte, NSDI ’13]
Walraed-Sullivan, Govindan, Mahajan, Millstein, NSDI’15]
Microsoft
This paper is included in the Proceedings of the 12th USENIX Symposium on Networked Systems Design and Implementation (NSDI ’15). May 4–6, 2015 • Oakland, CA, USA I S B N 9 7 8Checking Beliefs in Dynamic Networks
Nuno P. Lopes, Nikolaj Bjørner, and Patrice Godefroid, Microsoft Research; Karthick Jayaraman, Microsoft Azure; George Varghese, Microsoft Research h t t p s : / / w w w . u s e n i x .Software pipelines Verifiable SDN Controllers Stateful Networks Higher layer concepts (roles, people, applications)
Thanks!