Program debloating aims to enhance the performance and reduce the attack surface of bloated applications. Several techniques have been recently proposed to specialize programs. These approaches are either based on unsound strategies or demanding techniques, leading to unsafe results or a high overhead debloating process. In this paper, we address these limitations by applying partial-evaluation principles to generate specialized applications. Our approach relies on a simple observation that an application typically consists of configuration logic, followed by the main logic of the program. The configuration logic specifies what functionality in the main logic should be executed. LMCAS performs partial interpretation to capture a precise program state of the configuration logic based on the supplied inputs. LMCAS then applies partial-evaluation optimizations to generate a specialized program by propagating the constants in the captured partial state, eliminating unwanted code, and preserving the desired functionalities. Our evaluation of LMCAS on commonly used benchmarks and real-world applications shows that it successfully removes unwanted features while preserving the functionality and robustness of the deblated programs, runs faster than prior tools, and reduces the attack surface of specialized programs. LMCAS runs 1500x, 4.6x, and 1.2x faster than the state-of-the-art debloating tools CHISEL, RAZOR, and OCCAM, respectively; achieves 25% reduction in the binary size; reduces the attack surface of code-reuse attacks by removing 51.7% of the total gadgets and eliminating 83% of known CVE vulnerabilities
翻译:程序拆卸的目的是提高性能并减少变色应用程序的进攻表面, 并减少变压性应用的进攻面, 最近提议了几种技术, 以专门化程序。 这些方法有的基于不健全的战略或要求技术, 导致不安全的结果或高高高的降压过程。 在本文中, 我们通过应用部分评价原则来消除这些限制, 以产生专门应用。 我们的方法依赖于简单观察, 即应用程序通常由配置逻辑组成, 并遵循程序的主要逻辑逻辑。 配置逻辑逻辑逻辑指定了主要逻辑中应当执行的功能。 LMCAS 进行部分解释, 以获取基于所提供投入的配置逻辑的精确程序状态。 这些方法要么基于不健全的战略或要求技术, 导致不安全的结果或高高的降调过程。 本文中, 我们通过应用部分评估来应对这些限制。 我们对通用基准和实际应用应用的LMCASCAS的评估表明, 成功地消除了不想要的特性,同时保存了降压程序功能和稳健健性, 运行比以前的工具更快, 并减少了专门程序的攻击面面。 LMCASCAS运行了1500x、 4.x、 4.x、 4.x、 和1.2MSARCxx、 削减工具的25xx