论文标题

Evilcoder:自动错误插入

EvilCoder: Automated Bug Insertion

论文作者

Pewny, Jannik, Holz, Thorsten

论文摘要

查找软件漏洞的艺术在文献中已被广泛介绍,并且在这个主题上有大量的工作。相比之下,有意插入可剥削的,关键性的虫子几乎没有受到(公众)的关注。想要更多的错误似乎是适得其反的,但是对发现错误的技术的全面评估遭受了缺乏地面真相和漏洞的稀缺性。 在本文中,我们提出了EvilCoder,这是一个自动找到潜在脆弱的源代码位置并修改源代码实际脆弱的系统。更具体地说,我们利用自动化程序分析技术来查找与典型的错误模式相匹配的敏感水槽(例如,具有前面的理智检查的敏感API函数),并尝试找到与用户控制源的数据流连接。然后,我们将转换源代码,使其成为可能的利用,例如,通过删除或修改输入消毒或其他类型的安全检查。我们的工具旨在随机选择脆弱的位置和可能的修改,以便它可以在同一软件语料库上产生许多不同的漏洞。我们在几个开源项目中评估了我们的工具,例如Libpng和VSFTPD,在该项目中,我们发现每个项目的22至158个唯一的连接源源对。这转化为我们可以插入的数百个潜在脆弱的数据流路径和数百个错误。我们希望通过提供新鲜生成的,缠绕的测试语料库来支持未来的错误调查技术,以便(最终)以全面且统计上有意义的方式对此类技术进行评估和比较。

The art of finding software vulnerabilities has been covered extensively in the literature and there is a huge body of work on this topic. In contrast, the intentional insertion of exploitable, security-critical bugs has received little (public) attention yet. Wanting more bugs seems to be counterproductive at first sight, but the comprehensive evaluation of bug-finding techniques suffers from a lack of ground truth and the scarcity of bugs. In this paper, we propose EvilCoder, a system to automatically find potentially vulnerable source code locations and modify the source code to be actually vulnerable. More specifically, we leverage automated program analysis techniques to find sensitive sinks which match typical bug patterns (e.g., a sensitive API function with a preceding sanity check), and try to find data-flow connections to user-controlled sources. We then transform the source code such that exploitation becomes possible, for example by removing or modifying input sanitization or other types of security checks. Our tool is designed to randomly pick vulnerable locations and possible modifications, such that it can generate numerous different vulnerabilities on the same software corpus. We evaluated our tool on several open-source projects such as for example libpng and vsftpd, where we found between 22 and 158 unique connected source-sink pairs per project. This translates to hundreds of potentially vulnerable data-flow paths and hundreds of bugs we can insert. We hope to support future bug-finding techniques by supplying freshly generated, bug-ridden test corpora so that such techniques can (finally) be evaluated and compared in a comprehensive and statistically meaningful way.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源