EFACT:一款用于强化静态二进制提升的外部函数自动补全工具
EFACT: an External Function Auto-Completion Tool to Strengthen Static Binary Lifting
AI总结:
针对现有静态二进制提升工具外部函数补全能力不足的问题,提出轻量级插件EFACT,优化名称修饰外部函数原型恢复,跨ISA二进制翻译准确率显著提升。
摘要:
静态二进制提升是二进制重写框架中的核心环节。现有工具忽略了外部函数补全(EXFC)在静态二进制提升中的作用。EXFC仅利用可用的函数符号,恢复外部函数(EXF,即定义在标准共享库中的函数)的原型。错误的EXFC会导致对源二进制文件的误解析,或在静态二进制翻译中引发内存溢出,最终造成程序崩溃。值得注意的是,现有工具难以恢复源自C++编译二进制文件的名称修饰(mangled)EXF的原型,且需要耗时的人工处理才能支持新的库。\n本文提出了EFACT——一款面向静态二进制提升的外部函数自动补全工具。我们的EXF恢复算法能更好地恢复名称修饰EXF的原型,特别针对C++中的模板特化机制进行了优化。EFACT被设计为轻量级插件,用于增强其他静态二进制重写框架的EXFC能力。评估结果显示,在SPEC CPU 2017基准测试上,EFACT在名称修饰EXF恢复方面的表现优于RetDec和McSema,提升幅度分别为96.4%和97.3%。\n此外,我们深入研究了静态二进制翻译,解决了若干跨指令集架构(ISA)的EXFC问题。在EEMBC基准测试中,当EFACT与McSema集成后,相比单独使用McSema,x86-64到x86-64的正确翻译基准测试数量增加36.7%,x86-64到AArch64的正确翻译数量增加93.6%。
英文摘要:
Static binary lifting is essential in binary rewriting frameworks. Existing tools overlook the impact of External Function Completion (EXFC) in static binary lifting. EXFC recovers the prototypes of External Functions (EXFs, functions defined in standard shared libraries) using only the function symbols available. Incorrect EXFC can misinterpret the source binary, or cause memory overflows in static binary translation, which eventually results in program crashes. Notably, existing tools struggle to recover the prototypes of mangled EXFs originating from binaries compiled from C++. Moreover, they require time-consuming manual processing to support new libraries. This paper presents EFACT, an External Function Auto-Completion Tool for static binary lifting. Our EXF recovery algorithm better recovers the prototypes of mangled EXFs, particularly addressing the template specialization mechanism in C++. EFACT is designed as a lightweight plugin to strengthen other static binary rewriting frameworks in EXFC. Our evaluation shows that EFACT outperforms RetDec and McSema in mangled EXF recovery by 96.4% and 97.3% on SPEC CPU 2017. Furthermore, we delve deeper into static binary translation and address several cross-ISA EXFC problems. When integrated with McSema, EFACT correctly translates 36.7% more benchmarks from x86-64 to x86-64 and 93.6% more from x86-64 to AArch64 than McSema alone on EEMBC.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。