arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.30218cs.SEcs.CR
收藏

JANUS:面向Android原生库的智能跨语言模糊测试Harness生成工具

JANUS: Agentic Cross-Language Fuzzing Harness Generation for Android Native Libraries

Nankai University(南开大学);Zhongguancun Academy(中关村学院);Xiaohongshu Inc.(小红书公司)

Xiangyu Zhang, Yucheng Su, Lingling Fan, Yinan Li, Sen Chen

AI总结:

JANUS是首个智能体式跨语言JNI感知模糊测试Harness合成方法,可高效生成有效Harness,在44款应用上的有效Harness数量超现有工具5.9倍,还发现6个闭源原生库未知漏洞。

摘要:

现代Android应用广泛依赖原生库,通过Java原生接口(JNI)实现Java/Kotlin与C/C++的交互。然而这种跨语言互操作将内存安全的Android运行时暴露给不安全的C/C++环境,形成了可被反复利用以完全控制设备的攻击面。尽管模糊测试是验证原生库的成熟技术,但现有最先进的Harness生成工具难以准确捕获闭源跨语言API的使用情况:(i)跨JNI边界的精确程序分析无法扩展,而轻量级近似方法会遗漏关键调用模式;(ii)没有工具能处理JNI方法所需的复杂复合对象的构建。本文提出JANUS,这是首个面向Android原生库的智能体式跨语言JNI感知模糊测试Harness合成方法。JANUS迭代解决显式与隐式跨语言调用依赖以恢复应用特定的运行时上下文,并以自底向上的方式递归组装跨语言参数对象。JANUS利用自主智能体工作流减少对手工启发式规则的依赖,捕获嵌入闭源原生库中的大量隐藏API使用知识。对44个流行真实应用(如Google和YouTube Music,共覆盖21386个JNI方法)的评估显示,JANUS生成的有效Harness数量(6094个)是最先进自动Harness工具的5.9倍以上。在来自五家主流Android厂商(如小米、vivo、三星)的预装应用上,JANUS进一步在闭源原生库中发现了6个此前未知的漏洞。

英文摘要:

Modern Android apps extensively rely on native libraries, bridging Java/Kotlin and C/C++ through the Java Native Interface (JNI). This cross-language interoperation, however, exposes the memory-safe Android Runtime to the unsafe C/C++ world, creating an attack surface that has been repeatedly exploited for full device compromise. While fuzzing is a proven technique for vetting native libraries, state-of-the-art harness generation tools struggle to faithfully capture closed-source cross-language API usage: (i) precise program analysis across the JNI boundary does not scale, whereas lightweight approximations miss critical invocation patterns; and (ii) none tackles the construction of complex composite objects consumed by JNI methods. In this paper, we propose JANUS, the first agentic approach to synthesizing cross-language JNI-aware fuzzing harnesses for Android native libraries. JANUS iteratively resolves both explicit and implicit cross-language call dependencies to recover app-specific runtime context, and recursively assembles cross-language argument objects in a bottom-up manner. JANUS leverages an autonomous agentic workflow to reduce reliance on hand-crafted heuristics, capturing the vast landscape of hidden API usage knowledge embedded in closed-source native libraries. Evaluation on 44 popular real-world apps (such as Google and YouTube Music, covering 21,386 JNI methods total) shows that JANUS produces over 5.9 times as many valid harnesses (6,094) as state-of-the-art automatic harnessing tools. On pre-installed apps from five mainstream Android vendors (e.g., Xiaomi, Vivo, Samsung), JANUS further uncovers 6 previously unknown vulnerabilities in closed-source native libraries.

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

↑