解析正确的库:一种针对共享对象劫持的加载器级防御方案
Resolving the Correct Library: A Loader-Level Defense Solution Against Shared Object Hijacking
AI总结:
针对Linux生态系统中共享库劫持攻击,提出一种加载器级验证框架,通过路径绑定或位置无关的身份模型结合加密哈希,确保动态链接器解析的共享对象是可信的。
摘要:
Linux生态系统(包括嵌入式Linux)中的共享库劫持攻击是一个重要问题。它从根本上利用动态链接器的库解析语义,而不是直接修改可信库。先前的研究广泛分析了利用环境变量、嵌入搜索路径和动态加载器内部结构的攻击向量,表明劫持源于加载器的基本行为而非孤立的配置错误。现有的防御措施要么加固或替换加载器,在库加载后强制执行控制流完整性,要么应用基于文件的完整性机制(如签名和测量框架)。然而,这些方法未能解决一个关键差距:没有验证加载器实际解析的共享对象是否是预期且可信的。 在本文中,我们认为共享库劫持本质上是一个加载器解析的真实性问题,并提出一个以加载器为中心的验证框架,为动态链接器的解析过程强制执行真实性保证。我们的设计支持路径绑定和位置无关(即基于Build-ID)的身份模型,并结合加密哈希。我们在GNU libc(glibc)系统上实现该方法,并在通用Linux(如Ubuntu)和嵌入式Linux(如Buildroot)环境下进行仿真评估。结果表明,我们提出的机制确实能防止共享库劫持攻击。
英文摘要:
Shared library hijacking attacks in the Linux ecosystem, including embedded Linux, are a significant concern. It fundamentally exploits the dynamic linker's library-resolution semantics rather than modifying trusted libraries directly. Prior research has extensively analyzed attack vectors exploiting environment variables, embedded search paths, and dynamic loader internals, demonstrating that hijacking is rooted in fundamental loader behavior rather than isolated misconfigurations. Existing defenses either harden or replace the loader, enforce control-flow integrity after libraries are loaded, or apply file-centric integrity mechanisms such as signatures and measurement frameworks. However, these approaches fail to address a critical gap: none verify whether the shared object actually resolved by the loader is the intended and trusted one. In this paper, we argue that shared library hijacking is fundamentally a loader-resolution authenticity problem and present a loader-centric verification framework that enforces authenticity guarantees for the dynamic linker's resolution process. Our design supports both path-bound and location-independent (i.e., Build-ID-based) identity models combined with cryptographic hashing. We implement our approach on GNU libc (glibc) systems and evaluate it on both general-purpose Linux (e.g., Ubuntu) and embedded Linux (e.g., Buildroot) environments under emulation. Our results demonstrate that our proposed mechanism indeed prevents shared library hijacking attacks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。