20% more formulas. Verified Firewall Ruleset Verification. Now with. with Isabelle/HOL. Cornelius Diekmann

Similar documents
Semantics-Preserving Simplification of Real-World Firewall Rule Sets

Semantics-Preserving Simplification of Real-World Firewall Rule Sets

Main functions of Linux Netfilter

+ iptables. packet filtering && firewall

Deterministic Discrete Modeling

Certifying Spoofing-Protection of Firewalls

Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT

Network Security. Chapter 3. Cornelius Diekmann. Version: October 21, Lehrstuhl für Netzarchitekturen und Netzdienste Institut für Informatik

Linux Networking: IP Packet Filter Firewalling

Firewall implementation and testing

Linux: 20 Iptables Examples For New SysAdmins

Firewalls. Chien-Chung Shen

How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)

Firewalls (IPTABLES)

Linux Firewall Wizardry. By Nemus

Firewalls with IPTables. Jason Healy, Director of Networks and Systems

Install and configure a Debian based UniFi controller

Network Security Management

CS Computer and Network Security: Firewalls

CIT 480: Securing Computer Systems. Firewalls

1:1 NAT in ZeroShell. Requirements. Overview. Network Setup

Firewall. IPTables and its use in a realistic scenario. José Bateira ei10133 Pedro Cunha ei05064 Pedro Grilo ei09137 FEUP MIEIC SSIN

CSCI Firewalls and Packet Filtering

Firewalls. Firewall types. Packet filter. Proxy server. linux, iptables-based Windows XP s built-in router device built-ins single TCP conversation

CS Computer and Network Security: Firewalls

CIT 480: Securing Computer Systems. Firewalls

Linux Routers and Community Networks

Assignment 3 Firewalls

How to Secure RHEL 6.2 Part 2

Worksheet 9. Linux as a router, packet filtering, traffic shaping

CSC574 - Computer and Network Security Module: Firewalls

Protecting and controlling Virtual LANs by Linux router-firewall

Manuale Turtle Firewall

IP Address: the per-network unique identifier used to find you on a network

Secure use of iptables and connection tracking helpers

Quick Note 53. Ethernet to W-WAN failover with logical Ethernet interface.

Chapter 7. Firewalls

Firewalls. Pehr Söderman KTH-CSC

Focus on Security. Keeping the bad guys out

Lab Objectives & Turn In

Firewalls. October 23, 2015

Project 2: Firewall Design (Phase I)

IPv6.marceln.org.

Managing Latency in IPS Networks

CSE/ISE 311: Systems Administra5on Network Firewalls

IP Filter/Firewall Setup

OpenBSD in the wild...a personal journey

Intro to Linux Kernel Firewall

ΕΠΛ 674: Εργαστήριο 5 Firewalls

Building a Home Gateway/Firewall with Linux (aka Firewalling and NAT with iptables )

8. Firewall Design & Implementation

Linux firewall. Need of firewall Single connection between network Allows restricted traffic between networks Denies un authorized users

Load Balancing SIP Quick Reference Guide v1.3.1

A Stateful Inspection of FireWall-1

Optimisacion del ancho de banda (Introduccion al Firewall de Linux)

Innominate mguard Version 6

Sicurezza nelle reti

About this talk: Keywords. Network Security Policy Stateful Firewalls Isabelle/HOL

Packet Filtering Firewall

Firewall Testing. Cameron Kerr Telecommunications Programme University of Otago. May 16, 2005

A Tool for Automated iptables Firewall Analysis

Firewalls 1 / 43. Firewalls

ΕΠΛ 475: Εργαστήριο 9 Firewalls Τοίχοι πυρασφάλειας. University of Cyprus Department of Computer Science

Host Discovery with nmap

Linux Administrator (Advance)

Module: Firewalls. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

How to Turn a Unix Computer into a Router and Firewall Using IPTables

Introduction TELE 301. Routers. Firewalls

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

Firewall Tutorial. KAIST Dept. of EECS NC Lab.

CSE543 - Computer and Network Security Module: Firewalls

CIS 433/533 - Computer and Network Security Firewalls

What is Firewall Builder

How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu (Amd66) On Ubuntu 4.5 On A Windows Box

Demonstrating topos: Theorem-Prover-Based Synthesis of Secure Network Configurations

Firewall Examples. Using a firewall to control traffic in networks

Adding an Extended Access List

ipchains and iptables for Firewalling and Routing

Packet filtering with Linux

From Network Security To Content Filtering

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Firewalls. configuring a sophisticated GNU/Linux firewall involves understanding

Vuurmuur - iptables manager

Configure a Microsoft Windows Workstation Internal IP Stateful Firewall

FIREWALL AND NAT Lecture 7a

Internet Security Firewalls

IPv6 Network Security.

Formal firewall conformance testing: an application of test and proof techniques

Internet Firewall CSIS Internet Firewall. Spring 2012 CSIS net13 1. Firewalls. Stateless Packet Filtering

Network Security. Routing and Firewalls. Radboud University Nijmegen, The Netherlands. Autumn 2014

Definition of firewall

Perdix: A Query Language for Security Logs

Netfilter. GNU/Linux Kernel version 2.4+ Setting up firewall to allow NIS and NFS traffic. January 2008

CELLTRACKS ANALYZER II. Networking Guide J40169EN

The methodology. Interne. 1 Introduction

Netfilter / IPtables

Unified Language for Network Security Policy Implementation

iptables: The Linux Firewall Administration Program

Formal Firewall Conformance Testing: An Application of Test and Proof Techniques

Configuring Personal Firewalls and Understanding IDS. Securing Networks Chapter 3 Part 2 of 4 CA M S Mehta, FCA

Transcription:

Verified Firewall Ruleset Verification with Isabelle/HOL Cornelius Diekmann Now with 20% more formulas 1

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Introduction to Firewalls Chain INPUT (policy CCEPT) target prot source destination DOS_PROTECT all 0.0.0.0/0 0.0.0.0/0 CCEPT all 0.0.0.0/0 0.0.0.0/0 state RELTED,ESTBLISHED DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 DROP tcp 0.0.0.0/0 0.0.0.0/0 multiport dports 21,873,5005,5006,80,548,... DROP udp 0.0.0.0/0 0.0.0.0/0 multiport dports 123,111,2049,892,5353 CCEPT all 192.168.0.0/16 0.0.0.0/0 DROP all 0.0.0.0/0 0.0.0.0/0 Chain DOS_PROTECT (1 references) target prot source destination RETURN icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 limit: avg 1/sec burst 5 DROP icmp 0.0.0.0/0 0.0.0.0/0 icmptype 8 RETURN tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 DROP tcp 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 2

Problem there are no good high-complexity rule sets. Wool, Quantitative Study of Firewall Configuration Errors, Computer, IEEE, vol. 37, no. 6, pp. 62 67, Jun. 2004. 3

Problem there are no good high-complexity rule sets firewalls are (still) poorly configured. Wool, Quantitative Study of Firewall Configuration Errors, Computer, IEEE, vol. 37, no. 6, pp. 62 67, Jun. 2004.. Wool, Trends in Firewall Configuration Errors: Measuring the Holes in Swiss Cheese, Internet Computing, IEEE, vol. 14, no. 4, pp. 58 65, Jul. 2010. 3

Problem there are no good high-complexity rule sets firewalls are (still) poorly configured tools do not understand real-world firewall rules. Wool, Quantitative Study of Firewall Configuration Errors, Computer, IEEE, vol. 37, no. 6, pp. 62 67, Jun. 2004.. Wool, Trends in Firewall Configuration Errors: Measuring the Holes in Swiss Cheese, Internet Computing, IEEE, vol. 14, no. 4, pp. 58 65, Jul. 2010. C. Diekmann, L. Hupel, and G. Carle, Semantics-Preserving Simplification of Real-World Firewall Rule Sets, in Formal Methods (FM). Springer, pp. 195 212. Jun. 2015 3

Tool for Ruleset Verification Specification Documentation Implementation Code, tool Performance 4

Tool for Ruleset Verification Specification Documentation What is a correct ruleset? Implementation Code, tool Performance 4

Tool for Ruleset Verification Specification Documentation What is a correct ruleset? Goal: Spoofing protection Implementation Code, tool Performance 4

Tool for Ruleset Verification Specification Documentation What is a correct ruleset? Goal: Spoofing protection Needs: Model of iptables Implementation Code, tool Performance 4

Tool for Ruleset Verification Specification Documentation α Implementation Code, tool What is a correct ruleset? Performance Goal: Spoofing protection Needs: Model of iptables http://isabelle.in.tum.de/ 4

Tool for Ruleset Verification Specification Documentation What is a correct ruleset? Goal: Spoofing protection Needs: Model of iptables Proof α Implementation Code, tool Performance http://isabelle.in.tum.de/ 4

Tool for Ruleset Verification Specification Documentation What is a correct ruleset? Goal: Spoofing protection Needs: Model of iptables Proof α Implementation Code, tool Performance http://isabelle.in.tum.de/ 4

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? Polymorphic: arbitrary type a datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? Polymorphic: arbitrary type a datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? Polymorphic: arbitrary type a datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? Polymorphic: arbitrary type a datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr Recursive datatype 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? Polymorphic: arbitrary type a datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr Recursive datatype 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr Example: Matchnd (Match ( DstIP 8.8.8.8 )) (Match ( Protocol TCP )) 5

Match Expressions: Syntax and Semantics Syntax How to represent match expressions? datatype a mexpr = Match a Matchny MatchNot a mexpr Matchnd a mexpr a mexpr Example: Primitive Matchnd (Match ( DstIP 8.8.8.8 )) (Match ( Protocol TCP )) 5

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Match Expressions: Syntax and Semantics Semantics What do match expressions mean? matches :: ( a p B ) a mexpr p B matches γ (Match a) p γ a p matches Matchny True matches γ (MatchNot m) p matches γ m p matches γ (Matchnd m 1 m 2 ) p matches γ m 1 p matches γ m 2 p 6

Iptables Semantics: Filtering Behavior SKIP γ, p [], t t CCEPT matches γ m p γ, p [(m, ccept)],?! DROP matches γ m p γ, p [(m, Drop)],? % REJECT matches γ m p γ, p [(m, Reject)],? % NOMTCH matches γ m p γ, p DECISION [(m, a)],?? t? γ, p rs, t t SEQ γ, p rs 1,? t γ, p rs2, t t γ, p LOG rs 1 ::: rs 2,? t matches γ m p γ, p [(m, Log)],?? EMPTY matches γ m p γ, p [(m, Empty)],?? CLLRESULT matches γ m p γ, p Γ c,? t γ, p [(m, Call c)],? t CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? γ, p [(m, Call c)],?? Background ruleset Γ : chain name rule list 7

Iptables Semantics: Filtering Behavior SKIP γ, p [], t t CCEPT matches γ m p γ, p [(m, ccept)],?! DROP matches γ m p γ, p [(m, Drop)],? % REJECT matches γ m p γ, p [(m, Reject)],? % NOMTCH matches γ m p γ, p DECISION [(m, a)],?? t? γ, p rs, t t SEQ γ, p rs 1,? t γ, p rs2, t t γ, p LOG rs 1 ::: rs 2,? t matches γ m p γ, p [(m, Log)],?? EMPTY matches γ m p γ, p [(m, Empty)],?? CLLRESULT matches γ m p γ, p Γ c,? t γ, p [(m, Call c)],? t CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? γ, p [(m, Call c)],?? Background ruleset Γ : chain name rule list 7

Semantics Explained γ, p rs, s t 8

Semantics Explained Packet γ, p rs, s t 8

Semantics Explained Primitive matcher Packet γ, p rs, s t 8

Semantics Explained Primitive matcher Packet γ, p rs, s t ruleset 8

Semantics Explained Primitive matcher Packet γ, p rs, s t ruleset start state (e.g.,? ) 8

Semantics Explained Primitive matcher Packet γ, p rs, s t ruleset start state (e.g.,? ) final state (e.g.,!, % ) 8

Semantics Explained: SKIP γ, p [], t t 9

Semantics Explained: SKIP Precondition γ, p [], t t 9

Semantics Explained: SKIP Precondition Conclusion γ, p [], t t 9

Semantics Explained: SKIP Precondition Conclusion γ, p [], t t no precondition Holds unconditionally 9

Semantics Explained: SKIP Precondition Conclusion γ, p [], t t no precondition Holds unconditionally IF TRUE then γ, p [], t t 9

Semantics Explained: SKIP γ, p [], t t 9

Semantics Explained: SKIP γ, p [], t t Empty Ruleset 9

Semantics Explained: SKIP γ, p [], t t Empty Ruleset Start state equals final state 9

Semantics Explained: SKIP γ, p [], t t Empty Ruleset Start state equals final state For the empty ruleset, the firewall does nothing 9

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! 10

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! Ruleset: single rule 10

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! Ruleset: single rule matches 10

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! Ruleset: single rule matches The action of the rule is ccept rule 10

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! Ruleset: single rule matches The action of the rule is ccept rule The firewall does not have a decision yet 10

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! Ruleset: single rule matches The action of the rule is ccept rule The firewall does not have a decision yet It will accept the packet 10

Semantics Explained: CCEPT matches γ m p γ, p [(m, ccept)],?! Ruleset: single rule matches The action of the rule is ccept rule The firewall does not have a decision yet It will accept the packet matching ccept rule accepts packets 10

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? γ, p [(m, Call c)],?? 11

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? matches γ, p [(m, Call c)],?? 11

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? matches γ, p [(m, Call c)],?? The called chain c in the background ruleset Γ is defined as rs 1 ::: (m, Return) :: rs 2 11

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? matches γ, p [(m, Call c)],?? The called chain c in the background ruleset Γ is defined as rs 1 ::: (m, Return) :: rs 2 First part rs 1 is processed without result 11

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? matches γ, p [(m, Call c)],?? The called chain c in the background ruleset Γ is defined as rs 1 ::: (m, Return) :: rs 2 First part rs 1 is processed without result Then there is a matching Return 11

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? matches γ, p [(m, Call c)],?? The called chain c in the background ruleset Γ is defined as rs 1 ::: (m, Return) :: rs 2 First part rs 1 is processed without result Then there is a matching Return Calling to user-defined chain and return without result 11

Semantics Explained: CLLRETURN matches γ m p Γ c = rs 1 ::: (m, Return) :: rs 2 matches γ m p γ, p rs 1,?? matches γ, p [(m, Call c)],?? The called chain c in the background ruleset Γ is defined as rs 1 ::: (m, Return) :: rs 2 First part rs 1 is processed without result Then there is a matching Return Calling to user-defined chain and return without result 11

Semantics-Preserving Simplification γ, p rs, s t iff γ, p f rs, s t 12

Semantics-Preserving Simplification γ, p rs, s t iff γ, p f rs, s t f :: a ruleset a ruleset 12

Semantics-Preserving Simplification γ, p rs, s t iff γ, p f rs, s t f :: a ruleset a ruleset f does not change filtering behavior of firewall 12

Semantics-Preserving Simplification γ, p rs, s t iff γ, p f rs, s t f :: a ruleset a ruleset f does not change filtering behavior of firewall Removing Log rules 12

Semantics-Preserving Simplification γ, p rs, s t iff γ, p f rs, s t f :: a ruleset a ruleset f does not change filtering behavior of firewall Removing Log rules Unfolding of user-defined chains 12

Semantics-Preserving Simplification γ, p rs, s t iff γ, p f rs, s t f :: a ruleset a ruleset f does not change filtering behavior of firewall Removing Log rules Unfolding of user-defined chains Normalizing match expressions,... 12

Embedding in Ternary Logic B = {True, False} Ternary = {True, False, Unknown} { } p approx firewall γ stricter rs =! { p γ, p rs,?! } { } p approx firewall γ permissive rs =! 13

Embedding in Ternary Logic B = {True, False} Ternary = {True, False, Unknown} { } p approx firewall γ stricter rs =! { p γ, p rs,?! } { } p approx firewall γ permissive rs =! Set of packets accepted by the firewall 13

Embedding in Ternary Logic B = {True, False} Ternary = {True, False, Unknown} { } p approx firewall γ stricter rs =! { p γ, p rs,?! } { } p approx firewall γ permissive rs =! Set of packets accepted by the firewall 13

Embedding in Ternary Logic B = {True, False} Ternary = {True, False, Unknown} { } p approx firewall γ stricter rs =! { p γ, p rs,?! } { } p approx firewall γ permissive rs =! Set of packets accepted by the firewall 13

Embedding in Ternary Logic B = {True, False} Ternary = {True, False, Unknown} { } p approx firewall γ stricter rs =! { p γ, p rs,?! } { } p approx firewall γ permissive rs =! not executable Set of packets accepted by the firewall We can specify a lot... 13

Embedding in Ternary Logic B = {True, False} Ternary = {True, False, Unknown} { } p approx firewall γ stricter rs =! { p γ, p rs,?! } { } p approx firewall γ permissive rs =! executable not executable Set of packets accepted by the firewall We can specify a lot... but we also believe in running code executable 13

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: { p.src ip p.in iface = eth0 γ, p rs,?! } 192.168.0.0/24 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: { p.src ip p.in iface = eth0 γ, p rs,?! } 192.168.0.0/24 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: { p.src ip p.in iface = eth0 γ, p rs,?! } 192.168.0.0/24 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: { p.src ip p.in iface = eth0 γ, p rs,?! } 192.168.0.0/24 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: { p.src ip p.in iface = eth0 γ, p rs,?! } 192.168.0.0/24 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: { p.src ip p.in iface = eth0 γ, p rs,?! } 192.168.0.0/24 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: eth ipassmt.keys { p.src ip p.in iface = eth γ, p rs,?! } ipassmt.get(eth) 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: check spoofing protection ipassmt rs eth ipassmt.keys { p.src ip p.in iface = eth γ, p rs,?! } ipassmt.get(eth) 14

Spoofing Protection ipassmt :: interface IP set Example: ipassmt = [eth0 192.168.0.0/24] Spoofing Protection: check spoofing protection ipassmt rs eth ipassmt.keys { p.src ip p.in iface = eth γ, p rs,?! } ipassmt.get(eth) 14

15

Service Matrix INET INET multicast servers ip 1 S routers Partitions complete IPv4 space ll IP addresses in each group have same access rights internal localhost ip 2 Cannot be compressed any further 16

Sources Firewall Rulesets plz contribute https://github.com/diekmann/net-network Isabelle Theories + Haskell Tool: https://github.com/diekmann/iptables_semantics 17