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

JuCify:面向增强型静态分析的Android代码统一的一步

JuCify: A Step Towards Android Code Unification for Enhanced Static Analysis

Jordan Samhi, Jun Gao, Nadia Daoudi, Pierre Graux, Henri Hoyez, Xiaoyu Sun, Kevin Allix, Tegawendé F. Bissyandé, Jacques Klein

摘要:

原生代码现在在Android应用程序包中很常见,它通过Java原生接口与Dex字节码共存并交互,以提供丰富的应用程序功能。然而,最先进的静态分析方法大多忽略了这种本机代码的存在,然而,这些本机代码可能实现应用行为的一些关键敏感部分,甚至恶意部分。现有技术的这种局限性严重威胁到大范围静态分析的有效性,这些静态分析无法完整地查看应用程序中的可执行代码。为了解决这个问题,我们提出了一个雄心勃勃的研究方向的新进展,即在Android应用程序中构建所有代码的统一模型。本文中提出的JuCify方法是朝着这样一个模型迈出的重要一步,我们提取并合并本机代码和字节码的调用图,以使最终模型易于通过常见的Android分析框架使用:在我们的实现中,JuCify构建在Soot内部中间表示的基础上。我们进行了实证调查,以突出如何,没有统一的模型,从本地代码调用的Java方法的显着数量是“不可访问”的应用程序的调用图,无论是在好软件和恶意软件。使用JuCify,我们能够使静态分析器能够揭示恶意软件依赖本机代码来隐藏Android框架中的支付库代码或其他敏感代码的调用的情况。此外,JuCify的模型使最先进的工具能够在通过本机代码检测数据泄漏时实现更好的精度和召回率。最后,我们展示了通过使用JuCify,我们可以找到通过本机代码传递的敏感数据泄漏。

英文摘要:

Native code is now commonplace within Android app packages where it co-exists and interacts with Dex bytecode through the Java Native Interface to deliver rich app functionalities. Yet, state-of-the-art static analysis approaches have mostly overlooked the presence of such native code, which, however, may implement some key sensitive, or even malicious, parts of the app behavior. This limitation of the state of the art is a severe threat to validity in a large range of static analyses that do not have a complete view of the executable code in apps. To address this issue, we propose a new advance in the ambitious research direction of building a unified model of all code in Android apps. The JuCify approach presented in this paper is a significant step towards such a model, where we extract and merge call graphs of native code and bytecode to make the final model readily-usable by a common Android analysis framework: in our implementation, JuCify builds on the Soot internal intermediate representation. We performed empirical investigations to highlight how, without the unified model, a significant amount of Java methods called from the native code are "unreachable" in apps' call-graphs, both in goodware and malware. Using JuCify, we were able to enable static analyzers to reveal cases where malware relied on native code to hide invocation of payment library code or of other sensitive code in the Android framework. Additionally, JuCify's model enables state-of-the-art tools to achieve better precision and recall in detecting data leaks through native code. Finally, we show that by using JuCify we can find sensitive data leaks that pass through native code.

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

↑