Model Checking Invariant Security Properties in OpenFlow



Similar documents
SDN Security Design Challenges

A Security Enforcement Kernel for OpenFlow Networks

SDN. What's Software Defined Networking? Angelo Capossele

Software Defined Networking Architecture

Formal Specification and Programming for SDN

A Collaborative Network Security Management System in Metropolitan Area Network

An Assertion Language for Debugging SDN Applications

LPM: Layered Policy Management for Software-Defined Networks

A Fuzzy Logic-Based Information Security Management for Software-Defined Networks

CloudWatcher: Network Security Monitoring Using OpenFlow in Dynamic Cloud Networks

Firewall Verification and Redundancy Checking are Equivalent

Firewall Policy Change-Impact Analysis

OF-RHM: Transparent Moving Target Defense using Software Defined Networking

OpenFlow and Onix. OpenFlow: Enabling Innovation in Campus Networks. The Problem. We also want. How to run experiments in campus networks?

Automated Formal Analysis of Internet Routing Systems

Hypothesis Testing for Network Security

OpenFlow based Load Balancing for Fat-Tree Networks with Multipath Support

Load Balancing Mechanisms in Data Center Networks

Extensible and Scalable Network Monitoring Using OpenSAFE

OpenFlow: Enabling Innovation in Campus Networks

Architecture of distributed network processors: specifics of application in information security systems

Software Defined Networking What is it, how does it work, and what is it good for?

Multiple Service Load-Balancing with OpenFlow

ACL Based Dynamic Network Reachability in Cross Domain

FlowGuard: Building Robust Firewalls for Software-Defined Networks. Hongxin Hu, Wonkyu Han, Gail-Joon Ahn and Ziming Zhao

Towards an Elastic Distributed SDN Controller

Firewalls. Ahmad Almulhem March 10, 2012

Network Security: Network Flooding. Seungwon Shin GSIS, KAIST

Enabling Practical SDN Security Applications with OFX (The OpenFlow extension Framework)

The Lagopus SDN Software Switch. 3.1 SDN and OpenFlow. 3. Cloud Computing Technology

CS6204 Advanced Topics in Networking

VXLAN: Scaling Data Center Capacity. White Paper

Information- Centric Networks. Section # 13.2: Alternatives Instructor: George Xylomenos Department: Informatics

A Look at the New Converged Data Center

How OpenFlow-based SDN can increase network security

B4: Experience with a Globally-Deployed Software Defined WAN TO APPEAR IN SIGCOMM 13

Xperience of Programmable Network with OpenFlow

Design and Implementation of Firewall Policy Advisor Tools

From Network Security To Content Filtering

OpenFlow Based Load Balancing

MEASURING WORKLOAD PERFORMANCE IS THE INFRASTRUCTURE A PROBLEM?

FRESCO: Modular Composable Security Services for So;ware- Defined Networks

Securing EtherNet/IP Using DPI Firewall Technology

Firewall Configuration based on Specifications of Access Policy and Network Environment

A collaborative model for routing in multi-domains OpenFlow networks

InvGen: An Efficient Invariant Generator

Comparisons of SDN OpenFlow Controllers over EstiNet: Ryu vs. NOX

SHIN, WANG AND GU: A FIRST STEP TOWARDS NETWORK SECURITY VIRTUALIZATION: FROM CONCEPT TO PROTOTYPE 1

INTRODUCTION TO FIREWALL SECURITY

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Latency on a Switched Ethernet Network

How To Set Up A Net Integration Firewall

Dynamic Security Traversal in OpenFlow Networks with QoS Guarantee

Sampled NetFlow. Feature Overview. Benefits

SOFTWARE-DEFINED NETWORKING AND OPENFLOW

How Network Transparency Affects Application Acceleration Deployment

Integrated management of network and security devices in IT infrastructures.

Formal Verification for Software-Defined Networking

Software Defined Networks

Whitepaper Continuous Availability Suite: Neverfail Solution Architecture

CS 2112 Spring Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions

Software Defined Networking (SDN) - Open Flow

Frenetic: A Programming Language for OpenFlow Networks

Securing Local Area Network with OpenFlow

Index Terms Domain name, Firewall, Packet, Phishing, URL.

Future of DDoS Attacks Mitigation in Software Defined Networks

HyperFlow: A Distributed Control Plane for OpenFlow

Delegating Network Security with More Information

Firewall Policy Anomalies- Detection and Resolution

Software Defined Networks (SDN)

DDoS Attack Protection in the Era of Cloud Computing and Software-Defined Networking

Fail-Safe IPS Integration with Bypass Technology

ProxyCap Help. Table of contents. Configuring ProxyCap Proxy Labs

Implementation of Address Learning/Packet Forwarding, Firewall and Load Balancing in Floodlight Controller for SDN Network Management

Software Defined Networking and the design of OpenFlow switches

Towards Optimal Firewall Rule Ordering Utilizing Directed Acyclical Graphs

Network Management as a Service

Using RADIUS Agent for Transparent User Identification

Methods for Lawful Interception in IP Telephony Networks Based on H.323

Chapter 2 Addendum (More on Virtualization)

Hadoop Technology for Flow Analysis of the Internet Traffic

I. ADDITIONAL EVALUATION RESULTS. A. Environment

Enabling Flow-based Routing Control in Data Center Networks using Probe and ECMP

Expansion of a Framework for a Data- Intensive Wide-Area Application to the Java Language

GlobalSCAPE DMZ Gateway, v1. User Guide

HANDBOOK 8 NETWORK SECURITY Version 1.0

EventBus Module for Distributed OpenFlow Controllers

Open Source Network: Software-Defined Networking (SDN) and OpenFlow

Transcription:

Model Checking Invariant Security Properties in OpenFlow Sooel Son University Texas at Austin Seungwon Shin Texas A&M University Vinod Yegneswaran SRI International Phillip Porras SRI International Guei Gu Texas A&M University Abstract The OpenFlow (OF) switching specification represents an innovative and open standard for enabling the dynamic programming flow control policies in production networks. Unfortunately, thus far researchers have paid little attention to the development methods for verifying that dynamic flow policies inserted within an OpenFlow network do not violate the network s underlying security policy. We introduce FLOVER, a model checking system which verifies that the aggregate flow policies instantiated within an OpenFlow network does not violate the network s security policy. We have implemented FLOVER using the Yices SMT solver, which we then integrated into NOX, a popular OpenFlow network controller. FLOVER provides NOX a formal validation the OpenFlow network s security posture. I. INTRODUCTION OpenFlow (OF), an fshoot the clean-slate network research initiative [5], [6], [8], is a new and open standard for enabling programmability and dynamic orchestration enterprise networks. By design, OpenFlow allows network administrators to run custom and third-party applications on a network controller device, which can insert dynamic control flow policies by modifying flow tables at each switch and enable compelling applications such as virtual machine mobility, load balancing, and threat mitigation. However, OpenFlow provides no built-in mechanisms for administrators to vet applications, either statically or at runtime, for compliance with network security policies. We argue that systematic support for automatic security policy enforcement, i.e., the ability to validate that dynamically produced flow updates preserve all security specified in the network security policy, is vital to the wide adoption OpenFlow. We propose a provably correct and automatic method for verifying that a given property holds with respect to a set flow s committed by an OpenFlow controller. Non-bypassability is a basic security property, which is enforced by most firewalls and switches. This property stipulates that packets or flows satisfying specified conditions must adhere to a predefined action, such as forward or drop. Since flow tables switches in OpenFlow environments can include a large number prioritized flow entries, manual verification the property on large flow tables across switches is challenging. Furthermore, given the dynamic nature flow tables, the heterogeneity vendor implementation in flow table ordering and management, and complex flow constructs such as set operations that can alter packet content, even automated security evaluation systems are challenged by OpenFlow. Here, we address this challenge verifying the compliance a flow set against an invariant security policy. Our contributions. The contributions our work include the following: We present a formal approach to prove the conformance dynamically produced OpenFlow flow s against security, including those with set and goto table actions. Using FLOVER we demonstrate how to translate Open- Flow s and a network security policy into an assertion set, which can then be processed and verified by an SMT solver. Our experimental evaluation FLOVER performance shows that our prototype implementation on Yices can detect coverage and modify violations up to 2 s in under 131 ms and 12 ms respectively. II. RELATED WORK Our work is informed by prior work on modeling firewall security policies [11], [12]. These studies, however, do not address the dynamic nature flow s in stwaredefined networks. Our work is most similar to FlowChecker, which encodes OF flow tables into Binary Decision Diagrams(BDD) and uses model checking [2] to verify security and Veriflow which proposes to slice the OF network into equivalence classes to efficiently check for invariant property violations [1]. However, these systems do not explicitly address intermediate actions such as set and goto commands. Our work extends beyond these by including formal modeling and verification set and goto table action commands. Instead resolving all intermediate actions when modeling flow s, our work leverages the capability a fast and sound SMT solver to resolve all intermediate actions during flow verification. NICE uses symbolic execution to verify conformance OF applications [4]. However, such path exploration approaches do not scale well for large applications. III. BACKGROUND OpenFlow facilitates dynamic network orchestration through the separation control-path and data-path and by enabling dynamic programmability the control-path. In an OpenFlow network, an OF-controller provides interfaces for creating applications that handle network flow s dynamically. This greatly simplifies the management

OF-switches as the OF-switch simply enforces flow s (providing the data path), received from an OF-controller. An OF-switch operates as a generic network switch, except for the OF-protocol extension that enables it to dynamically incorporate flow s provided by the OF-controller. If an OF-switch receives a network packet for which there is no corresponding flow, it reports the packet to an OFcontroller, which returns a flow that enables the switch to handle subsequent packets from that flow. Controller applications are in charge creating flow s for OF-switches. When an OF-controller receives a flow request from an OF-switch, the OF-controller delivers such requests to a controller application. The application then creates a set flow s and sends it to the switch through an encrypted network link. As a controller application may communicate with multiple OF-switches simultaneously, an application can distribute a set coordinated flow s across the switches to direct routing or optimize tunneling in a way that may dramatically improves the efficiency traffic flows, while enabling much greater dynamic control flows that is hardly achievable using traditional network infrastructure. A. Non-Bypass Security Property Violations FLOVER addresses the problem verifying that the current state flow s inserted in a switch s flow table(s) remain consistent with the current network security policy. We decompose the network security policy into a set assertions, which we refer to as Non-bypass. Intuitively, a Non-bypass property is commonly observable in modern networks as the flow deny and allow, which are statically defined to restrict or enable flows throughout and across the network. A Non-bypass property specifies whether a certain packet/flow matching a set conditions should be dropped or forwarded to its destination (we formalize this notion in Section IV-A). For the purpose verifying a property across an OF-network, it is necessary to verify all flow tables within the OF-network. Table I is a simple instance our proposed flow set model with no overlaps. For simplicity, we denote IP addresses as non-negative integers and provide a formal definition our OF flow set in Section IV. Each entry the flow set consists conditions over defined fields and a set actions. We assume that if a given packet matches all conditions multiple entries, any set actions corresponding to the matching entry may be performed. This paper addresses two types violations the nonbypass security property that may be present in an OF flow set instance. For the first type violation, we assume that Table I is evaluated against the following property: every packet that goes from source IP [5,6] to destination IP 6 must be dropped. However, an OF switch using Table I will forward any packet that has 6 for both the source and destination IP address because the third entry in the first flow table. That is, the final action for Condition Flow Field 1 Field 2 Field 3 Field 4 Action Table Src IP Src Port Dst IP Dst port Set 1 5 [,19] 6 [,19] { (drop) } 1 5 [,19] [7,8] [,19] { (set field 1 1), (goto 2) } 1 6 [,19] [6,8] [,19] { (forward) } 2 [1,12] [,19] [,12] [,19] { (set field 3 6), (forward) } Table I: Example OpenFlow set used to illustrate coverage and modify violations every packet satisfying the conditions a given property is inconsistent with the action the property (and thus some packets can bypass the constraints). We call this kind misconfiguration a coverage violation. The second type violation arises due to the set command in an OF flow table. In this example, we define another property such that every packet which goes from source IP address 5 to destination IP address 6 must be dropped. However, an adversary may tunnel the packet through a series one or more intermediate receivers such that the transmission chain originates from IP address 5 and ends at destination IP address 6, which is a violation the property. For example, when an adversary sends a malicious packet p whose source and destination IP addresses are 5 and 7 respectively, the packet p is changed into p that goes from source IP 1 to destination IP 6. Then, the packet p is forwarded to another switch or the host whose IP address is 6 by the first flow table 2. Thus, packet p which originates from source IP 5 finally arrives at destination IP 6, which is a clear violation the specified property. We call this type violation a modify violation. B. SMT Solving in Yices Yices is a Satisfiability Modulo Theories (SMT) solver, developed at SRI. The core Yices implements an efficient SAT solver based on the Davis-Putnam-Logemann-Loveland (DPLL) algorithm [7]. Yices is provided with an input file modeling given first order logic. If a given model is satisfiable, i.e., there exists at least one instance satisfying all model constraints, Yices outputs such a satisfying example. Otherwise, Yices reports the model to be unsatisfiable. We leverage the soundness Yices and its ability to efficiently find satisfying examples, to verify flow sets. IV. FLOW VERIFICATION FLOVER is implemented as an OF application that runs on an OF-controller. Whenever an OF-controller delivers newly created flow s to an OF-switch, FLOVER verifies a set specified against the updated flow set. Specifically, if FLOVER receives a flow request from an OF-switch, it first creates an update or add command consisting at least one flow 1, and then verifies predefined against the set created s 1 For creating a flow, we use a built-in function NOX controller.

!"#$%&' This property denotes that if an initial packet, before modification by an OF-switch, matches the conditions then its final result must be consistent with the action the property. The formal representation a property proving that a flow set has no modify violation is as follows:!()*'+,-(.'%/)1.2' #!'6*89@'B' 6,>=?,-8(89:' 6.7289:' ;2)<.29:'!()*'+,-(.=' 345%6' D,9,';,9@'!()*'+,-(.'' E<1,9.=' #!'6*89@'C' Non-bypass propertym = (p, p )( 2 Cj (p) #!'5)/92)((.2' n Ck (p ) a), k=3 a {forward, drop} #!'6*89@'A' (p, p ) = a pair initial packet p and its final packet p Figure 1: Overview F LOVER and previously committed flow s. Figure 1 illustrates this interaction. F LOVER internally consists a flow table encoder and the Yices SMT solver. First, F LOVER encodes the flow set, a collection flow s and specified into Yices code. Yices then verifies whether the property holds on the encoded model. As long as an OFcontroller verifies every committed flow update under its control, F LOVER can prevent an OF network from violating a specified set. F LOVER supports two execution modes: in-line and batch modes. In its in-line mode F LOVER performs flow validation with each flow update while in the batch mode, verification is done periodically to improve the controller response time. We now formalize two key components our framework: security property and flow set. We then present a method modeling both components in Yices to verify that a flow set is free from coverage and modify violations. A. Non-bypass Property Representation A security property asserts a feature within a given flow set. Formally, a security property is a form first order logic consisting universal quantifier, conditions and an action. An action can be forward or drop. The conditions part a security property is a conjunction boolean expressions over flow set fields. The maximum number fields is up to 15 [1]. The condition for each field is encoded with a boolean expression specifying a range non-negative integers because every field consists a number bits whose length varies from 3 to 64. To assert within a flow set against coverage and modify violations, F LOVER uses two forms security, respectively. The formal representation a property denoting that a flow set is free from coverage violations is as follows: Non-bypass propertyc = p( n F1 (p) = source IP field packet p, F2 (p) = source port field packet p This property dictates that if the initial packet p before modification by an OF-switch matches the source IP and port conditions and its final packet p matches the remaining conditions the property then, the final result for packet p must be consistent with the action specified by the property. We assume that the administrator an OF network has a priori knowledge what must be enforced within the network. F LOVER checks whether the specified hold for the evaluation sequence imposed by the switch. B. Flow Rule Set Representation Table I is an instance our flow set. Each flow entry () has a flow table number indicating where it belongs. Each flow has conditions over fields and a set actions. The condition for each field is a range nonnegative integers, which supports wildcard expression. The action set for each flow must contain one forward, drop or goto as a final action. The action set for a flow can have multiple set commands that alter the packet matching the condition the flow entry. nomatch represents that a flow table has no matching flow. When there is no matching for an input packet, an OF-switch submits the packet to the OF controller and requests a flow in the default setting2. Thus, for packet p, the possible final action set F lowrulei in F lowt ablek can be modeled using the following logic forms. F lowrulei F lowt ablek, Condi (p) = n Fj (p) [ilowi,j, ihighi,j ] j= F lowrulei (p) = {a a = actionf inal F lowrulei s.t Condi (p) = true } Since the action set flow entries has a forward, drop or goto action (an intermediate decision delegated to another flow table), the final action each flow entry is modeled as follows. p models the after state the initial packet p that could have been changed due to set commands. actionf inal {forward, drop, F lowt ablel (p ) } s.t. l > k Cj (p) a), a {forward, drop} Cj (p) = Fj (p) [ilowj, ihighj ], Fj (p) = j th field p Considering an OF-switch always starts matching packets from the first flow table, all possible final actions matching 2 An administrator can change the default behavior into forward or drop

1 ( define type s t a t e s ( s c a l a r f o r w a r d drop nomatch goto ) ) 2 ( define type packet ( record Field1 : : i n t Field2 : : i n t Field3 : : i n t Field4 : : i n t ) ) 3 ( define type m i x s t a t e ( record d : : p a c k e t d1 : : s t a t e s ) ) 4 ( d e f i n e p : : p a c k e t ) 5 ( d e f i n e a f i n a l : : m i x s t a t e ) 6 ( d e f i n e Cond3::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 7 (>= ( s e l e c t x F i e l d ) 1) (<= ( s e l e c t x F i e l d ) 12) 8 (>= ( s e l e c t x F i e l d 1 ) ) (<= ( s e l e c t x F i e l d 1 ) 19) 9 (>= ( s e l e c t x F i e l d 2 ) ) (<= ( s e l e c t x F i e l d 2 ) 12) 1 (>= ( s e l e c t x F i e l d 3 ) ) (<= ( s e l e c t x F i e l d 3 ) 19) ) ) ) 11 ( d e f i n e Rule3::( > p a c k e t m i x s t a t e ) ( lambda ( x : : p a c k e t ) 12 ( i f ( Cond3 x ) ; ; Condition the 1 st entry in flow table 2 13 ; ; forward f o r t r u e branch 14 (mk record d : : ( u p d a t e x F i e l d 3 6) d1 : : forward ) 15 (mk record d : : x d1 : : nomatch ) ; ; Nomatch f o r f a l s e branch 16 ) ) ) 17 ( d e f i n e Cond2::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 18 (>= ( s e l e c t x F i e l d 1 ) 6) (<= ( s e l e c t x F i e l d 1 ) 6) 19 (>= ( s e l e c t x F i e l d 2 ) ) (<= ( s e l e c t x F i e l d 2 ) 19) 2 (>= ( s e l e c t x F i e l d 3 ) 6) (<= ( s e l e c t x F i e l d 3 ) 8) 21 (>= ( s e l e c t x F i e l d 4 ) ) (<= ( s e l e c t x F i e l d 4 ) 19) ) ) ) 22 ( d e f i n e Rule2::( > p a c k e t m i x s t a t e ) ( lambda ( x : : p a c k e t ) 23 ( i f ( Cond2 x ) ; ; C o n d i t i o n o f t h e 3 rd e n t r y i n f l o w t a b l e 1 24 (mk record d : : x d1 : : forward ) ; ; Forward f o r t r u e branch 25 (mk record d : : x d1 : : nomatch ) ; ; Nomatch f o r f a l s e branch 26 ) ) ) 27 ( d e f i n e Cond1::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 28 (>= ( s e l e c t x F i e l d 1 ) 5) (<= ( s e l e c t x F i e l d 1 ) 5) 29 (>= ( s e l e c t x F i e l d 2 ) ) (<= ( s e l e c t x F i e l d 2 ) 19) 3 (>= ( s e l e c t x F i e l d 3 ) 7) (<= ( s e l e c t x F i e l d 3 ) 8) 31 (>= ( s e l e c t x F i e l d 4 ) ) (<= ( s e l e c t x F i e l d 4 ) 19) ) ) ) 32 ( d e f i n e Rule1::( > p a c k e t m i x s t a t e ) ( lambda ( x : : p a c k e t ) 33 ( i f ( Cond1 x ) ; ; C o n d i t i o n o f t h e 2nd e n t r y i n f l o w t a b l e 1 34 ; ; D e l e g a t e t h e d e c i s i o n t o a n o t h e r f l o w t a b l e 35 (mk record d : : ( u p d a t e x F i e l d 1 1) d1 : : goto ) 36 (mk record d : : x d1 : : nomatch ) ; ; Nomatch f o r f a l s e branch 37 ) ) ) 38 ( d e f i n e Cond::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 39 (>= ( s e l e c t x F i e l d 1 ) 5) (<= ( s e l e c t x F i e l d 1 ) 5) 4 (>= ( s e l e c t x F i e l d 2 ) ) (<= ( s e l e c t x F i e l d 2 ) 19) 41 (>= ( s e l e c t x F i e l d 3 ) 6) (<= ( s e l e c t x F i e l d 3 ) 6) 42 (>= ( s e l e c t x F i e l d 4 ) ) (<= ( s e l e c t x F i e l d 4 ) 19) ) ) ) 43 ( d e f i n e Rule::( > p a c k e t m i x s t a t e ) ( lambda ( x : : p a c k e t ) 44 ( i f ( Cond x ) ; ; Condition the 1 st entry in flow table 1 45 (mk record d : : x d1 : : drop ) ; ; Drop f o r t r u e branch 46 (mk record d : : x d1 : : nomatch ) ; ; Nomatch f o r f a l s e branch 47 ) ) ) Figure 2: Example transformed Yices code a given packet p is modeled with the following logic form. F lowt able 1(p) = { a a = action final F lowrule i s.t. Cond i(p) = true} (1) n F lowrule i F lowt able 1, Cond i(p) = F j(p) [ilow i,j, ihigh i,j] j= C. Encoding Flow Rule Sets into Yices For the purpose verifying, FLOVER transforms a given flow set into an Yices code specifying all possible pairs a packet and its final action. Figure 2 shows the transformed Yices input code obtained from the flow set in Table I. Line 1 defines the state type, which denotes possible final actions. The set action is also covered with an update command that modifies an input packet state. Line 2 defines a record type, packet, consisting a number integer field values. Line 3 defines the mixstate record type, which represents an output state a Rule i function: mixstate consists packet and states type values. The mixstate record type denotes a pair a flow action and a packet state after applying actions in the flow. FLOVER generates Rule i and Cond i functions for each flow entry. The Cond i function is a conjunction every condition over fields at the i th flow entry. Therefore, Cond i gets a packet type input and outputs true if a given packet matches all conditions. Otherwise, it outputs false. The Cond i function is a representation the following logic expression: Cond i (p) = n j= F j(p) [ilow i,j, ihigh i,j ]. 1 ( d e f i n e c o n d b y p a s s p r o p e r t y ::( > p a c k e t bool ) 2 ( lambda ( x : : p a c k e t ) ( and 3 (>= ( s e l e c t x F i e l d 1 ) 5) (<= ( s e l e c t x F i e l d 1 ) 5) 4 (>= ( s e l e c t x F i e l d 2 ) ) (<= ( s e l e c t x F i e l d 2 ) 9) 5 (>= ( s e l e c t x F i e l d 3 ) 6) (<= ( s e l e c t x F i e l d 3 ) 6) 6 (>= ( s e l e c t x F i e l d 4 ) ) (<= ( s e l e c t x F i e l d 4 ) 9) 7 ) ) ) 8 ( a s s e r t ( c o n d b y p a s s p r o p e r t y ) p ) ) 9 ( a s s e r t ( / = ( s e l e c t a f i n a l d1 ) nomatch ) ) 1 ( a s s e r t (= ( s e l e c t a f i n a l d1 ) f o r w a r d ) ) ; ; n e g a t i o n o f t h e a c t i o n i n t h e non bypass p r o p e r t y Figure 3: Non-bypass property for coverage misconfigurations The Rule i function models flow entry () matching and modifications to the matched packets. Rule i receives a packet type input and outputs a mixstate type, which is a record the action and the after state for an input packet. More specifically, Rule i receives a packet and checks if Cond i is true. If Cond i is false, then Rule i outputs nomatch, denoting that Rule i cannot decide an action for the input packet. When i indicates the last entry the flow set, the action type corresponding to the false branch is also nomatch (i.e., the given packet does not match any condition). If the corresponding actions for the ith flow entry contain set commands, the set action is encoded into (update x field c val c ). Lines 11 and 32 show such an instance the Rule i function. D. Verifying Non-Bypass Property Against Coverage and Modify Violations To test for coverage violations, FLOVER checks if the given property is satisfied by a flow set. That is, for all packets whose final action can be resolved to forward or drop by the flow set, the action a given property must be consistent with the final action corresponding to every packet which satisfies the conditions the property. Otherwise, there exists at least one packet whose final action is not the same as the property, but satisfies the conditions the security property. Figure 3 shows our transformed Yices code denoting the following property. 4 Non-bypass property c = p( C j(p) drop) C 1(p) = F 1(p) [5, 5], C 2(p) = F 2(p) [, 9] C 3(p) = F 3(p) [6, 6], C 4(p) = F 4(p) [, 9] FLOVER asserts packet p at line 8 and 9, as it considers all packets (i) that satisfy the conditions a security property and (ii) for those that can be resolved to forward or drop. Since Yices is a counterexample finder, we negate the right hand side P at line 1, which is forward. Yices takes this code as input data and shows whether the given code is unsatisfiable or satisfiable with a satisfying example. An outcome unsat means that a property holds in the given flow set because Yices cannot find any packet that (1) satisfies the conditions the property, and (2) its final action is not consistent with the action the property. Otherwise, a

1 ( d e f i n e cond wholedomains::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 2 (>= ( s e l e c t x F i e l d 1 ) ) (< ( s e l e c t x F i e l d 1 ) 2) 3 (>= ( s e l e c t x F i e l d 2 ) ) (< ( s e l e c t x F i e l d 2 ) 2) 4 (>= ( s e l e c t x F i e l d 3 ) ) (< ( s e l e c t x F i e l d 3 ) 2) 5 (>= ( s e l e c t x F i e l d 4 ) ) (< ( s e l e c t x F i e l d 4 ) 2) 6 ) ) ) 7 ( d e f i n e c o n d b y p a s s p r o p e r t y b e f o r e ::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 8 (>= ( s e l e c t x F i e l d 1 ) 5) (<= ( s e l e c t x F i e l d 1 ) 5) ; ; d e n o t e s o u r c e IP f i e l d 9 (>= ( s e l e c t x F i e l d 2 ) ) (<= ( s e l e c t x F i e l d 2 ) 9) ; ; d e n o t e s o u r c e p o r t f i e l d 1 ) ) ) 11 ( d e f i n e c o n d b y p a s s p r o p e r t y a f t e r ::( > p a c k e t bool ) ( lambda ( x : : p a c k e t ) ( and 12 (>= ( s e l e c t x F i e l d 3 ) 6) (<= ( s e l e c t x F i e l d 3 ) 6) ; ; denote dest IP f i e l d 13 (>= ( s e l e c t x F i e l d 4 ) ) (<= ( s e l e c t x F i e l d 4 ) 9) ; ; d e n o t e d e s t p o r t f i e l d 14 ) ) ) 15 ( a s s e r t ( cond wholedomains p ) ) 16 ( a s s e r t ( / = ( s e l e c t a f i n a l d1 ) nomatch ) ) 17 ( a s s e r t (= ( s e l e c t a f i n a l d1 ) f o r w a r d ) ) ; ; n e g a t i o n o f t h e a c t i o n i n t h e non bypass p r o p e r t y 18 ( a s s e r t ( and 19 ( c o n d s e c u r i t y p r o p e r t y b e f o r e p ) 2 ( c o n d s e c u r i t y p r o p e r t y a f t e r ( s e l e c t a f i n a l d ) ) 21 ) ) ) Figure 4: Non-bypass property for modify misconfigurations property does not hold in the flow set for a certain packet. To find a modify violation, FLOVER considers not only a final action but also the final packet state p for the entire packet domain. Let us suppose that the property for finding modify violations is the following: 2 4 Non-bypass property m = (p, p )( C j(p) C k (p ) drop) k=3 C 1(p) = F 1(p) [5, 5], C 2(p) = F 2(p) [, 9] C 3(p) = F 3(p) [6, 6], C 4(p) = F 4(p) [, 9] To find such modify violations, we pick source IP and source port as the fields to check for an initial state. The remaining fields are used for checking the final state a packet. Here, the objective Yices is to find one counter packet such that (i) its resolved final action is inconsistent with the action the security property, (ii) its initial packet state matches the conditions the property for the source IP and source port fields, and (iii) the final packet state matches the condition the property for the remaining fields. This intuition is modeled in Figure 4. Line 15 asserts a domain range initial packet p to consider all possible packets. Lines 16 and 17 asserts mixstate t whose final action is neither drop nor nomatch, which is a negation an action part a given property. Line 19 asserts that the initial packet state p should match the conditions the property for source IP and source port fields. Line 2 also asserts that packet state a final should match the condition the property for destination IP and destination port fields. If there exists at least one satisfying example, it denotes that the target flow set can create the packet that clearly violates a given property at the end. If Yices outputs unsat, FLOVER reports that the flow set satisfies a given property against modify violations. V. EVALUATION To evaluate FLOVER, we used Mininet [3], a virtual environment to emulate OF-switches, hosts, and OF-controllers. Verification time [ms] 5 45 4 35 3 25 2 15 1 5 1 1 2 3 4 5 6 Number non bypass (Coverage) Verification time [ms] 4 35 3 25 2 15 1 5 1 1 2 3 4 5 6 Number non bypass (Modify) Figure 5: Performance analysis FLOVER In-Line mode In Mininet, we built a virtual OpenFlow network consisting one OF-switch, two hosts connected to the switch, and one OF-controller. We implemented FLOVER as an application running on NOX [13]. The application was implemented in C++ and linked with the Yices library. The experiments were conducted on a Linux workstation with Intel Core i3 CPU and 4 GB memory. A. In-Line Mode Test In its in-line mode operation, FLOVER enforces nonbypass whenever it receives a flow request from an OF-switch. When FLOVER receives such request, FLOVER first creates a set flow s and then checks whether such a flow set is in conflict with predefined while recording all created flow s. If the created s has no goto action then, it is sufficient to verify against just the newly created s, rather than all committed s. Because FLOVER does not commit any (1) that can be resolved to forward or drop and (2) conflicts with, when an OF-switch selects a flow for an input packet, such flow is already verified 3. When the created has goto table action, we merge a set created flow s with recorded flow s to verify. We measure the performance FLOVER in terms the flow verification time for both coverage and modify violations. Specifically, we investigate the time FLOVER takes to determine whether a created set is in conflict with, as increasing the number nonbypass. Figure 5 shows the evaluation result applying FLOVER in our test environment. As the number increases, the verification time also increases, from around 1 ms (with 5 ) to under 46 ms (with 55 ). Such 1-46 ms penalty is only imposed on the first (SYN or SYN/ACK) packet every connection. To put these numbers in perspective, the median interarrival time for flows at a datacenter is around 3 ms [9]. Furthermore, our current implementation is unoptimized. We consider two performance optimizations as obvious extensions to enable deployment in large data centers. The 3 We omit the formal pro due to the page limit

cation, operation which wefor leave Yices forto future remove work. the startup cost associated with each flow verification, which we leave for future work. 1 1 2 3 4 5 6.2 Batch Mode Test 6.2 Batch Mode Test In the batch mode, implements a delayed procedure, which aims toin reduce the batch the mode, burden an OF-controller. implements athe delayed batchverification mode verifies procedure, a set which aims to reduce the against burden the aggregated an OF-controller. flow The set collected batch mode since verifies the last a set 6 45 6 45 1 non bypass against the aggregated flow 1 non bypass set collected since between, the last e.g., 2 s with 6 security and a 1 non bypass 1 non bypass 4 verification round. 2 non bypass Verifying flow tables consisting 4 2 non bypass 2 non bypass 2 non bypass many flow sets against 5 5 4 non bypass 4 non bypass 4 non bypass 4 non bypass 6 non bypass 6 non bypass 35 6 non bypass 35 6 non bypass verification round. in real Verifying time may flow cause tablesnoticeable consistinglatency manywhen flow processing penalty sets against 13 ms (which is typically incurred only on the 4 4 3 3 a lot new network connections. in real time The batch may cause mode noticeable latency addresses when first processing such packet each connection). 25 25 3 3 issues through a lot new the following network connections. three steps: (1) The 2 if batch the 2 number mode passed addresses sets is such 2 issues2through the following three steps: 15 (1) 15 if the number passed sets is VI. CONCLUSION larger than a threshold θ, performs verification on all updated (but not verified) larger than sets, a (2) threshold θ, reports if performs (a) collected verification flow on set(s) all updated violate(s) We (but proposed not a new way modeling OpenFlow flow 5 5 verified) sets, and (2) (3) optionally, reports if (a) collected operates flow in a passive set(s) tables batch violate(s) with the Yices SMT solver to check for 1 1 2 3 4 5 1 1 1 1 2 3 2 4 3 5 4 5 number flow number s flow s number flow number s flow s mode where it passes a created and (3) set optionally, to OF-switches without operates verification in a passive property but batch violations. We developed a prototype implementa- mode where it passes a created set to OF-switches without verification but continues Fig. 1: Fig. Figure recording Time 1: 6: Time analysis Performance allanalysis flow Batch sets, FLOVER Batch Fig. 11: Fig. Batch Time 11: mode Time analysis onanalysis flow our flow verification tool (FLOVER), which translates continues recording all flow sets, Batch Batch mode mode on setsflow having on flowatsets least having sets one having coverage at mode atviolation mode having having at(left) least atand one least at modify one least a given flow table into a series Yices assertions, and then modify violatioolation vi- least one least one coverage one modify coverage violation violation (right) detects if these assertions are inconsistent with respect to 8 a network security policy. In our evaluation, we find that 2 non bypass 8 5 4 non bypass 7 2 non bypass 2 non bypass 6 non bypass 5 8 non bypass 4 non bypass 45 4 non bypass FLOVER can detect modify and coverage violations up to 7 6 non bypass 6 non bypass 2 non bypass non bypass 8 non bypass 45 4 non bypass 6 8 non bypass 4 non bypass non bypass 6 non bypass between, between, e.g., 6 8 non bypass 2 e.g., s 2 with s 8 with security 8 security and a and penalty a penalty 13 2 ms s 13 ms in less than 12 ms and 131 ms respectively. 4 5 35 non bypass 5 35 (which (which is typically is typically incurred incurred only on only theon first 3thepacket first packet eachconnection). 4 connection). 3 REFERENCES 4 25 Furthermore, 3 Furthermore, difference the difference in verification in verification times times for finding for finding coverage coverage and 25 and 2 3 modify 2 2 modify violations violations lies onlies anon unoptimized an unoptimized Yices model Yices model finding finding coverage coverage violationstions, which which gives us gives additional us additional opportunity opportunity for performance performance improvement. improvement. //www.openflow.org/documents/openflow-spec-v1.1..pdf. [1] OpenFlow viola- Switch Specification version 1.1.. 211. http: 15 2 15 If a network If a network administrator administrator determines determines that performance that performance carries carries more weight 5 1 1 2 3 4 5 5 more weight 1 number 1 flow s 2 3 4 5 1 1 number flow s than than security security in a network, in a network, she may shechoose may choose to conduct to conduct validation validation certain 2 3 4 5 [2] E. Al-Shaer and S. Al-Haj. Flowchecker: configuration 1 number 1 flow s 2 3 4 5 certain number flow s analysis and verification federated openflow infrastructures. Fig. security 8: security Time in passive in passive batch batch mode mode where where packets packets are forwarded are forwarded without without Fig. Figure analysis 8: Time 7: analysis Performance Batch mode Batch mode verification verification (but she (but can shestill caninvestigate Fig. FLOVER 9: still investigate violations Time Batch analysis mode violations with some Batch on flow withdelay). mode In Proceedings the 3rd ACM workshop on Assurable and on flow some delay). Of course, Of course, this batch on sets flowsets having this batch mode having no sets mode may having no coverage coverage Fig. 9: Time analysis Batch mode cause may cause some no coverage some security having violations security having no concerns, modify (left) and no concerns, modify violation no modify Usable Security Configuration, 21. violation because violation because passes passes flow s violations flow without (right) s without verification verification in realin time. real However, time. However, argue we argue that this thatmode [3] this B. mode Lantz. Mininet. http://yuba.stanford.edu/foswiki/bin/view/ might might provide provide a reasonable a reasonable tradef tradef between between security security concerns concerns and performance and performance OpenFlow/Mininet. in certain first certain networks. is support networks. In this forin mode, batch-mode this mode, we dowe operation, notdo leave notsecurity leave that we security out describe For the out consideration, consideration, but provide For batch but provide more the batch mode optionsmode experiment, more options to a network experiment, we also to a network administrator. we measure also measure the execution the execution time time below. administrator. as increasing The second as increasing θ values is enabling θ values (i.e., the a daemon (i.e., number mode the number flow operation s for [4] M. Canini, D. Venzano, P. Pereŝíni, D. Kostić, and J. Rexford. flow s which which can be can be enforcedyices enforced without to remove without verification) the start-up verification) to understand cost associated to understand the effect with the effect each θ values flow A NICE Way to Test OpenFlow Applications. In Proceedings θ values to the to performance. verification, the NSDI, performance. 7 212. 7 Conclusion Figures Conclusion Figures 1which and11we 1 and11 show leave thefor showverification future work. the verification times times the batch the batch mode mode for for finding finding both coverage both coverage and modify and modify violations violations respectively. respectively. Figures Figures 8 and9[5] 8 and9 show M. Casado, M. J. Freedman, J. Pettit, J. Luo, N. McKeown, show the In this verification B. Batch the Inpaper, this verification paper, we times Mode proposed we times proposed the Test a batch new thea way batch mode newway modeling for verifing modeling for OpenFlow verifing OpenFlow flow tables flow tables withwhen the and S. Shenker. Ethane: Taking Control the Enterprise. In with when the ayices flow a Yices SMT flowset solver SMT is free set solver to is check from free to modify check for from for modify and coverage and property coverage property violations. Proceedings ACM SIGCOMM, 27. FLOVER also implements a delayed verification violations. To procedure, Detecting this coverage which approach this coverage aims approach andismodify tothe reduce first modify the violations attempt first connection-setup violations attempt takes to formally around takes to formally latency. around model 15 ms model the 15 in The complete ms the the inbest the complete [6] theto best thebest our our knowledge, Detecting knowledge, case set best M. Casado, case set T. Garfinkel, M. Freedman, A. Akella, D. Boneh, (i.e., commands verifying (i.e., batch commands verifying mode in 1 flowopenflow in verifies 1s anflow OpenFlow awith s set table. 1with security table. We1 developed security We property) developed property) a prototype anda against prototype 75 andimplementation ms 75 the inms implementation thein worst then. worst McKeowon, and S. Shenker. SANE: A Protection Architecture show intor Enterprise Networks. In Proceedings Usenix case our (i.e., case flow aggregated our verifying (i.e., verification flowverifying verification 5 flow tool 5s (), flow set tool with collected s (), with which security since which translates security the translates last). averification givena Our flow given results Our table flowresults show into table that a series that a round series Yices can through Yices assertions, verify canassertions, the verify hundreds following andhundreds then flow detects three then s flow detects steps: if these with s (1) if assertions tens these with if the tens assertions security number are security inconsistent are inconsistent Security Symposium, 26. inwith a short in respect with a time. short respect to Atime. a network sweet to aa network sweet spot security for spot security practical policy. for practical policy. In deployment ourin deployment evaluation our is evaluation likely in is an likely somewhere in OpenFlow passed sets is larger than a threshold θ, FLOVER an somewhere OpenFlow in in network network environment, environment, can detect can detect modify modify and coverage and coverage violations [7] violations B. Dutetre and L. Moura. The YICES SMT solver. Technical performs verification on all updated (but not verified) up toup 2to s 2 in s lessinthan less124 thanmilliseconds 124 milliseconds and 116 andmilliseconds 116 milliseconds respectively. report, SRI, 26. respectively. Furthermore, sets, (2) FLOVER Furthermore, provides reports provides in-line if (a) in-line and collected batch and batch modes flow modes to support set(s) to support the critical the critical needs needs for violate(s) both for real-time both real-time and delayed and delayed verifications and (3) optionally, verifications OpenFlow FLOVER [8] A. Greenberg, G. Hjalmtysson, D. A. Maltz, A. Myers, OpenFlow networks. networks. For future operates For future work, in a work, wepassive will we continue batch will continue working mode where working on optimizing it passes on optimizing. a created J. Rexford, G. Xie, H. Yan, J. Zhan, and H. Zhang. A Clean. Since Yices Since Slate Yices 4D Approach to Network Control and Management. In is a counter-example set to OF-switches is a counter-example finder, finder, we believe without we believe that verification providing that providing an butaccurate continues an accurate search search spaceacm space Computer Communications Review, 25. can directly recording can directly lead all to flow lead the to improved sets. the improved performance performance in finding in finding counter-examples. counter-examples. For the batch mode experiment, we also measure the [9] S. Kandula, S. Sengupta, A. Greenberg, and P. Patel. The execution time FLOVER with increasing θ values (i.e., nature datacenter traffic: Measurements and analysis. In the number flow s which can be enforced without In Proceedings Usenix/ACM IMC, 29. verification). Figure 6 shows the verification times the [1] A. Khurshid, W. Zhou, M. Caesar, and P. B. Godfrey. VeriFlow: Verifying Network-Wide Invariants in Real Time. In batch mode for finding both coverage and modify violations respectively. Figure 7 illustrates the verification times the Proceedings ACM Sigcomm HotSDN Workshop, 212. batch mode for verifying when a flow set is free from modify and coverage violations. [11] A. Liu. Formal verification firewall policies. In Proceedings ICC, 28. Detecting coverage and modify violations takes around 15 ms in the best case (i.e., verifying 1 flow s with [12] A. Liu and M. Gouda. Diverse firewall design. IEEE 1 security property) and 75 ms in the worst case (i.e., Transactions on Parallel and Distributed Systems, 28. verifying 5 flow s with security ). A sweet spot for practical deployment is likely somewhere in [13] NOX. NOX. http://noxrepo.org/wp/.