论文标题
二进制代码中非初始化堆栈变量的静态检测
Static Detection of Uninitialized Stack Variables in Binary Code
论文作者
论文摘要
在第一次堆栈粉碎攻击攻击之后,使用堆栈异常的记忆腐败脆弱性仍然很普遍,并且在实践中起着重要作用。在此类漏洞中,由于其不愉快的不可预测性能,非初始化的变量起着出色的作用:由于编译器是针对快速,昂贵的易位性解释分析程序量身定制的,因此实际上未使用用于检测此类脆弱性。结果,二进制代码中未发现的复杂关系揭示了非直接的内存读取。最新的漏洞报告显示了如何在实践中使用非初始化的内存读取的多功能性,尤其是用于内存披露和代码执行。近年来的研究提出了针对源代码量身定制的检测和预防技术。但是,迄今为止,二进制可执行文件中这些类型的软件错误并没有太多关注。 在本文中,我们提出了一个静态分析框架,以在二进制可执行文件中找到非初始化的变量。我们开发了将二进制文件提升为知识表示的方法,该表示为特定制作的算法建立了基础,以检测非传统读取。我们的原型实现能够检测复杂的二进制文件(例如Web浏览器和OS内核)中的非初始化内存错误,我们检测到了7个新颖的错误。
More than two decades after the first stack smashing attacks, memory corruption vulnerabilities utilizing stack anomalies are still prevalent and play an important role in practice. Among such vulnerabilities, uninitialized variables play an exceptional role due to their unpleasant property of unpredictability: as compilers are tailored to operate fast, costly interprocedural analysis procedures are not used in practice to detect such vulnerabilities. As a result, complex relationships that expose uninitialized memory reads remain undiscovered in binary code. Recent vulnerability reports show the versatility on how uninitialized memory reads are utilized in practice, especially for memory disclosure and code execution. Research in recent years proposed detection and prevention techniques tailored to source code. To date, however, there has not been much attention for these types of software bugs within binary executables. In this paper, we present a static analysis framework to find uninitialized variables in binary executables. We developed methods to lift the binaries into a knowledge representation which builds the base for specifically crafted algorithms to detect uninitialized reads. Our prototype implementation is capable of detecting uninitialized memory errors in complex binaries such as web browsers and OS kernels, and we detected 7 novel bugs.