paperbot · PL 论文追踪

全部论文 待读 收藏

P2 BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching

BinaryAI:基于智能二进制源代码匹配的二进制软件成分分析
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 3/10 · 该论文属于机器学习与程序语言交叉,使用Transformer进行二进制源码匹配以支持软件成分分析,但与用户核心关注的静态分析/Agentic程序分析、LLM改进静态分析/形式化验证、浮点程序分析、贝叶斯程序分析均无直接关联,仅方法层面涉及代码嵌入与匹配。引用 52 inbox
Ling Jiang, Junwen An, Huihui Huang, Qiyi Tang, Sen Nie, Shi Wu, Yuqun Zhang
crossref: 2026-09-12

AI 速览

一句话:提出 BinaryAI,用两阶段二进制源码匹配融合句法与语义特征,提升第三方库检测精度与召回。

第三方库复用会带来漏洞传播风险,二进制到源码的软件成分分析(SCA)因编译后二进制与源码差异显著而困难。现有方法依赖冗余且不鲁棒的语法特征,在大规模第三方库数据集中易产生误报并损害召回。BinaryAI 采用两阶段二进制源码匹配:先用 transformer 模型生成函数级嵌入,为每个二进制函数检索相似源码函数;再利用链接时局部性辅助函数匹配,根据匹配源码函数比例检测复用第三方库。实验表明,其嵌入模型优于 CodeCMR,recall@1 从 10.75% 提升至 22.54%,MRR 从 0.17 提升至 0.34;下游第三方库检测也优于现有工具,相比 Black Duck 将精度从 73.36% 提升至 85.84%,召回从 59.81% 提升至 64.98%。

问题
二进制到源码的 SCA 需在编译差异下识别二进制文件复用的第三方源码项目;现有基于语法特征的方法在大规模 TPL 数据集中易误报且召回不足。
方法
BinaryAI 采用两阶段匹配:用 transformer 生成函数级嵌入并检索相似源码函数,再借助链接时局部性完成函数匹配,按匹配比例检测复用 TPL。
评估
在二进制源码匹配与下游 TPL 检测任务上评估,并与 CodeCMR、Black Duck 等工具比较 recall@1、MRR、精度和召回等指标。
原文摘要(Abstract)

While third-party libraries (TPLs) are extensively reused to enhance productivity during software development, they can also introduce potential security risks such as vulnerability propagation. Software composition analysis (SCA), proposed to identify reused TPLs for reducing such risks, has become an essential procedure within modern DevSecOps. As one of the mainstream SCA techniques, binary-to-source SCA identifies the third-party source projects contained in binary files via binary source code matching, which is a major challenge in reverse engineering since binary and source code exhibit substantial disparities after compilation. The existing binary-to-source SCA techniques leverage basic syntactic features that suffer from redundancy and lack robustness in the large-scale TPL dataset, leading to inevitable false positives and compromised recall. To mitigate these limitations, we introduce BinaryAI, a novel binary-to-source SCA technique with two-phase binary source code matching to capture both syntactic and semantic code features. First, BinaryAI trains a transformer-based model to produce function-level embeddings and obtain similar source functions for each binary function accordingly. Then by applying the link-time locality to facilitate function matching, BinaryAI detects the reused TPLs based on the ratio of matched source functions. Our experimental results demonstrate the superior performance of BinaryAI in terms of binary source code matching and the downstream SCA task. Specifically, our embedding model outperforms the state-of-the-art model CodeCMR, i.e., achieving 22.54% recall@1 and 0.34 MRR compared with 10.75% and 0.17 respectively. Additionally, BinaryAI outperforms all existing binary-to-source SCA tools in TPL detection, increasing the precision from 73.36% to 85.84% and recall from 59.81% to 64.98% compared with the well-recognized commercial SCA product Black Duck.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11414,
  title = {BinaryAI: Binary Software Composition Analysis via Intelligent Binary Source Code Matching},
  author = {Ling Jiang and Junwen An and Huihui Huang and Qiyi Tang and Sen Nie and Shi Wu and Yuqun Zhang},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3597503.3639100}
}