GridDroid---一种有效且高效的基于运行时图形用户界面的安卓应用重打包检测方法
GridDroid---An Effective and Efficient Approach for Android Repackaging Detection Based on Runtime Graphical User Interface
-
摘要: 1、研究背景(context):
应用重打包(repackaging)给安卓生态系统带来严重威胁,而软件胎记(software birthmark)是用于检测重打包应用的常用技术之一。其中,基于应用程序运行时刻的图形用户界面(GUI)的软件胎记技术具有较好的效果。
2、目的(Objective):
然而,现有的基于应用程序运行时刻的图形用户界面(GUI)的软件胎记技术比对效率较低,尚不能满足大规模的应用程序重打包检测的需要。为此,本文尝试提供一套有效而且高效的基于应用程序运行时刻的图形用户界面(GUI)的软件胎记技术。
3、方法(Method):
在本文中,我们提出了一种有效而高效的基于安卓应用动态GUI的软件胎记。 简而言之,我们用自动生成的GUI事件来运行一个应用程序,并在执行每个事件后转储应用户界面的布局(layout)。我们将每个转储的布局划分为一个网格(grid),在每个网格单元中统计布局中的各个部件(widget)所对应的矩形区域的(左-上以及右-下)顶点数目,并进一步生成一个网格特征向量(grid vector)来编码该布局。 在胎记生成阶段,我们基于布局的特征向量来计算不同布局之间的相似度,相似的布局在运行时被合并,最后我们可以建模得到一个图(Graph),并以此作为应用的胎记。给出一对要比较的应用,我们从它们的胎记中建立一个加权二部图,并应用一个修改后的最大权二部图匹配算法来确定它们是否构成重打包应用对(Repackaging Pair,RP)。
4、结果(Result & Findings):
我们基于所提出的技术,实现了一个名为GridDroid原型系统,并用该系统去检测3个数据集(共包含527个apks)。GridDroid只报告了6个假阴性和7个假阳性,并且比较一对胎记平均开销仅为20微秒。
5、结论(Conclusions):
如何标识界面布局是基于应用运行时刻的GUI构建软件胎记效果好坏、性能高低的关键。布局中控件的分布能够有效的标识和区别不同的布局结构。而本文提出的对布局的网格化编码方式,一方面则能够有效的表示控件的分布情况;另一方面,简单的向量表示也大大提升了胎记比对的效率。Abstract: Repackaging brings serious threats to Android ecosystem.Software birthmark techniques are typically applied to detect repackaged apps.Birthmarks based on apps' runtime graphical user interfaces (GUI) are effective, especially for obfuscated or encrypted apps.However, existing studies are time-consuming and not suitable for handling apps in large scale.In this paper, we propose an effective yet efficient dynamic GUI birthmark for Android apps.Briefly, we run an app with automatically generated GUI events and dump its layout after each event.We divide each dumped layout into a grid, count in each grid cell the vertices of boundary rectangles corresponding to widgets within the layout, and generate a feature vector to encode the layout.Similar layouts are merged at runtime, and finally we obtain a graph as the birthmark of the app.Given a pair of apps to be compared, we build a weighted bipartite graph from their birthmarks and apply a modified version of the maximum-weight-bipartite-matching algorithm to determine whether they form a repackaging pair (RP) or not. We implement the proposed technique in a prototype, GridDroid, and apply it to detect RPs in three datasets involving 527 apks. GridDroid reports only six false negatives and seven false positives, and it takes GridDroid merely 20 microseconds on average to compare a pair of birthmarks.