信息安全研究 ›› 2016, Vol. 2 ›› Issue (7): 660-664.

• 技术应用 • 上一篇    下一篇

Android 应用程序恶意代码静态注入方法及实现

李文唐   

  1. 中山大学
  • 收稿日期:2016-07-14 出版日期:2016-07-15 发布日期:2016-07-14
  • 通讯作者: 李文唐

The Method and Realization of Android Applications Malicious Code Static Injection

  • Received:2016-07-14 Online:2016-07-15 Published:2016-07-14

摘要: 随着Android的发展,其面临着越来越多的安全威胁,恶意软件数量也呈爆发式增长.恶意代码注入一直以来都是产生恶意软件的重要方式.通过介绍Android应用程序恶意代码的注入原理,为开发者更好地保护自身代码提供思路.从基于程序入口点、基于广播机制以及篡改Dalvik字节码3个方面介绍恶意代码注入过程.在程序入口点注入实现中提出了用不可见界面对原程序入口界面进行替换的方法,并针对“WIFI万能助手”应用进行了恶意代码的注入实验,证明具有较好的隐蔽效果.在基于广播机制的恶意代码注入方式中,通过对不同种类的应用进行注入实验,达到了开机自启动以及拦截短信的效果.在篡改字节码注入实现中针对“中华万年历”应用进行了注入实验,证明了以篡改Dalvik字节码的方式实现恶意代码静态注入的可行性.最后针对恶意代码静态注入的各种方式,提出了必要的防范手段,综合利用这些方法可以更好地保护应用程序.

关键词: Android, 恶意代码, 静态注入, Dalvik字节码

Abstract: With the development of Android, it is facing more and more security threats, the number of malicious software also showed explosive growth. Malicious code injection has always been an important way of malicious software. By introducing the Android application program malicious code injection principle, it can provide ideas for the developer to protect their own code better. This paper introduces the injection process from three aspects of basing on the program entry point, basing on the broadcast mechanism and tampering with Dalvik byte code. In the implementation of the program entry point injection, a method to replace the interface of the original program with invisible interface is proposed and the malicious code injection experiment is operated for the WiFi universal assistant application, which has a better hiding effect. In the injection of malicious code based on broadcast mechanism, in the injection experiment for different types of applications achieve the boot from the start and the intercept messages. In the implementation of tampering with the byte code injection, the injection experiments for the application of "the Chinese calendar" prove the feasibility of realizing the malicious code static injection by the way to tamper with Dalvik byte code. Finally, this paper proposes a series protection methods of application aimed at various ways of static injection against malicious code, and it can protect the software better with the comprehensive utilization of these methods.

Key words: Android, malicious code, static inject, Dalvik byte code