arXiv:2506.05430cs.CRcs.AI2025-06

用解释器精准定位代码漏洞,实现高效针对性攻击

Explainer-guided Targeted Adversarial Attacks against Binary Code Similarity Detection Models

  • 借助黑盒解释器定位影响模型决策的关键代码片段
  • 在多数场景下攻击成功率更高,且速度与迁移性更强
  • 适用于评估漏洞检测模型安全性的研究者与安全工程师

二进制代码相似性检测(BCSD)是漏洞检测与分类等软件工程任务的基础。针对此类模型的对抗攻击受到广泛关注,旨在误导模型产生错误预测。现有方法多依赖启发式规则或迭代贪心算法定位影响模型输出的关键代码,缺乏坚实的理论基础,且在处理复杂程序时效率低下。本文提出一种新型优化方法,针对目标攻击场景——即限制模型预测结果在特定范围内——利用黑盒、模型无关解释器的强大能力,精准识别关键代码片段,并施加语义保持的扰动。实验表明,相比现有最优攻击,本方法在几乎所有场景下均取得更高攻击成功率,同时提升效率与迁移性。真实案例研究进一步验证了其在漏洞检测中的安全影响,凸显现有BCSD模型亟需增强鲁棒性。

原文摘要 · Abstract (English)

Binary code similarity detection (BCSD) serves as a fundamental technique for various software engineering tasks, e.g., vulnerability detection and classification. Attacks against such models have therefore drawn extensive attention, aiming at misleading the models to generate erroneous predictions. Prior works have explored various approaches to generating semantic-preserving variants, i.e., adversarial samples, to evaluate the robustness of the models against adversarial attacks. However, they have mainly relied on heuristic criteria or iterative greedy algorithms to locate salient code influencing the model output, failing to operate on a solid theoretical basis. Moreover, when processing programs with high complexities, such attacks tend to be time-consuming. In this work, we propose a novel optimization for adversarial attacks against BCSD models. In particular, we aim to improve the attacks in a challenging scenario, where the attack goal is to limit the model predictions to a specific range, i.e., the targeted attacks. Our attack leverages the superior capability of black-box, model-agnostic explainers in interpreting the model decision boundaries, thereby pinpointing the critical code snippet to apply semantic-preserving perturbations. The evaluation results demonstrate that compared with the state-of-the-art attacks, the proposed attacks achieve higher attack success rate in almost all scenarios, while also improving the efficiency and transferability. Our real-world case studies on vulnerability detection and classification further demonstrate the security implications of our attacks, highlighting the urgent need to further enhance the robustness of existing BCSD models.

对抗攻击代码分析安全检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。