VulEXplaineR: XAI for Vulnerability Detection on Assembly Code

Abstract

Software vulnerabilities have posed significant threats to on-premise as well as cloud servers and applications. So far, numerous studies have focused on identifying and addressing software vulnerabilities at the binary level. Traditional approaches often involve highly complicated static and dynamic analysis techniques. Current intelligent methods are not explainable to reverse engineers, making them incapable of validating the detected vulnerabilities. In this paper, we propose VulEXplaineR, an XAI method for vulnerability detection based on assembly code. It employs BERT for block embedding, augmented with TFIDF of blocks and operand types information, to provide an effective vulnerability detection/explanation framework. VulEXplaineR takes a trained GCNN and its predictions and returns an explanation in the form of a small subgraph of the input graph. It is based on PGExplainer, a perturbation-based global explanation model for GNNs. We augment edge distribution with the edge feature in the form of intra-function jumps between blocks or inter-function calls between functions. The experimental results on the NDSS2018 and Juliet Test datasets demonstrate that VulEXplaineR outperforms the current state-of-the-art baselines in vulnerability detection. Unlike other baseline models, VulEXplaineR provides a high level of explainability as a complementary aid to a reverse engineer, for a more accurate function analysis. We measure fidelity to demonstrate how much two predictions from the extracted subgraph and the original graph match. Furthermore, we conduct a case study to show that VulEXplaineR not only identifies functions and basic blocks that cause the vulnerability, but also highlights interdependencies between those functions and blocks.

Cite

Text

Mahdavifar et al. "VulEXplaineR: XAI for Vulnerability Detection on Assembly Code." European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2024. doi:10.1007/978-3-031-70378-2_1

Markdown

[Mahdavifar et al. "VulEXplaineR: XAI for Vulnerability Detection on Assembly Code." European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2024.](https://mlanthology.org/ecmlpkdd/2024/mahdavifar2024ecmlpkdd-vulexplainer/) doi:10.1007/978-3-031-70378-2_1

BibTeX

@inproceedings{mahdavifar2024ecmlpkdd-vulexplainer,
  title     = {{VulEXplaineR: XAI for Vulnerability Detection on Assembly Code}},
  author    = {Mahdavifar, Samaneh and Saqib, Mohd and Fung, Benjamin C. M. and Charland, Philippe and Walenstein, Andrew},
  booktitle = {European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases},
  year      = {2024},
  pages     = {3-20},
  doi       = {10.1007/978-3-031-70378-2_1},
  url       = {https://mlanthology.org/ecmlpkdd/2024/mahdavifar2024ecmlpkdd-vulexplainer/}
}