Automated Parser Generation for High-Speed NIDS

Slides:



Advertisements
Similar presentations
Inside an XSLT Processor Michael Kay, ICL 19 May 2000.
Advertisements

Code Generation Mooly Sagiv html:// Chapter 4.
Aki Hecht Seminar in Databases (236826) January 2009
UltraPAC : automated protocol parser generator Daniel Burgener Jing Yuan.
The Structure of the GNAT Compiler. A target-independent Ada95 front-end for GCC Ada components C components SyntaxSemExpandgigiGCC AST Annotated AST.
Indexing and Searching
C++ Programming: Program Design Including Data Structures, Fifth Edition Chapter 17: Linked Lists.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
Gary MarsdenSlide 1University of Cape Town Principles of programming language design Gary Marsden Semester 2 – 2001.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
SOFTWARE & LOCALIZATION WEBSITE Simplify and accelerate your.
Query Execution Section 15.1 Shweta Athalye CS257: Database Systems ID: 118 Section 1.
AxKit A member of the Apache XML project Ryan Maslyn Kyle Bechtel.
Introduction to Compiling
Muhammad Idrees, Lecturer University of Lahore 1 Top-Down Parsing Top down parsing can be viewed as an attempt to find a leftmost derivation for an input.
Chapter 1 Introduction Major Data Structures in Compiler
Customizing OVS using P4 Muhammad Shahbaz with Sean Choi, Ben Pfaff, Chaitanya Kodeboyina, Changhoon Kim, Nick McKeown, Nick Feamster, and Jen Rexford.
The Role of Lexical Analyzer
Object storage and object interoperability
Compiler Construction CPCS302 Dr. Manal Abdulaziz.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 18: Linked Lists.
Comp 411 Principles of Programming Languages Lecture 3 Parsing
Announcements/Reading
Chapter 16: Linked Lists.
Compiler Design (40-414) Main Text Book:
PRINCIPLES OF COMPILER DESIGN
Indexing Structures for Files and Physical Database Design
Record Storage, File Organization, and Indexes
IP Routers – internal view
Lecture #12 Parsing Types.
Introduction to Parsing (adapted from CS 164 at Berkeley)
CS 153: Concepts of Compiler Design October 17 Class Meeting
ECE 551: Digital System Design & Synthesis
Database Performance Tuning &
Overview of Compilation The Compiler BACK End
Data Structures Interview / VIVA Questions and Answers
Context-free Languages
Chapter 4 Relational Model Characteristics
Automated Parser Generation for High-Speed NIDS
Bison: Parser Generator
Database Performance Tuning and Query Optimization
4 (c) parsing.
CS416 Compiler Design lec00-outline September 19, 2018
Chapter 15 QUERY EXECUTION.
Introduction CI612 Compiler Design CI612 Compiler Design.
Aspect Browser Plus Ling Neil Patricia.
File Systems and Databases
P4-to-VHDL: Automatic Generation of 100 Gbps Packet Parsers
CMPE 152: Compiler Design September 13 Class Meeting
Lecture 5: Lexical Analysis III: The final bits
Overview of Compilation The Compiler BACK End
Compilers B V Sai Aravind (11CS10008).
Btrfs Filesystem Chris Mason.
CMPE 152: Compiler Design August 23 Class Meeting
Debugging P4 Programs with Vera
Parsing Costas Busch - LSU.
Chapter 7 Writing the Programs Shari L. Pfleeger Joann M. Atlee 4th Edition.
P4FPGA : A Rapid Prototyping Framework for P4
CS416 Compiler Design lec00-outline February 23, 2019
Chapter 11 Database Performance Tuning and Query Optimization
CMPE 152: Compiler Design January 29 Class Meeting
High-Level Programming Language
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
Ben-Gurion University
Database Systems: Design, Implementation, and Management
Implementation of a Functional Programming Language
CMPE 152: Compiler Design September 17 Class Meeting
GOBLAN A Graphical Object Language
Presentation transcript:

Automated Parser Generation for High-Speed NIDS Hongyu Gao Clint Sbisa

Motivation Processing speed is crucial concern for NIDS/NIPS Limited by rate of parsing packets Inefficient parsing leads to slow speeds and bottlenecks

Current Solutions Binpac Declarative language and compiler Designed to simplify task of constructing complex protocol parsers Constructs a full parsing tree

Current Solutions Netshield Integrate high-speed protocol parser to provide fast parsing speed Parsers are manually written, which is tedious work and error-prone

Proposed Solution A protocol parser generator Read the protocol specification Output the parser for the specific protocol The parser is aware of matching The parser focuses on the fields needed by matching and skip unnecessary fields

Automated parser generation? Proposed Solutions Comparison table Automated parser generation? Yes No Fast parsing Our solution Netshield parser Binpac parser

Design Principles The parsing process should avoid recursive calls Parse trees are not used in parsing phase Skip unneeded information After parsing one field, the parser should be able to quickly jump to the next necessary field

Detailed design The parser consists of three parts A pair of buffer pointers A field table ( key data structure) A table pointer

Detailed design on field table Metadata Field type Field length Garbage length Next field Field 1 Field 2 … Field n

Detailed Design on Parser

Implementation Basic approach: Fixed driver Fixed data structure Protocol-specific table content

Related files

How to realize the system Determine the size of field table Start with one root node in protocol parse tree Iteratively substitute complex field with multiple simpler fields Determine the FieldLength function Retrieve the information from Type class Type::attr_length_expr_, Type::attr_oneline_, etc.

How to realize the system Determine the GarbageLength function Before compression, GarbageLength returns “0” for every field Compress the table Look forward for consequent fields Merge the length of unused fields into garbage fields of the field that precedes them

Snapshot for generated code

Snapshot for generated code, cont’d

Snapshot for generated code, cont’d

Demo

Questions? Suggestions?