基于符号执行的android原生代码控制流图提取方法symbolic
第3 卷第7 期 网络与信息安全学报 Vol.3 No.7
2017 年7 月 Chinese Journal of Network and Information Security July 2017
基于符号执行的 Android 原生代码控制流图提取方法
颜慧颖,周振吉,吴礼发,洪征,孙贺
(解放军理工大学指挥信息系统学院,江苏南京 210000 )
摘 要:提出了一种基于符号执行的控制流图提取方法,该方法为原生库中的函数提供了符号执行环境,对
JNI 函数调用进行模拟,用约束求解器对符号进行求解。实现了控制流图提取原型系统 CFGNative 。实验结
果表明,CFGNative 可准确识别样例中所有的JNI 函数调用和原生方法,并能够在可接受的时间内达到较高
的代码覆盖率。
关键词:控制流图;Android 应用软件;原生代码;符号执行
中图分类号:TP309
文献标识码:A
doi: 10.11959/j.issn.2096-109x.2017.00178
Symbolic execution based control flow graph
extraction method for Android native codes
YAN Hui-ying, ZHOU Zhen-ji, WU Li-fa, HONG Zheng, SUN He
(Institute of Command Information System, PLA University of Science and Technology, Nanjing 210000, China)
Abstract: A symbolic execution based method was proposed to automatically extract control flow graphs from na-
tive libraries of Android applications. The proposed method can provide execution environments for functions in na-
tive libraries, simulate JNI function call processes and solve symbols using constraint solver. A control flow graph
extraction prototype system named CFGNative was implemented. The experiment results show that CFGNative can
accurately distinguish all the JNI function calls and native methods of the representative example, and reach high
code coverage within acceptable time.
Key words: control flow graph, Android application, native code, symbolic execution
者倾向于复用已有的程序模块。而大多数情况下,
1 引言
分析者接触到的都是编译后的应用,需要分析程
Android 系统的普及使Android 应用的数量和 序安装包(APK ,Android package )中的代码文
种类呈爆发式增长。据Statista 的