一句话:提出二进制提升器 Plankton 与两个新算法,从带调试信息的二进制生成高质量 LLVM IR,使静态分析无需编译介入。
静态分析广泛用于大规模软件缺陷检测,但通常需要编译介入才能获得可分析代码,实用性受限。二进制提升器可直接转换二进制、不侵入构建系统,然而现有工具即便有调试信息也难以产出足够精确的代码以支撑严格的静态分析。本文提出二进制提升器 Plankton,以及两个新算法,用于弥合底层与高层代码之间的差距,从带调试信息的二进制生成高质量 LLVM IR,从而在仅有轻微精度损失的情况下支持完整的静态分析。评估表明,Plankton 的分析结果与传统编译介入方案相当,差异仅 17.2%,同时更具实用性,平均优于现有二进制提升器 76.9%。
Static analysis has been widely used in large-scale software defect detection. Despite recent advances, it is still not practical enough because it requires compilation interference to obtain analyzable code. Directly translating the binary code using a binary lifter mitigates this practicality problem by being non-intrusive to the building system. However, existing binary lifters cannot produce precise enough code for rigorous static analysis even in the presence of the debug information. In this paper, we propose a new binary lifter Plankton together with two new algorithms that can fill the gaps between the low- and high-level code to produce high-quality LLVM intermediate representations (IRs) from binaries with debug information, enabling full-fledged static analysis with minor precision loss. Plankton shows comparable static analysis results with traditional compilation interference solutions, producing only 17.2% differences while being much more practical, outperforming existing lifters by 76.9% on average.