Linux 애플리케이션을 위한 Seccomp 필터 자동 생성
Automating Seccomp Filter Generation for Linux Applications
Automating Seccomp Filter Generation for Linux Applications
@misc{canella2020automating,
title = {Automating Seccomp Filter Generation for Linux Applications},
author = {Claudio Canella and Mario Werner and Daniel Gruss and Michael Schwarz},
year = {2020},
eprint = {2012.02554},
archivePrefix = {arXiv},
primaryClass = {cs.CR},
url = {https://arxiv.org/abs/2012.02554}
}
Canella, C., Werner, M., Gruss, D., & Schwarz, M. (2020). Automating Seccomp Filter Generation for Linux Applications [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2012.02554
CANELLA C, WERNER M, GRUSS D, et al. Automating Seccomp Filter Generation for Linux Applications[EB/OL]. (2020-12-04)[2026-11-29]. https://arxiv.org/abs/2012.02554.
초록
응용 프로그램의 소프트웨어 취약점은 해당 프로그램의 보안을 약화시킵니다. 사용하지 않는 기능을 차단함으로써 잠재적인 악용의 영향을 줄일 수 있습니다. seccomp 는 syscalls 필터링을 위한 해결책을 제공하지만, 각 개별 응용 프로그램에 대해 필터 규칙을 수동으로 구현해야 합니다. 최근 연구들은 필요한 필터 규칙을 탐지하고 설치하기 위한 자동화된 접근법을 조사해 왔습니다. 그러나 우리는 이러한 접근법이 불필요한 가정을 하거나 지나치게 시간이 많이 소요되는 분석을 요구한다는 것을 보여줍니다. 본 논문에서는 Linux 사용자 공간 응용 프로그램에 대해 더 낮은 요구사항과 제한 사항으로 엄격한 syscalls 필터를 생성하는 자동화된 접근법인 Chestnut 을 제안합니다. Chestnut 은 두 가지 단계로 구성되며, 첫 번째 단계는 컴파일러와 바이너리 분석기라는 두 가지 정적 구성 요소로, 컴파일 또는 바이너리 분석 과정에서 사용된 syscalls 을 추출합니다. Chestnut 의 컴파일러 기반 접근법은 기존 접근법보다 최대 73 배 빠르게 작동하며 정확도에 부정적인 영향을 미치지 않습니다. 바이너리 분석 단계에서는 관련 연구에서 요구되는 위치 독립형 바이너리가 필요하지 않음을 보여주어 Chestnut 의 적용 가능한 응용 프로그램 집합을 확대합니다. 선택적인 두 번째 단계에서 Chestnut 은 허용된 syscalls 집합을 더 제한할 수 있는 동적 정교화 도구를 제공합니다. 우리는 18 개 널리 사용되는 응용 프로그램 집합에서 Chestnut 이 컴파일러를 통해 평균적으로 302 개 (86.5%) 의 syscalls 을 차단하고, 바이너리 수준 분석을 통해 288 개 (82.5%) 의 syscalls 을 차단한다고 보여줍니다. 우리는 Chestnut 이 컴파일러 기반 접근법을 통해 테스트된 응용 프로그램의 50% 에서, 바이너리 기반 접근법을 통해 77.7% 에서 위험한 exec syscalls 을 차단한다고 발견했습니다. 테스트된 응용 프로그램에 대해 Chestnut 은 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.