Looking for non-compliant documents using error messages from multiple parsers

12/15/2020
by   Michael Robinson, et al.
0

Whether a file is accepted by a single parser is not a reliable indication of whether a file complies with its stated format. Bugs within both the parser and the format specification mean that a compliant file may fail to parse, or that a non-compliant file might be read without any apparent trouble. The latter situation presents a significant security risk, and should be avoided. This article suggests that a better way to assess format specification compliance is to examine the set of error messages produced by a set of parsers rather than a single parser. If both a sample of compliant files and a sample of non-compliant files are available, then we show how a statistical test based on a pseudo-likelihood ratio can be very effective at determining a file's compliance. Our method is format agnostic, and does not directly rely upon a formal specification of the format. Although this article focuses upon the case of the PDF format (ISO 32000-2), we make no attempt to use any specific details of the format. Furthermore, we show how principal components analysis can be useful for a format specification designer to assess the quality and structure of these samples of files and parsers. While these tests are absolutely rudimentary, it appears that their use to measure file format variability and to identify non-compliant files is both novel and surprisingly effective.

READ FULL TEXT
research
05/17/2016

The polymake XML file format

We describe an XML file format for storing data from computations in alg...
research
09/23/2021

FormatFuzzer: Effective Fuzzing of Binary File Formats

Effective fuzzing of programs that process structured binary inputs, suc...
research
12/24/2018

Neural Fuzzing: A Neural Approach to Generate Test Data for File Format Fuzzing

This article is aimed at the design and implementation of a file format ...
research
01/20/2022

Statistical detection of format dialects using the weighted Dowker complex

This paper provides an experimentally validated, probabilistic model of ...
research
11/27/2018

Wrangling Messy CSV Files by Detecting Row and Type Patterns

It is well known that data scientists spend the majority of their time o...
research
02/09/2023

Unsupervised clustering of file dialects according to monotonic decompositions of mixtures

This paper proposes an unsupervised classification method that partition...
research
04/19/2021

Inferring Drop-in Binary Parsers from Program Executions

We present BIEBER (Byte-IdEntical Binary parsER), the first system to mo...

Please sign up or login with your details

Forgot password? Click here to reset