Evaluation Snort Rules Default Snort rules – 305 unique rules (after removing string matching components) 10 days of packet data from MIT Lincoln Labs 1999 intrusion detection evaluation data set Evaluation Snort Rules Default Snort rules – 305 unique rules (after removing string matching components) 10 days of packet data from MIT Lincoln Labs 1999 intrusion detection evaluation data set ` Fast Packet Classification using Condition Factorization Automaton Size Snort-NG: nodes for 300 rules Condition Factorization: 1026 nodes for 300 rules Matching Time Firewall Rules Rules from firewall on a small network in department 42K to 500K packet traces Automaton Size Matching Time Per packet matching time of 69ns Automaton Size Snort-NG: nodes for 300 rules Condition Factorization: 1026 nodes for 300 rules Matching Time Firewall Rules Rules from firewall on a small network in department 42K to 500K packet traces Automaton Size Matching Time Per packet matching time of 69ns Alok Tongaonkar and R. Sekar Secure Systems Lab, Department of Computer Science, Stony Brook University Alok Tongaonkar and R. Sekar Secure Systems Lab, Department of Computer Science, Stony Brook University This research is supported by an ONR grant N and an NSF grant CCR This research is supported by an ONR grant N and an NSF grant CCR B. Deterministic automaton A. Backtracking automaton sample rules r1: a != 22 && b == 1 r2: a != 80 && b == 2 r3: a != 25 && b == 3 r4: c == 600 r5: c == 400 sample rules r1: a != 22 && b == 1 r2: a != 80 && b == 2 r3: a != 25 && b == 3 r4: c == 600 r5: c == 400 iptable rules –o eth3 –p tcp –d $NS –dport domain –j ACCEPT –o eth3 –p udp –d $NS –dport domain –j ACCEPT -o eth3 -i !eth3 –p icmp –j ACCEPT -o eth3 –j REJECT … iptable rules –o eth3 –p tcp –d $NS –dport domain –j ACCEPT –o eth3 –p udp –d $NS –dport domain –j ACCEPT -o eth3 -i !eth3 –p icmp –j ACCEPT -o eth3 –j REJECT … snort rules alert tcp $EXT any -> $HOME 600 (flags: A; …) alert icmp /24 any -> $HOME any (itype:0; …) alert icmp /32 any -> $HOME any ( icmp_id: 666; …) alert tcp $HOME any -> $EXT 6000 (win: 200; …); … snort rules alert tcp $EXT any -> $HOME 600 (flags: A; …) alert icmp /24 any -> $HOME any (itype:0; …) alert icmp /32 any -> $HOME any ( icmp_id: 666; …) alert tcp $HOME any -> $EXT 6000 (win: 200; …); … Packet classification automaton A.Backtracking automaton - reexamines packet fields e.g.. BSD Packet Filter, BPF+, Dynamic Packet Filter (DPF), PathFinder B.Deterministic automaton - exponential size e.g. Snort-NextGeneration (Snort-NG) C.Our technique (using condition factorization) – polynomial size near optimal matching time Packet classification automaton A.Backtracking automaton - reexamines packet fields e.g.. BSD Packet Filter, BPF+, Dynamic Packet Filter (DPF), PathFinder B.Deterministic automaton - exponential size e.g. Snort-NextGeneration (Snort-NG) C.Our technique (using condition factorization) – polynomial size near optimal matching time C. Condition Factorization – Reorder tests, decompose complex tests, and eliminate semantically redundant tests 1. Select optimal ordering of tests to minimize size 2. Generate DAG to reduce number of states 3. Introduce non-deterministic edges