Title: Regular Expression Matching for Reconfigurable Packet Inspection
1Regular Expression Matching for Reconfigurable
Packet Inspection
Netherlands
- João Bispo
- Ioannis Sourdis
- João Cardoso
- Stamatis Vassiliadis
Portugal
2Introduction
- Motivation
- Snort
- Implementation
- Experimental Results
- Conclusions
- Future Work
3Motivation
- Heavily used in some applications (focus on
Intrusion Detection Systems) - High Parallelism
Goal synthesis of all regular expressions of a
NIDS rule-set onto an FPGA, achieving
an area-efficient and high-throughput solution
4SNORT Introduction
- NIDS - Network Intrusion Detection System
- Snort Sniffer Rules
- Static Patterns and Regular Expressions
5SNORT Regular Expressions
- PCRE Format (Perl Compatible Regular Expressions)
- Example
/GET\s\x2f\n900/smi
6SNORT Regular Expressions
7Implementation Regular Expressions Synthesis
- Automatic generation of hardware from PCRE
Regular Expressions - Automatic testing of generated design
8Implementation Basics
- Based on Sidhu and Prasanna work
- One-Hot Encoding
- Substring matching
- Basic Operations
- , , a, ab, ()
b900 -gt bb bbbbbbbbbbbb bbbbbbbbbb
b -gt bb
((ab))(cd)
9Implementation Global View
Regular Expressions
8-bit ASCII Decoder
a
Input String
b
256
9
Character Classes
10Implementation Global View
Regular Expressions
8-bit ASCII Decoder
a
Input String
b
C2\s
256
COPYs432,
9
\s
s
Character Classes
C2
COPY
11Implementation - Global View
Regular Expressions
8-bit ASCII Decoder
a
Input String
b
C2\s
256
COPYs432,
9
\s
s
Character Classes
C2
COPY
12Implementation Global View
Regular Expressions
8-bit ASCII Decoder
a
Input String
b
C2\s
256
COPYs432,
9
\s
s
Character Classes
C2
COPY
13Implementation Global View
Regular Expressions
8-bit ASCII Decoder
a
Input String
b
C
256
9
\s
s
Character Classes
OPY
14Implementation Blocks
15Implementation Exactly Block N
- Compact storage of states
16Implementation AtLeast Block N,
- No need to store all states
17Experimental Results SNORT Characteristics
18Experimental Results FPGA Utilization
19Experimental Results Comparison
- PEM Throughtput Chars / Area
20Conclusions
- Implemented a complete set of SNORT regular
expressions (500) - Almost automatic generation of hardware from
standard PCRE regular expressions - Good use of Xilinx primitives avaliable on Virtex
FPGAs
21Future Work
- Virtualization of Hardware
- Sharing Strategies
- Multiple Characters per cycle
- Constraint Repetitions of whole regular
expressions
22Regular Expression Matching for Reconfigurable
Packet Inspection
Thank You!
Netherlands
- João Bispo
- Ioannis Sourdis
- João Cardoso
- Stamatis Vassiliadis
Portugal
23Implementation Between Block N, M
- Mix between two previous blocks