model checking dynamic datapaths
play

Model Checking Dynamic Datapaths Aurojit Panda, Katerina Argyraki, - PowerPoint PPT Presentation

Model Checking Dynamic Datapaths Aurojit Panda, Katerina Argyraki, Scott Shenker UC Berkeley, ICSI, EPFL Networks: Not Just for Delivery Enforce a variety of invariants: Packet Isolation: Packets from A can not reach B Content


  1. Model Checking Dynamic Datapaths Aurojit Panda, Katerina Argyraki, Scott Shenker UC Berkeley, ICSI, EPFL

  2. Networks: Not Just for Delivery • Enforce a variety of invariants: • Packet Isolation: Packets from A can not reach B • Content Isolation: Content X never accessible by A. • Rate Limiting: B limited to M requests per second.

  3. Invariants are Global • Existing work on verifying global invariants • Anteater, HSA, VeriFlow. • Key assumption • Forwarding state dictated by control plane.

  4. Many Datapaths are "Dynamic" • Dynamic : Forwarding State a ff ected by tra ffi c. • Examples • Middle boxes • Learning switches • Loose Source Record Route IP option.

  5. Dynamic Behavior can Violate Invariants 10.0.0.1 > 10.0.1.1 10.0.0.1 10.0.1.1 Firewall deny: 10.0.0.1-> 10.0.1.1 10.0.0.2 10.0.1.2

  6. Dynamic Behavior can Violate Invariants 10.0.0.1 10.0.1.1 Firewall deny: 10.0.0.1-> 10.0.1.1 10.0.0.2 10.0.1.2

  7. Dynamic Behavior can Violate Invariants 10.0.0.1 10.0.1.1 Firewall deny: 10.0.0.1-> 10.0.1.1 10.0.0.2 10.0.1.2

  8. Dynamic Behavior can Violate Invariants 10.0.0.1 > 10.0.1.1 10.0.0.1 10.0.1.1 Proxy Firewall 10.1.0.1 deny: 10.0.0.1-> 10.0.1.1 10.0.0.2 10.0.1.2

  9. Dynamic Behavior can Violate Invariants 10.0.0.1 10.0.1.1 10.1.0.1 > 10.0.1.1 Proxy Firewall 10.1.0.1 deny: 10.0.0.1-> 10.0.1.1 10.0.0.2 10.0.1.2

  10. Another Example 10.0.0.1 > 10.0.1.1 BAD 10.0.0.1 10.0.1.1 Compression IDS Middlebox if BAD send to 10.0.1.2 10.0.0.2 10.0.1.2

  11. Another Example 10.0.0.1 > 10.0.1.1 10.0.0.1 10.0.1.1 gzip(BAD) Compression IDS Middlebox if BAD send to 10.0.1.2 10.0.0.2 10.0.1.2

  12. Another Example 10.0.0.1 > 10.0.1.1 gzip(BAD) 10.0.0.1 10.0.1.1 Compression IDS Middlebox if BAD send to 10.0.1.2 10.0.0.2 10.0.1.2

  13. Why is this a Problem in the Real World? • Networks are complex and enforce many invariants. • Hard for administrators to keep global image in head. • NFV: Easier to make changes that violate invariants. • Goal: • Check invariants for networks with dynamic elements.

  14. Focusing on Middleboxes for this talk.

  15. High-Level Solution • Treat network as a large program. • Middleboxes are functions in this program. • Use model checking to check the network. • Naive implementation intractable • Challenge: • Network → Program so model checking is tractable.

  16. Scaling through Modularity • Three techniques • Middlebox models (what to model?) • Leverage service chaining. • Policy choices that speedup analysis.

  17. Consider a DPI Middlebox Labeled Harmful ... Receive Send Lookup flow packet packet state Labeled Many steps Benign to analyze traffic Real processing pipeline Expensive to combine: Exponential growth

  18. Consider a DPI Middlebox Labeled Harmful ... Receive Send Lookup flow packet packet state Labeled Many steps Benign to analyze traffic Important for Global Properties

  19. The DPI Model in Math For any packet p sent by DPI box d ∀ send ( d, e, p ) ⇒ ∃ e 0 : recv ( e 0 , d, p ) = p was received by d p was marked harmful ∧ ( d.label ( p ) = harmful ∨ d.label ( p ) = benign) or benign ∧ rtime ( d, p ) < stime ( d, p ) also p was received before being sent

  20. Model Globally Significant Behavior • Checking model accuracy? • Verify code against model. • Enforce model.

  21. Simple Models not Enough Firewall Firewall Firewall Firewall Firewall Firewall 10.0.0.1 10.0.0.2 Networks with 25 middleboxes take 32.2 seconds.

  22. • Modeling middleboxes • Leverage service chaining • Policies for scalability

  23. Networks of Middleboxes Load Balancer Web Server Web Server Proxy Network Web Server Web Server IDS Web Server WAN Opt

  24. Networks of Middleboxes Load Balancer Web Server Web Server Proxy Network Web Server Web Server IDS Web Server WAN Opt Also provide annotations on when paths are taken.

  25. Networks of Middleboxes Load Balancer Web Server Web Server Proxy Network Web Server Web Server IDS Web Server WAN Opt Also provide annotations on when paths are taken.

  26. Networks of Middleboxes Load Balancer Web Server Web Server Proxy Network Web Server Web Server IDS Web Server WAN Opt Also provide annotations on when paths are taken.

  27. Service Chaining • Solutions to implement such chaining. • Limits middlebox states to be checked. • Middlebox state depends on past tra ffi c. • Chaining policy de fi nes sources of tra ffi c. • Network path: set of middleboxes traversed.

  28. • Modeling middleboxes • Leverage service chaining • Policies for scalability

  29. How much of the Network to Consider? M0 M4 M8 M12 M1 M5 M9 M13 B M2 M6 M10 M14 M3 M7 M11 M15 A Prove A isolated from B. Network Path is set of Middleboxes Traversed.

  30. How much of the Network to Consider? M0 M4 M8 M12 M1 M5 M9 M13 B M2 M6 M10 M14 M3 M7 M11 M15 A Prove A isolated from B. Network Path is set of Middleboxes Traversed.

  31. How much of the Network to Consider? M0 M4 M8 M12 M1 M5 M9 M13 B M2 M6 M10 M14 M3 M7 M11 M15 A Prove A isolated from B. Network Path is set of Middleboxes Traversed.

  32. Consider Only Network Path • Pro: Scales with path length not size of network • Con: Not generally applicable • Allows scaling to 10000s of nodes. • Trivial test (2 endhosts, 1 fi rewall, no ACLs) • With pruning 0.11 seconds (with 25000 mboxes) • Without pruning 32.2 seconds (with 25 mboxes)

  33. When can we Prune Part of the Network? Application 10.0.0.1 Firewall Application Proxy Web Server 10.0.0.2 Firewall • Path Independence • Model checking behavior: Enables pruning. • Robustness: Network changes remain local

  34. Achieving Path Independence Application 10.0.0.1 Firewall Application Proxy Web Server 10.0.0.2 Firewall • Solution depends on invariant and network.

  35. Achieving Path Independence Application 10.0.0.1 Firewall Application Application Proxy Web Server 10.0.0.2 Firewall Firewall • Solution depends on invariant and network. • Add a fi rewall before the proxy.

  36. Achieving Path Independence Application 10.0.0.1 Firewall Application Proxy Web Server 10.0.0.2 Firewall • Solution depends on invariant and network. • Add a fi rewall before the proxy. • Change proxy to enforce access invariants.

  37. Achieving Path Independence Application 10.0.0.1 Firewall Application Proxy Web Server 10.0.0.2 Firewall • Solution depends on invariant and network. • Add a fi rewall before the proxy. • Change proxy to enforce access invariants. • Can automatically check path independence.

  38. Achieving Path Independence Application 10.0.0.1 Firewall Application Proxy Web Server 10.0.0.2 Firewall • Solution depends on invariant and network. • Add a fi rewall before the proxy. • Change proxy to enforce access invariants. • Can automatically check path independence.

  39. Tools for Checking Invariants • We have implemented a tool with these optimizations. • Leverages Z3, a SMT solver from Microsoft. • Implemented in about 3700 lines of Python code • The models themselves are less than 1500 lines. • Models about 10 di ff erent middlebox kinds. • Much of the space: Expressing math in Python.

  40. Early Results from Tools 10.0.0.1 > 10.1.0.1 IP Router ACL IP Router 10.0.0.1 10.0.1.1 10.1.0.1 Firewall 10.1.0.2 deny: 10.0.0.1-> 10.0.1.1 • Use Loose Source Routing to circumvent fi rewall • Invariant: No packets from 10.0.0.1 to 10.0.1.1 • We can verify this in 0.39 seconds.

  41. Early Results from Tools 10.1.0.1 > 10.0.1.1 IP Router ACL IP Router 10.0.0.1 10.0.1.1 10.1.0.1 Firewall 10.1.0.2 deny: 10.0.0.1-> 10.0.1.1 • Use Loose Source Routing to circumvent fi rewall • Invariant: No packets from 10.0.0.1 to 10.0.1.1 • We can verify this in 0.39 seconds.

  42. Summary • Path independent policies and invariants: • Easy to maintain, easy to check. • Check if policies + invariants are path independent. • Check if those invariants hold. • O ffl ine but quick veri fi cation possible.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend