arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.08427cs.CRcs.SE
收藏

用于比较替代构建产物的二进制等价层级

Levels of Binary Equivalence for the Comparison of Binaries from Alternative Builds

Jens Dietrich, Tim White, Behnaz Hassanshahi, Paddy Krishnan

AI总结:

本文针对同一源码由不同平台独立构建产生的二进制比较问题,提出二进制等价层级概念,并通过实验证明其能弥补逐位相等方法的不足,有效识别实际等价的构建产物。

摘要:

为应对软件供应链安全方面的挑战,若干组织已建立基础设施,以独立构建商品级开源项目并发布生成的二进制产物。构建平台的可变性能够增强安全性,因为它有助于检测被攻陷的构建环境。此外,通过改善构建平台的安全态势并在构建过程中收集溯源信息,生成的制品可以被赋予更高的信任度。此类服务现已由 Google、Oracle 和 RedHat 提供。由相同源代码构建出的多个二进制的可用性带来了新的挑战与机遇,并引发如下问题:“构建 A 能否确认构建 B 的完整性?”或“构建 A 能否揭示被攻陷的构建 B?”。要回答这些问题,需要一种二进制之间的等价概念。我们证明,基于逐位相等的直观方法在实践中存在显著缺陷,而采用替代性的等价概念具有价值。我们受克隆检测类型的启发,通过引入等价层级来对这一思想进行概念化。我们通过若干实验展示了这些新层级的价值。我们构建了一个数据集,其中包含由不同提供商从相同源代码独立构建的 Java 二进制,共计形成 14,156 对二进制。随后,我们比较这些 jar 文件中的已编译 class 文件,发现对于 3,750 对 jar(26.49%),至少存在一个此类文件不同,这也迫使 jar 文件及其密码学哈希值不同。然而,基于新的等价层级,我们仍然可以确定其中许多在实际意义上是等价的。我们在一个半合成数据集上评估了若干候选等价关系,该数据集提供了由应当等价或必须不等价的二进制对组成的判定基准。

英文摘要:

In response to challenges in software supply chain security, several organisations have created infrastructures to independently build commodity open source projects and release the resulting binaries. Build platform variability can strengthen security as it facilitates the detection of compromised build environments. Furthermore, by improving the security posture of the build platform and collecting provenance information during the build, the resulting artifacts can be used with greater trust. Such offerings are now available from Google, Oracle and RedHat. The availability of multiple binaries built from the same sources creates new challenges and opportunities, and raises questions such as: 'Does build A confirm the integrity of build B?' or 'Can build A reveal a compromised build B?'. To answer such questions requires a notion of equivalence between binaries. We demonstrate that the obvious approach based on bitwise equality has significant shortcomings in practice, and that there is value in opting for alternative notions. We conceptualise this by introducing levels of equivalence, inspired by clone detection types. We demonstrate the value of these new levels through several experiments. We construct a dataset consisting of Java binaries built from the same sources independently by different providers, resulting in 14,156 pairs of binaries in total. We then compare the compiled class files in those jar files and find that for 3,750 pairs of jars (26.49%) there is at least one such file that is different, also forcing the jar files and their cryptographic hashes to be different. However, based on the new equivalence levels, we can still establish that many of them are practically equivalent. We evaluate several candidate equivalence relations on a semi-synthetic dataset that provides oracles consisting of pairs of binaries that either should be, or must not be equivalent.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑