arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.18760cs.CRcs.SE
收藏

Maven-Hijack:利用打包顺序的软件供应链攻击

Maven-Hijack: Software Supply Chain Attack Exploiting Packaging Order

KTH Royal Institute of Technology(皇家理工学院);Universtité de Montréal(蒙特利尔大学)

Frank Reyes, Federico Bono, Aman Sharma, Benoit Baudry, Martin Monperrus

AI总结:

本文提出利用Maven依赖打包顺序和JVM类解析机制的新型供应链攻击Maven-Hijack,通过真实项目验证可行性,并评估得出带重复类检测的Maven Enforcer插件是当前最实用有效的防御方案。

摘要:

Java项目常依赖Maven等包管理器来管理复杂的外部依赖网络。这些工具虽简化了开发流程,却也给软件供应链带来了隐蔽风险。本文提出一种新型攻击Maven-Hijack,该攻击利用Maven打包依赖的顺序以及Java虚拟机在运行时解析类的方式实施攻击。攻击者只需将一个与合法类完全限定名相同的恶意类,注入到打包顺序更靠前的依赖中,就能在不修改主代码库或库名称的情况下,悄无声息地覆盖应用的核心行为。我们通过攻陷广泛使用的开源新冠接触者追踪系统Corona-Warn-App,获取其数据库连接逻辑的控制权,验证了该攻击在真实场景中的可行性。我们评估了三种缓解策略,分别是密封JAR(sealed JARs)、Java模块(Java Modules)以及Maven Enforcer插件。结果显示,尽管Java Modules能提供强防护,但具备重复类检测功能的Maven Enforcer插件,对当前Java项目而言是最实用且有效的防御手段。这些发现凸显了改进Java构建与依赖管理流程的防护措施、防范隐蔽供应链攻击的迫切性。

英文摘要:

Java projects frequently rely on package managers such as Maven to manage complex webs of external dependencies. While these tools streamline development, they also introduce subtle risks to the software supply chain. In this paper, we present Maven-Hijack, a novel attack that exploits the order in which Maven packages dependencies and the way the Java Virtual Machine resolves classes at runtime. By injecting a malicious class with the same fully qualified name as a legitimate one into a dependency that is packaged earlier, an attacker can silently override core application behavior without modifying the main codebase or library names. We demonstrate the real-world feasibility of this attack by compromising the Corona-Warn-App, a widely used open-source COVID-19 contact tracing system, and gaining control over its database connection logic. We evaluate three mitigation strategies, such as sealed JARs, Java Modules, and the Maven Enforcer plugin. Our results show that, while Java Modules offer strong protection, the Maven Enforcer plugin with duplicate class detection provides the most practical and effective defense for current Java projects. These findings highlight the urgent need for improved safeguards in Java's build and dependency management processes to prevent stealthy supply chain attacks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑