论文标题
自动化Linux应用程序的SecComp滤波器生成
Automating Seccomp Filter Generation for Linux Applications
论文作者
论文摘要
应用程序中的软件漏洞破坏了应用程序的安全性。通过阻止未使用的功能,可以降低潜在漏洞的影响。尽管SecComp提供了用于过滤SYSCALLS的解决方案,但它需要为每个单独的应用程序手动实施过滤器规则。最近的工作调查了用于检测和安装必要过滤规则的自动化方法。但是,正如我们所表明的那样,这些方法是不需要或需要过于耗时的分析的假设。 在本文中,我们提出了Chestnut,这是一种为Linux用户空间应用程序生成严格的SYSCALL过滤器的自动化方法,其要求和限制较低。栗子包括两个阶段,第一阶段由两个静态组件,即编译器和二元分析仪组成,它们在编译过程中提取使用的Syscalls或对二进制分析进行分析。基于编译器的栗子方法的速度比以前的方法快73,而不会不利地影响准确性。在二进制分析级别上,我们证明了不需要与位置无关的工作的二进制文件的需求,从而扩大了栗子可用的一组应用。在可选的第二阶段中,Chestnut提供了动态改进工具,该工具允许进一步限制允许的Syscall集合。我们证明,栗子平均使用编译器302个SYSCALLS(86.5%),使用二进制级别分析(82.5%),使用二进制级别的分析在一组18个广泛使用的应用程序上。我们发现,分别使用基于编译器和二进制方法的方法分别以50%和77.7%的测试应用程序以50%和77.7%的方式阻止了危险的Exec Syscall。对于经过测试的应用,栗子可以防止利用通过Syscalls瞄准内核的175个CVE中的62%以上。最后,我们对沙盒Nginx服务器进行了为期6个月的长期研究。
Software vulnerabilities in applications undermine the security of applications. By blocking unused functionality, the impact of potential exploits can be reduced. While seccomp provides a solution for filtering syscalls, it requires manual implementation of filter rules for each individual application. Recent work has investigated automated approaches for detecting and installing the necessary filter rules. However, as we show, these approaches make assumptions that are not necessary or require overly time-consuming analysis. In this paper, we propose Chestnut, an automated approach for generating strict syscall filters for Linux userspace applications with lower requirements and limitations. Chestnut comprises two phases, with the first phase consisting of two static components, i.e., a compiler and a binary analyzer, that extract the used syscalls during compilation or in an analysis of the binary. The compiler-based approach of Chestnut is up to factor 73 faster than previous approaches without affecting the accuracy adversely. On the binary analysis level, we demonstrate that the requirement of position-independent binaries of related work is not needed, enlarging the set of applications for which Chestnut is usable. In an optional second phase, Chestnut provides a dynamic refinement tool that allows restricting the set of allowed syscalls further. We demonstrate that Chestnut on average blocks 302 syscalls (86.5%) via the compiler and 288 (82.5%) using the binary-level analysis on a set of 18 widely used applications. We found that Chestnut blocks the dangerous exec syscall in 50% and 77.7% of the tested applications using the compiler- and binary-based approach, respectively. For the tested applications, Chestnut prevents exploitation of more than 62% of the 175 CVEs that target the kernel via syscalls. Finally, we perform a 6 month long-term study of a sandboxed Nginx server.