The invention relates to an APP anti-debugging method which integrates multi-features of Android platform and belongs to the field of computer and information science and technology. The invention first creates a sub-process to realize active tracking of the main process and at the same time writes data to the main process for generating the key when it is dynamically loaded; then the main process opens the thread to carry out dark pile detection, system file monitoring and sub-process monitoring, respectively, to detect the state of the main process and sub-process in the main process cycle, when the three modules are allowed to do so. Meanwhile, the child process interacts with the main process to ensure that the child process is not suspended, the main process is monitored by the monitoring module, and the process ends when the main process sends an exception signal. The invention can effectively resist debugging attack and anti-debugging attack, and improves the protection ability of APP.
【技术实现步骤摘要】
Android平台融合多特征的APP反调试方法
本专利技术涉及Android平台融合多特征的APP反调试方法,属于计算机与信息科学
技术介绍
应用程序本身并不具备反调试的功能,但是动态调试是动态分析应用逻辑、动态脱壳等攻击方式所采取的必要手段。为了防止攻击者使用调试工具调试应用程序,进而动态分析程序逻辑、实现进程注入、修改寄存器,需要对APP加以反调试的保护,为了防止攻击者利用反反调试方法绕过反调试,需要对APP加以反调试的自我保护。因此,本专利技术将提供融合多特征的APP反调试方法来实现Android平台APP加固。Android平台APP反调试方法需要解决的基本问题是判断应用是否调试,综观现有的Android平台APP反调试方法,通常使用方法可归为四类:1.基于ptrace的反调试基于ptrace的反调试方法是指通过linux下的ptrace函数跟踪到应用进程,实现应用程序的跟踪。每个应用进程最多被一个进程跟踪,因此可以通过抢占式的实现反调试预先进行进程跟踪。但是基于ptrace的反调试方法只能针对单进程进行反调试。2.基于暗桩检测的反调试基于暗桩检测的反调试方法是指通过检测Linux内核向系统文件写入进程状态的信息,判断应用是否被调试。但是由于检测函数的返回值存储在寄存器中,可以通过修改寄存器的方式修改返回结果从而绕过反调试检测。3.基于调试器特征的反调试基于调试器特征的反调试方法是指通过检测特定的调试器来检测调试攻击,但是只要修改调试进程的名字就可以绕过。4.基于断点特征的反调试基于断点特征的反调试有两种方法,一种方法是检测软件断点,遍历 ...
【技术保护点】
1.Android平台融合多特征的app反调试方法,其特征在于所述方法包括如下步骤:步骤1,通过fork创建子进程,子进程利用ptrace实现对主进程的主动跟踪,同时向主进程写入数据,用于动态加载时生成密钥;步骤2,主进程开启线程分别进行暗桩检测、系统文件监控和子进程监控主进程循环检测主进程和子进程状态,当三个模块任意一个发送异常时退出应用程序;步骤3,主进程和子进程之间通过管道通信进行状态交互,实现保活功能,当主进程发送异常信号时结束进程。
【技术特征摘要】
1.Android平台融合多特征的app反调试方法,其特征在于所述方法包括如下步骤:步骤1,通过fork创建子进程,子进程利用ptrace实现对主进程的主动跟踪,同时向主进程写入数据,用于动态加载时生成密钥;步骤2,主进程开启线程分别进行暗桩检测、系统文件监控和子进程监控主进程循环检测主进程和子进程状态,当三个模块任意一个发送异常时退出应用程序;步骤3,主进程和子进程之间通过管道通信进行状态交互,实现保活功能,当主进程发送异常信号时结束进程。2.根据权利要求1所述的融合多特征的app反...
【专利技术属性】
技术研发人员:潘丽敏,李蕊,罗森林,尚海,张笈,
申请(专利权)人:北京理工大学,
类型:发明
国别省市:北京,11
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。