American University
Browse

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

Download (852.77 kB)
journal contribution
posted on 2023-08-04, 11:35 authored by Michael RobinsonMichael Robinson

Whether a file is accepted by a single parser is not a reliable indication of whether a file complies with its stated format and presents minimal risk to the user. 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 paper 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 and safety. Our method is format agnostic, and does not directly rely upon a formal specification of the format. Although this paper 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.

History

Publisher

Institute of Electrical and Electronics Engineers Inc.

Notes

Proceedings - 2021 IEEE Symposium on Security and Privacy Workshops, SPW 2021, Pages 184 - 193, May 2021, Article number 94742872021, IEEE Symposium on Security and Privacy Workshops, SPW 2021, Virtual, Online, 27 May 2021 - null, 170813.

Handle

http://hdl.handle.net/1961/auislandora:95361

Usage metrics

    Mathematics & Statistics

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC