作者
Zephyr S Lucas, Joanna Y Liu, Prashant Anantharaman, Sean W Smith
发表日期
2021/5/27
研讨会论文
2021 IEEE Security and Privacy Workshops (SPW)
页码范围
128-133
出版商
IEEE
简介
Since parsers are the line of defense between binaries and untrusted data, they are some of the most common sources of vulnerabilities in software. Language-Theoretic Security provides an approach to implement hardened parsers. We specify the binary format as a formal grammar and implement a recognizer for this formal grammar. However, most binary formats use constructs such as the length field, repeat field, and an offset instruction. Most grammar formats do not support these features. Building on PEGs and calc-regular languages, we propose Calc-Parsing Expression Grammars (Calc-PEGs), a formalization of parsing expression grammars that supports the length field. We design an algorithm to parse Calc-PEGs in time and a parallel algorithm to parse Calc-PEGs in O(n) time. We also present Pegmatite, a tool to generate these parsers in C, with an option to generate VHDL code.
引用总数
学术搜索中的文章
ZS Lucas, JY Liu, P Anantharaman, SW Smith - 2021 IEEE Security and Privacy Workshops (SPW), 2021