Firewall Policy Queries Author: Alex X. Liu, Mohamed G. Gouda Publisher: IEEE Transaction on Parallel and Distributed Systems 2009 Presenter: Chen-Yu Chang.

Slides:



Advertisements
Similar presentations
NP-Hard Nattee Niparnan.
Advertisements

2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
1 Diverse Firewall Design Alex X. Liu The University of Texas at Austin, U.S.A. July 1, 2004 Co-author: Mohamed G. Gouda.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
First Step Towards Automatic Correction of Firewall Policy Faults Fei Chen Alex X. Liu Computer Science and Engineering Michigan State University JeeHyun.
1 TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs Department of Computer Science and Information Engineering National.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 52 Database Systems I Relational Algebra.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Firewall Queries Alex X. Liu, Mohamed G. Gouda, The University of Texas at Austin, U.S.A. Huibo Heidi Ma, Anne HH. Ngu Texas State University, U.S.A. December.
Privacy-Preserving Cross-Domain Network Reachability Quantification
Efficient Multidimensional Packet Classification with Fast Updates Author: Yeim-Kuan Chang Publisher: IEEE TRANSACTIONS ON COMPUTERS, VOL. 58, NO. 4, APRIL.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Normal forms for Context-Free Grammars
Copyright © Cengage Learning. All rights reserved.
university “STRUCTURED FIREWALL” By. Mr. Ganesh N Pathare Mr. Shivram A Popalghat Department Of.
Detection and Resolution of Anomalies in Firewall Policy Rules
1 Efficient packet classification using TCAMs Authors: Derek Pao, Yiu Keung Li and Peng Zhou Publisher: Computer Networks 2006 Present: Chen-Yu Lin Date:
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
Cross-Domain Privacy-Preserving Cooperative Firewall Optimization.
Common Devices Used In Computer Networks
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Navigational Plans For Data Integration Marc Friedman Alon Levy Todd Millistein Presented By Avinash Ponnala Avinash Ponnala.
An Algebra for Composing Access Control Policies (2002) Author: PIERO BONATTI, SABRINA DE CAPITANI DI, PIERANGELA SAMARATI Presenter: Siqing Du Date:
Author: Graham Hughes, Tevfik Bultan Computer Science Department, University of California, Santa Barbara, CA 93106, USA Source: International Journal.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Multi-Field Range Encoding for Packet Classification in TCAM Author: Yeim-Kuan Chang, Chun-I Lee and Cheng-Chien Su Publisher: INFOCOM 2011 Presenter:
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
1 Kyung Hee University Chapter 18 Domain Name System.
Great Theoretical Ideas in Computer Science.
Firewall Design: Consistency, Completeness, and Compactness Authors: Mohamed G. Gouda and Xing- Yang Alex Liu Presenters: Jonathan Fomby and Matthew Ginley.
1 Relational Algebra and Calculas Chapter 4, Part A.
Formal Specification of Intrusion Signatures and Detection Rules By Jean-Philippe Pouzol and Mireille Ducassé 15 th IEEE Computer Security Foundations.
1 Fast packet classification for two-dimensional conflict-free filters Department of Computer Science and Information Engineering National Cheng Kung University,
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
High-Speed Policy-Based Packet Forwarding Using Efficient Multi-dimensional Range Matching Lakshman and Stiliadis ACM SIGCOMM 98.
Cross-Product Packet Classification in GNIFS based on Non-overlapping Areas and Equivalence Class Author: Mohua Zhang, Ge Li Publisher: AISS 2012 Presenter:
1 An Arc-Path Model for OSPF Weight Setting Problem Dr.Jeffery Kennington Anusha Madhavan.
Department of Computer Sciences The University of Texas at Austin Complete Redundancy Detection in Firewalls Alex X. Liu Department of Computer Sciences.
NP-Completeness  For convenience, the theory of NP - Completeness is designed for decision problems (i.e. whose solution is either yes or no).  Abstractly,
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Finding Regular Simple Paths Sept. 2013Yangjun Chen ACS Finding Regular Simple Paths in Graph Databases Basic definitions Regular paths Regular simple.
Packet Classification Using Dynamically Generated Decision Trees
Packet Classification Using Multi- Iteration RFC Author: Chun-Hui Tsai, Hung-Mao Chu, Pi-Chung Wang Publisher: 2013 IEEE 37th Annual Computer Software.
Author : Tzi-Cker Chiueh, Prashant Pradhan Publisher : High-Performance Computer Architecture, Presenter : Jo-Ning Yu Date : 2010/11/03.
Lecture 9: Query Complexity Tuesday, January 30, 2001.
Algebra 2 Properties of Real Numbers Lesson 1-2 Goals Goal To graph and order real numbers. To Identity properties of real numbers. Rubric Level 1 –
Chapter 1 INTRODUCTION TO THE THEORY OF COMPUTATION.
Chapters 11 and 12 Decision Problems and Undecidability.
Firewall Modules and Modular Firewalls
Computability and Complexity
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Lectures on Network Flows
Functions Defined on General Sets
Relational Algebra Chapter 4, Part A
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Segment Trees Basic data structure in computational geometry.
Paper Presentation by Bradley Hanna CSCE 715: Network System Security
Relational Algebra Chapter 4, Sections 4.1 – 4.2
Copyright © Cengage Learning. All rights reserved.
Lecture 10: Query Complexity
Packet Classification Using Binary Content Addressable Memory
Presentation transcript:

Firewall Policy Queries Author: Alex X. Liu, Mohamed G. Gouda Publisher: IEEE Transaction on Parallel and Distributed Systems 2009 Presenter: Chen-Yu Chang Date: 2009/5/13

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Introduction(1/3) Firewalls are crucial elements in network security, The function of a firewall is to examine each incoming and outgoing packet and decide whether to accept or to discard the packet based on its policy. An error in a firewall policy means that some illegitimate packets are identified as being legitimate, or some legitimate packets are identified as being illegitimate.

Introduction(2/3) A policy error either creates security holes or disrupts normal business processes. An effective way to detect design errors of the firewalls is to issue some firewall queries and checking whether the answers to the queries are consistent with the firewall specification.

Introduction(3/3) To make firewall queries practically useful, two problems need to be solved: how to describe a firewall query and how to process a firewall query. In this paper, we present solutions to both problems.  First, we introduce a simple and effective SQL-like query language, called the Structured Firewall Query Language (SFQL), for describing firewall queries.  Second, we present a theorem, called the Firewall Query Theorem, as the foundation for developing two firewall query processing algorithms : rule-base and FDD firewall query processing algorithms.

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Formal Definitions(1/4) In a relational database, each field of a tuple has a fixed value, but each field of a rule in a firewall is a range, not a fixed value. A field F i is a variable whose domain, denoted D(F i ), is a finite interval of nonnegative integers. A packet over the d fields F 1,..., F d is a d-tuple (p 1,..., p d ), where each p i (i = 1~d) is an element in D(F i ). We use Σ to denote the set of all packets over fields F1,..., Fd, so that |Σ| = |D(F 1 )| x... x |D(F d )|

Formal Definitions(2/4) A firewall rule has the form → Ex : A packet (p 1,..., p d ) matches a predicate F 1 ∈ S 1 ∧... ∧ F d ∈ S d and the corresponding rule, if and only if the condition p 1 ∈ S 1 ∧... ∧ p d ∈ S d holds. For any i, if S i = D(F i ), we often use the keyword all to denote S i. F1F1 F2F2 S1S1 S2S2 α ∈∈ →

Formal Definitions(3/4) A firewall f over the d fields F 1,..., F d is a sequence of firewall rules. The size of f, denoted |f|, is the number of rules in f. To ensure that a firewall is complete, the predicate of the last rule in a firewall is usually specified as F 1 ∈ D(F 1 ) ∧... ∧ F d ∈ D(F d ), which every packet matches. Conflict To resolve such conflicts, firewalls typically employ a first- match resolution strategy. The decision that firewall f makes for packet p is denoted f(p).

Formal Definitions(4/4) We can think of a firewall f as defining a many-to-one mapping function from Σ to α. Two firewalls f 1 and f 2 are equivalent, denoted f1 ≡ f2, if and only if they define the same mapping function from Σ to α, that is, for any packet p ∈ Σ, we have f 1 (p) = f 2 (p).

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Query Language(1/2) A query, denoted Q, in our Structured Firewall Query Language (SFQL) is of the following format: The result of query Q, denoted Q.result, is the following set:

Query Language(2/2) Ex: The result of this query is {4, 5, 6, 7}.The result of this query is {3, 8}. Which computers whose addresses are in the set [4, 8] can send packets to the computer whose address is 6? Which computers cannot send packets to the computer whose address is 6?

Firewall query example In these examples, we assume each packet has the following five fields: I (Interface), S (Source IP), D (Destination IP), N (Destination Port), and P (Protocol Type).

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Theory Foundation(1/4) A firewall is consistent if and only if no two rules in the firewall conflict. In this section, we discuss how to process a firewall query for consistent firewalls. inconsistent consistent

Theory Foundation(2/4) Our interest in consistent firewalls is twofold :  First, each inconsistent firewall can be converted to an equivalent consistent firewall.  Second, as shown in the following theorem, it is easier to process queries for consistent firewalls than for inconsistent ones. inconsistent consistent

Theory Foundation(3/4) Theorem 1. (Firewall Query Teorem)  Let Q be a query of the following form:  Also let f be a consistent firewall that consists of n rules r 1,...,r n, where each rule r j is of the form (F 1 ∈ S 1 ’) ∧... ∧ (F d ∈ S d ’) →. Then :  Where each Q.r j is defined using r j as follows :

Theory Foundation(4/4) Ex : Q.r 1 = {4, 5, 6, 7} Q.r 2 = ∅ Q.r 3 = ∅ Q.r 4 = ∅ Q.r 5 = ∅ Q.r 6 = ∅ Q.result => {4, 5, 6, 7} S1S1 S2S2 S1’S1’S2’S2’

Rule-Based Firewall Query Processing

FDD-Based Firewall Query Processing Algorithm(1/7) Multiple rules in a consistent firewall may share the same prefix. For instance, whose “where clause” contains the conjunct S ∈ {3}, over the firewall in Fig. 3, then the algorithm will repeat three times the calculation of {3} ∩ [ 4, 7].

FDD-Based Firewall Query Processing Algorithm(2/7) Clearly, if we reduce the number of these repeated calculations, the efficiency of the firewall query processing algorithm can be greatly improved. Now we present a more efficient firewall query processing algorithm that has no repeated calculations and can be applied to both consistent and inconsistent firewalls.

FDD-Based Firewall Query Processing Algorithm(3/7) The basic idea of this query processing algorithm is as follows:  First, we convert the firewall (whether consistent or inconsistent) that we want to query to an equivalent firewall decision diagram.  Second, run the FDD-based firewall query processing algorithm. (The resulting firewall decision diagram is a consistent and compact representation of the original firewall)

FDD-Based Firewall Query Processing Algorithm(4/7) Definition 1. (FDD).  A Firewall Decision Diagram (FDD) has the following five properties: The root of f : The node has no incoming edges. The terminal nodes : The nodes have no outgoing edges. Each node v has a label, denoted F(v) : Each edge e in f has a label, denoted I(e), I(e) is a nonempty subset of D(F(v)). A directed path in f from the root to a terminal node is called a decision path of f. No two nodes on a decision path have the same label. The set of all outgoing edges of a node v in f, denoted E(v), satisfies the following two conditions:

FDD-Based Firewall Query Processing Algorithm(5/7) full-length ordered FDD For any packet p, there is one and only one rule in S f that p matches because of the consistency and completeness properties. The order of the rules in such a firewall is immaterial because the rules in S f are nonoverlapping.

FDD-Based Firewall Query Processing Algorithm(6/7) Given a sequence of rules, we can construct an equivalent FDD using the FDD construction algorithm in [32]. S D a [4, 7] [6, 8] APPEND (v, r2 ) v D d [3, 3] [8, 8] [2, 9] v d [2, 5] [9, 9]

FDD-Based Firewall Query Processing Algorithm(7/7)

Efficient FDD Reduction Using Hashing(1/2) A full-length ordered FDD is reduced if and only if no two nodes are isomorphic and no two nodes have more than one edge between them.  Isomorphic ; Two nodes v and v’ 1) both v and v’ are terminal nodes with identical labels. 2) both v and v’ are nonterminal nodes and their corresponding outgoing edges have identical labels and they both point to the same node.

Efficient FDD Reduction Using Hashing(2/2) We use a more efficient FDD reduction algorithm that processes the nodes level by level from the terminal nodes to the root node. Where h is a one-way and collision resistant hash function such as MD5 [39] and SHA-1 [13].

Complexity Analysis of Firewall Query Processing Algorithm(1/2) Complexity of Rule-Based Firewall Query Processing Algorithm :  Given a firewall with n rules where each rule examines d packet fields, its equivalent consistent firewall will have O(n d ) rules.  So that, the Rule-Based Firewall Query Processing Algorithm’s complexity is O(n d+1 ).

Complexity Analysis of Firewall Query Processing Algorithm(2/2) Complexity of FDD-Based Firewall Query Processing Algorithm :  Every nonterminal node in a reduced FDD cannot have more than 2n-1 outgoing edges, finding the right outgoing edge to traverse takes O(log n ) time using binary search.  Let k be the total number of paths that a query overlaps on an FDD, the processing time for the query is O(kdlog n ). Note that k is typically small.

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Firewall Query Post Processing(1/3) In fact, the “select” clause in a query can be extended to have more than one field. However, when the “select” clause in a query has more than one field, the query result may contain many disjoint multidimensional predicates.

Firewall Query Post Processing(2/2) To make the query result easier for firewall administrators to read, we next present an algorithm to minimize the number of predicates. FDD reduction algorithm A partial FDD

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Firewall Query Algebra Union : Intersect :

Firewall Query Algebra Minus : To compute A 1 -A 2 :  First, construct a partial FDD from A2.  Second, we append S ∈ [ 6, 9] ∧ D ∈ [ 4, 7] to this partial FDD.

Outline Introduction Formal Definitions Structured Firewall Query Language Firewall Query Processing Firewall Query Post Processing Firewall Query Algebra Experiment Results

Experiment Results(1/2)

Experiment Results(2/2)