一句话:融合静态与动态分析自动提取服务器应用真正需要的文件,将可访问文件数平均减少逾99%。
用户态程序依赖操作系统资源运行,文件访问是其中最常见也最关键的一类。然而现有访问控制机制通常只施加粗粒度策略,允许程序访问远超其实际所需的文件,从而显著扩大攻击面。论文提出 AMPLE(Automated MAC PoLicy Extraction),一个融合静态分析与动态分析的工具,用于识别服务器应用所需的文件。其核心思路是利用服务器应用的执行阶段特性,仅运行程序的初始化阶段即可提取运行时相关的文件路径,既弥补纯静态分析无法发现运行时路径的缺陷,也避免纯动态分析遗漏未执行代码路径中文件访问的问题。作者在十个广泛使用的服务器应用上进行评估,结果显示可访问文件数平均减少超过99%,每个应用平均仅保留不到254个文件,从而限制了对大量安全关键文件的访问,并缓解了13个 Linux 内核 CVE。
Userspace programs depend heavily on operating system resources to execute correctly, with file access being one of the most common and critical use cases. Modern Linux distributions include a vast number of files, many of which are unnecessary for the operation of most programs. However, existing access control mechanisms typically enforce coarse-grained policies that allow programs to access far more files than they actually require. This over-permissiveness significantly increases the system’s attack surface, exposing sensitive resources to potential exploitation.In this paper, we introduce AMPLE (Automated MAC PoLicy Extraction), a versatile tool that integrates both static and dynamic analysis to identify the files required by server applications. Ample accomplishes this by leveraging the distinct phases of server application execution, extracting runtime-dependent file paths by executing only the program’s initialization phase. This novel approach addresses the limitations of relying exclusively on static analysis, which fails to identify runtime-dependent file paths, as well as the shortcomings of purely dynamic analysis, which overlooks file paths accessed in non-executed code paths. To demonstrate its effectiveness, we evaluated Ample on ten widely-used server applications. The results show that Ample significantly reduces the number of accessible files, achieving an average reduction of over 99%, and limiting access to an average of fewer than 254 files per application. This substantial reduction helps restrict access to numerous security-critical files and mitigates 13 Linux kernel CVEs.
DOI 原文 ·
@inproceedings{paperbot9372,
title = {AMPLE: Fine-grained File Access Policies for Server Applications},
author = {Seyedhamed Ghavamnia and Julien Vanegue},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00111}
}