SBridge: 通过跨域控制块匹配识别源到二进制函数相似性
SBridge: Identifying Source-to-Binary Function Similarity via Cross-Domain Control Block Matching
AI总结:
提出SBridge方法,通过将函数分割为控制块(如条件、循环)作为跨域表示,实现源与二进制代码的精确函数相似性匹配,克服内联和剥离二进制挑战,在真实数据上召回率显著优于现有方法。
摘要:
我们提出SBridge,一种精确识别二进制中与给定源代码函数相似的函数的方法。识别二进制中复用的代码对安全至关重要,特别是检测传播的漏洞。尽管二进制到二进制比较可行,但以源代码为参考更实用,因为源代码更易直接收集和分析而无需编译。然而,源与二进制表示之间的显著差距,包括函数内联,给跨域函数检测带来挑战。现有方法主要依赖字符串字面量或整个函数的结构相似性,未能捕捉详细代码行为并产生大量误报。SBridge通过关键创新解决这些限制:基于控制块的函数匹配,通过将函数分割为有意义的单元(如条件和循环)封装基本功能特征。利用控制块作为跨域表示,SBridge能够精确测量源与二进制代码之间的函数相似性,有效克服函数内联和剥离二进制带来的挑战。为评估,我们从BinKit收集了3,904个真实C/C++二进制文件。在识别与输入源函数相同的二进制函数的实验中,尽管约40%的二进制函数被内联,SBridge实现了75.13%的recall@1和80.98%的recall@5,优于现有方法(最高43.31% recall@1和50.2% recall@5)。
英文摘要:
We present SBridge, a precise approach for identifying functions in binaries that are similar to the given source code functions. Identifying reused code in binaries is critical for security, particularly for detecting propagated vulnerabilities. Although binary-to-binary comparison is feasible, leveraging source code as the reference is more practical because source code is easier to collect and analyze directly without compilation. However, significant gaps between source and binary representations, including function inlining, create challenges in cross-domain function detection. Existing approaches primarily rely on string literals or structural similarities between entire functions, failing to capture detailed code behavior and generating many false alarms. SBridge addresses these limitations through a key innovation: control block-based function matching, which encapsulates essential functional features by segmenting functions into meaningful units such as conditionals and loops. Leveraging control blocks as a cross-domain representation, SBridge enables precise measurement of function similarity between source and binary code, effectively overcoming challenges posed by function inlining and stripped binaries. For evaluation, we collected 3,904 real-world C/C++ binaries from BinKit. In experiments identifying binary functions identical to input source functions, despite approximately 40% of binary functions being inlined, SBridge achieved 75.13% recall@1 and 80.98% recall@5, outperforming existing approaches, which achieved up to 43.31% recall@1 and 50.2% recall@
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。