arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1902.06570cs.CR
收藏

通过需求驱动加载的二进制安全性

Binary Debloating for Security via Demand Driven Loading

Girish Mururu, Chris Porter, Prithayan Barua, Santosh Pande

摘要:

现代软件系统大量使用基于C/C++的库。由于C/C++的弱内存模型,库可能会遭受漏洞,这些漏洞可能会使应用程序暴露于潜在的攻击。例如,glibc中存在大量的返回导向编程小工具,它们允许将语义有效但恶意的图灵完备程序拼接在一起。尽管在攻击检测和缓解方面取得了重大进展,但针对不断增长的生成此类恶意程序的可能性进行全面防御是不现实的。在这项工作中,我们创建了一个防御机制,通过debloating库,以减少链接的动态功能,使构建恶意程序的可能性显着减少。关键思想是在应用程序中定位每个库调用位置,并且在每种情况下只加载将在该调用位置使用的库函数集。这种需求驱动的加载方法依赖于一个输入感知的oracle,它预测在执行过程中给定调用站点所需的一组近乎精确的库函数。预测的函数被及时加载,并且在从库调用返回到应用程序之后,库中的完整调用链(函数体)被清除。我们提出了一个基于决策树的预测器,它充当一个预言机,和一个优化的运行时系统,它直接与库二进制文件,如GNU libc和libstdc++。我们表明,平均而言,所提出的方案将库的暴露代码表面减少了97.2%,将链接库中存在的ROP小工具减少了97.9%,在大多数情况下实现了至少97%的预测准确度,并增加了18%的小运行时开销所有库(glibc为16%,其他为2%),表明该方案是可行的。

英文摘要:

Modern software systems heavily use C/C++ based libraries. Because of the weak memory model of C/C++, libraries may suffer from vulnerabilities which can expose the applications to potential attacks. For example, a very large number of return oriented programming gadgets exist in glibc that allow stitching together semantically valid but malicious Turing-complete programs. In spite of significant advances in attack detection and mitigation, full defense is unrealistic against an ever-growing set of possibilities for generating such malicious programs. In this work, we create a defense mechanism by debloating libraries to reduce the dynamic functions linked so that the possibilities of constructing malicious programs diminishes significantly. The key idea is to locate each library call site within an application, and in each case to load only the set of library functions that will be used at that call site. This approach of demand-driven loading relies on an input-aware oracle that predicts a near-exact set of library functions needed at a given call site during the execution. The predicted functions are loaded just in time, and the complete call chain (of function bodies) inside the library is purged after returning from the library call back into the application. We present a decision-tree based predictor, which acts as an oracle, and an optimized runtime system, which works directly with library binaries like GNU libc and libstdc++. We show that on average, the proposed scheme cuts the exposed code surface of libraries by 97.2%, reduces ROP gadgets present in linked libraries by 97.9%, achieves a prediction accuracy in most cases of at least 97%, and adds a small runtime overhead of 18% on all libraries (16% for glibc, 2% for others) across all benchmarks of SPEC 2006, suggesting this scheme is practical.

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

↑