arXiv:2602.12681cs.CRcs.LG2026-02中稿 · The ACM Internatio…被引 3

测试深度学习模型在代码语义不变变换下的鲁棒性,发现微小修改可让模型误判。

Fool Me If You Can: On the Robustness of Binary Code Similarity Detection Models against Semantics-preserving Transformations

  • 设计asmFooler系统,用8种语义保持变换生成9565个二进制变体
  • 模型对指令级扰动敏感,少量修改即可引发误判,最大干扰仅需1.2%指令变更
  • 适合安全研究者与模型开发者,警示现有二进制相似性检测的脆弱性

二进制代码分析在网络安全中至关重要,用于无源码情况下逆向工程程序行为。传统静态与动态分析虽有效,但依赖大量人工经验。近年来深度学习为捕捉二进制潜在特征和揭示代码语义提供了新路径。然而,基于机器学习的二进制分析模型对二进制层面的对抗性代码变换的鲁棒性仍缺乏研究。本文评估了八种语义保持变换下六种代表性二进制代码相似性检测(BCSD)模型的鲁棒性。提出asmFooler系统,从620个基线样本生成9,565个二进制变体。主要发现:(i)模型鲁棒性取决于处理流程,包括预处理、架构与特征选择;(ii)对抗变换效果受模型特定约束(如输入大小、指令表达能力)限制;(iii)精心设计的变换只需极小扰动即具高度有效性;(iv)通过聚焦语义关键指令,可高效误导模型产生误报或漏报。

原文摘要 · Abstract (English)

Binary code analysis plays an essential role in cybersecurity, facilitating reverse engineering to reveal the inner workings of programs in the absence of source code. Traditional approaches, such as static and dynamic analysis, extract valuable insights from stripped binaries, but often demand substantial expertise and manual effort. Recent advances in deep learning have opened promising opportunities to enhance binary analysis by capturing latent features and disclosing underlying code semantics. Despite the growing number of binary analysis models based on machine learning, their robustness to adversarial code transformations at the binary level remains underexplored. We evaluate the robustness of deep learning models for the task of binary code similarity detection (BCSD) under semantics-preserving transformations. The unique nature of machine instructions presents distinct challenges compared to the typical input perturbations found in other domains. We introduce asmFooler, a system that evaluates the resilience of BCSD models using a diverse set of adversarial code transformations that preserve functional semantics. We construct a dataset of 9,565 binary variants from 620 baseline samples by applying eight semantics-preserving transformations across six representative BCSD models. Our major findings highlight several key insights: i) model robustness relies on the processing pipeline, including code pre-processing, architecture, and feature selection; ii) adversarial transformation effectiveness is bounded by a budget shaped by model-specific constraints like input size and instruction expressive capacity; iii) well-crafted transformations can be highly effective with minimal perturbations; and iv) such transformations efficiently disrupt model decisions (e.g., misleading to false positives or false negatives) by focusing on semantically significant instructions.

二进制分析对抗攻击模型鲁棒性

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