EMNLP 2024finding0 citations

Enhancing Learning-Based Binary Code Similarity Detection Model through Adversarial Training with Multiple Function Variants

Lichen Jia, Chenggang Wu, Bowen Tang, Peihua Zhang, Zihan Jiang, Yang Yang, Ning Liu, Jingfeng Zhang

Abstract

Compared to identifying binary versions of the same function under different compilation options, existing Learning-Based Binary Code Similarity Detection (LB-BCSD) methods exhibit lower accuracy in recognizing functions with the same functionality but different implementations. To address this issue, we introduces an adversarial attack method called FuncFooler, which focuses on perturbing critical code to generate multiple variants of the same function. These variants are then used to retrain the model to enhance its robustness. Current adversarial attacks against LB-BCSD mainly draw inspiration from the FGSM (Fast Gradient Sign Method) method in the image domain, which involves generating adversarial bytes and appending them to the end of the executable file. However, this approach has a significant drawback: the appended bytes do not affect the actual code of the executable file, thus failing to create diverse code variants. To overcome this limitation, we proposes a gradient-guided adversarial attack method based on critical code—FuncFooler. This method designs a series of strategies to perturb the code while preserving the program’s semantics. Specifically, we first utilizes gradient information to locate critical nodes in the control flow graph. Then, fine-grained perturbations are applied to these nodes, including control flow, data flow, and internal node perturbations, to obtain adversarial samples. The experimental results show that the application of the FuncFooler method can increase the accuracy of the latest LB-BCSD model by 5%-7%.

BibTeX
@inproceedings{jia-etal-2024-enhancing,
    title = "Enhancing Learning-Based Binary Code Similarity Detection Model through Adversarial Training with Multiple Function Variants",
    author = "Jia, Lichen  and
      Wu, Chenggang  and
      Tang, Bowen  and
      Zhang, Peihua  and
      Jiang, Zihan  and
      Yang, Yang  and
      Liu, Ning  and
      Zhang, Jingfeng  and
      Wang, Zhe",
    editor = "Al-Onaizan, Yaser  and
      Bansal, Mohit  and
      Chen, Yun-Nung",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
    month = nov,
    year = "2024",
    address = "Miami, Florida, USA",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-emnlp.673/",
    doi = "10.18653/v1/2024.findings-emnlp.673",
    pages = "11508--11518"
}
Enhancing Learning-Based Binary Code Similarity Detection Model through Adversarial Training with Multiple Function Variants · EMNLP 2024