VulMatch: Binary-level Vulnerability Detection Through Signature
Zian Liu, Lei Pan, Chao Chen, Ejaz Ahmed, Shigang Liu, Jun Zhang, Dongxi Liu
TL;DR
Vulnerability signatures in binary code are often confounded by code reuse and patch-focused methods that miss true vulnerability existence. VulMatch proposes a four-step pipeline that leverages source-to-binary mapping and context-aware binary signatures to detect vulnerability existence with higher precision and interpretability. It introduces add, delete, and change vulnerability signatures and corresponding patch signatures, built from source-level diffs and mapped to binary blocks with contextual control-flow information. Empirical results across seven open-source projects and real-world firmware show VulMatch outperforming Asm2vec and Palmtree in top-1 vulnerability detection and providing explanations that aid human analysts, indicating practical value for automated and manual vulnerability assessment.
Abstract
Similar vulnerability repeats in real-world software products because of code reuse, especially in wildly reused third-party code and libraries. Detecting repeating vulnerabilities like 1-day and N-day vulnerabilities is an important cyber security task. Unfortunately, the state-of-the-art methods suffer from poor performance because they detect patch existence instead of vulnerability existence and infer the vulnerability signature directly from binary code. In this paper, we propose VulMatch to extract precise vulnerability-related binary instructions to generate the vulnerability-related signature. VulMatch detects vulnerability existence based on binary signatures. Unlike previous approaches, VulMatch accurately locates vulnerability-related instructions by utilizing source and binary codes. Our experiments were conducted using over 1000 vulnerable instances across seven open-source projects. VulMatch significantly outperformed the baseline tools Asm2vec and Palmtree. Besides the performance advantages over the baseline tools, VulMatch offers a better feature by providing explainable reasons during vulnerability detection. Our empirical studies demonstrate that VulMatch detects fine-grained vulnerability that the state-of-the-art tools struggle with. Our experiment on commercial firmware demonstrates VulMatch is able to find vulnerabilities in real-world scenario.
