WO2016206297A1 - Android系统中保护dex文件不被反编译的方法 - Google Patents

Android系统中保护dex文件不被反编译的方法 Download PDF

Info

Publication number
WO2016206297A1
WO2016206297A1 PCT/CN2015/095200 CN2015095200W WO2016206297A1 WO 2016206297 A1 WO2016206297 A1 WO 2016206297A1 CN 2015095200 W CN2015095200 W CN 2015095200W WO 2016206297 A1 WO2016206297 A1 WO 2016206297A1
Authority
WO
WIPO (PCT)
Prior art keywords
dex file
android system
decompiled
protecting
memory
Prior art date
Application number
PCT/CN2015/095200
Other languages
English (en)
French (fr)
Inventor
刘云峰
Original Assignee
上海斐讯数据通信技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海斐讯数据通信技术有限公司 filed Critical 上海斐讯数据通信技术有限公司
Priority to EP15896181.3A priority Critical patent/EP3296906A4/en
Priority to US15/575,815 priority patent/US20180129794A1/en
Publication of WO2016206297A1 publication Critical patent/WO2016206297A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6281Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database at program execution time, where the protection is within the operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/106Enforcing content protection by specific content processing
    • G06F21/1066Hiding content

Definitions

  • the invention relates to the technical field of dex file decompilation in the Android system, in particular to a method for protecting a dex file from being decompiled in an Android system.
  • Android is a Linux-based free and open source operating system for mobile devices such as smartphones and tablets, led and developed by Google and the Open Handset Alliance. At present, the development of Android programs is in full swing. Due to its open source, developers are exempt from high patent fees, which can better integrate the world's advanced chip manufacturers and software vendors.
  • the Dalvik virtual machine is a virtual machine mechanism that is completely different from the classic Java virtual machine. It is developed by Google and optimized for the features of the mobile operating system (especially the Android platform).
  • the Dalvik virtual machine converts a bytecode file (.class format file) from a traditional Java virtual machine into a bytecode file (dex format) running in the Dalvik virtual machine via a conversion tool called dx.
  • the code of the dex file is a set of instructions unique to the Dalvik virtual machine, optimized for embedded systems. Compared to standard Java .class files, dex files have the advantages of small size and high efficiency.
  • a Java bytecode file consists of one or more .class files (each file contains a class). As shown in Figure 1, at runtime, the Java virtual machine dynamically loads bytecode into memory from each .class file.
  • the Dalvik bytecode file consists of only one .dex file. This file contains all the classes needed by the application. After the Java compiler generates the Java bytecode, the Dalvik dx compiler deletes all .class files. Recompile the Java bytecode into Dalvik bytecode.
  • Java Compilation Tools compile Java source code into Java bytecode files.
  • the Java virtual machine is responsible for interpreting and executing the Java bytecode file. Unlike local object code, method names, variable names are still preserved in Java bytecode files, and variables and methods are accessed through these names, which often carry a lot of semantic information. Therefore, it is easier to decompile a Java bytecode file.
  • the Hook function is automatically called when the Java virtual machine is initialized, and the function called by the Java virtual machine when generating the class object is registered as a custom proxy function in the Hook function using the Java local interface;
  • the Java virtual machine calls a custom proxy function when generating a class object, and decrypts the encrypted Java bytecode file in a custom proxy function;
  • the decrypted Java bytecode file is generated into a corresponding class object and returned to the Java virtual machine.
  • the above technology is mainly aimed at the Java platform and the technology implemented for the Java standard virtual machine, and it has obvious deficiencies in the field of intelligent mobile terminal Android mobile research.
  • the Android system development application although written in the Java language, but its operating environment is not the traditional meaning of the Java virtual machine, but the Dalvik virtual machine device developed by itself, has its own stack and build environment.
  • the Java bytecode file is encrypted, and then a Java class loader is written to decrypt the Java bytecode file when it is loaded.
  • a Java class loader is written to decrypt the Java bytecode file when it is loaded.
  • the disadvantage of this method is that although the encrypted Java bytecode file cannot be decompiled, the custom class loader itself does not prevent it from being decompiled. Therefore, encrypted Java bytecode files are still not secure.
  • the object of the present invention is to provide a method for protecting a dex file from being decompiled in an Android system, by loading a dex file into an inaccessible memory by a reference method, and refusing to download the dex file. Copying is propagated locally; when executed, it is executed by reference, so that the decompiler cannot find the dex file and cannot reverse engineer, thus protecting the Android program from being decompiled.
  • the present invention provides a method for protecting a dex file from being decompiled in an Android system, including the following contents: 1) loading a dex file into an inaccessible memory of the Android system; 2) performing When executed by reference, the dex file cannot be found.
  • the inaccessible memory is defined as a set of memory blocks dynamically allocated by a computer program without any accessible pointer.
  • the dex file is loaded into the inaccessible memory of the Android system by a reference method.
  • the dex file corresponding to the installation package generates a new feature dex file and a reskey value, and sends it to the smart terminal; c, the smart terminal locks the applied memory into unavailable memory; d, the smart terminal generates a reference tree, respectively pointing Different resource blocks, different resource blocks are distinguished by offset; e, the Android system loads the new feature dex file and parses it into bytecode; f, the reference definition uses the reskey value to generate a new one-time reference value; g, lock The memory loads the parsed bytecode according to the reference, and re-parses the bytecode into the executable dex bytecode using the referenced reskey value.
  • the illegal use includes copying, changing references, moving, illegal access, and calling.
  • the method for protecting a dex file in the Android system from being decompiled is applied to an intelligent terminal using the Android operating system.
  • the smart terminal includes a smart phone, a tablet computer, and a PDA.
  • the method for protecting a dex file from being decompiled in the Android system of the present invention has the following beneficial effects:
  • the dex file is loaded into the inaccessible memory by reference method, which ensures that the program core file will not be copied, analyzed, moved, changed at runtime, and the security of the protection program is greatly protected;
  • FIG. 1 is a schematic diagram showing a loading procedure in an Android system in the prior art
  • FIG. 2 is a flow chart showing a method for protecting a dex file from being decompiled in the Android system of the present invention.
  • inaccessible memory is dynamic memory that is not directly accessible by the program, and cannot be accessed by pointing a pointer to an accessible start object.
  • the smart terminal involved in the present invention includes, but is not limited to, a smart phone, a tablet computer, a PDA, and other terminal devices having data processing functions.
  • a smart terminal refers to a program provided by a third-party service provider such as a software, a game, or the like, which can be installed by a user to install a software, a game, and the like, and the function of the handheld device is continuously expanded and can be accessed through a mobile communication network.
  • a type of terminal device that implements wireless network access.
  • a method for protecting a dex file from being decompiled in the Android system of the present invention includes the following contents:
  • the dex file is loaded into the inaccessible memory of the Android system by reference method.
  • the index method uses an index table that points to the reskey value in the text. This index table is only generated when the program is executed. When loading a dex file once, you need a corresponding reskey value.
  • the user opens the program, the program sends a load request to the server, and at the same time applies for a piece of memory;
  • the server checks the dex file corresponding to the Android installation package (AndroidPackage, APK), generates a new feature dex file and a reskey value, and pushes it to the smart terminal;
  • AndroidPackage APK
  • the smart terminal locks the application memory into unavailable memory
  • the intelligent terminal generates a reference tree, which points to different resource blocks, and different resource blocks are distinguished by offsets;
  • the system loads the new feature dex file and parses it into bytecode
  • the reference definition uses the reskey value to generate a new one-time use reference value
  • the locked memory loads the parsed bytecode according to the reference, and re-parses the bytecode into the executable dex bytecode by using the referenced reskey value.
  • This step is equivalent to unlocking the memory, but the actual lock memory only provides the parsed dex bytecode to the Android virtual machine, thus preventing the separation, and the anti-cracking memory step is not available externally.
  • the method further includes: if the inaccessible memory is illegally used, the dex file is immediately cleared.
  • illegal use includes but is not limited to copying, changing references, moving, illegal access, and calling.
  • clearing the dex file all the data and traces related to the dex file in the unavailable memory need to be cleared, and the management module that cannot access the memory is reported.
  • the program's dex file is cleared, the program does not work properly and needs to be re-downloaded for installation.
  • the smart terminal downloads the APK on the network and performs an installation operation.
  • the server loads the protected files such as dex, lib, and xml into the inaccessible memory of the smart terminal according to the request.
  • the management module that cannot access the memory monitors whether the program is executed normally.
  • illegal use includes but is not limited to copying, changing references, moving, illegal access, and calling.
  • the method for protecting a dex file in the Android system of the present invention is not decompiled, and the dex file is loaded into the inaccessible memory by a reference method, thereby ensuring that the program core file is not copied, analyzed, moved, or at runtime. Change, great protection of the security of the program; at execution time, by reference, the decompiler can not find the dex file and can not reverse engineering, from the operating system level, further strengthen the security level of the Android system application. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Technology Law (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)
  • Storage Device Security (AREA)

Abstract

本发明提供一种Android系统中保护dex文件不被反编译的方法,包括以下内容:1)将dex文件加载于Android系统的不可访问内存中;2)在执行时,通过引用执行,使得无法找到dex文件。本发明的Android系统中保护dex文件不被反编译的方法,通过引用方法将dex文件加载于不可访问内存中,拒绝将dex文件下载于本地以复制传播;在执行时,通过引用执行,让反编译人员无法找到dex文件而无法进行逆向工程,从而保护Android程序不被反编译。

Description

Android系统中保护dex文件不被反编译的方法 技术领域
本发明涉及Android系统中dex文件反编译的技术领域,特别是涉及一种Android系统中保护dex文件不被反编译的方法。
背景技术
Android是一种基于Linux的自由及开放源代码的操作系统,主要使用于移动设备,如智能手机和平板电脑,由Google公司和开放手机联盟领导及开发。目前,Android程序的发展如火如荼,由于其开源性,开发商免交了高额的专利费用,可以更好的融合世界上先进芯片厂商、软件厂商参与其中。
由于Android的应用程序上层是使用Java语言编写的。为了绕过oracle(Java)虚拟机授权,Android系统自己开发了一套Dalvik虚拟机。Dalvik虚拟机是一种完全不同于经典Java虚拟机的虚拟机机制,由Google开发,并专门针对移动操作系统(尤其是Android平台)的特性进行了优化。Dalvik虚拟机通过一个叫做dx的转换工具,可以将传统的Java虚拟机中的字节码文件(.class格式文件)转换为在Dalvik虚拟机中运行的字节码文件(dex格式)。dex文件的指令码就是Dalvik虚拟机专有的一套指令集,专门为嵌入式系统优化过。相比标准Java的.class文件,dex文件具有体积小、运行效率高的优点。
Java字节码文件由一个或者多个.class文件组成(每个文件包含一个类)。如图1所示,在运行时,Java虚拟机会动态地从各个.class文件中将字节码加载到内存中。而Dalvik字节码文件只由一个.dex文件构成,这个文件里包含了应用程序需要的所有类;在Java编译器生成了Java字节码后,Dalvik dx编译器会删除所有的.class文件,并将Java字节码重新编译为Dalvik字节码。
现有的Java是一种跨平台的、解释型语言。Java编译工具将Java源代码编译成Java字节码文件。由Java虚拟机负责对Java字节码文件进行解释执行。与本地目标代码不同,Java字节码文件中仍然保留了方法名称、变量名称,并且通过这些名称来访问变量和方法,这些符号往往带有许多语义信息。因此,对Java字节码文件进行反编译就显得比较容易。有许多Java的反编译工具都能够根据Java字节码文件生成高质量的源代码。
为阻止对Java字节码文件进行反编译,现有技术所采用的方法包括如下步骤:
(1)对要发布的Java字节码文件进行加密;
(2)用Java虚拟机工具接口监听其初始化事件;
(3)为Java虚拟机初始化事件指定Hook函数;
(4)Java虚拟机初始化完成时自动调用Hook函数,并在Hook函数中使用Java本地接口将Java虚拟机在生成类对象时调用的函数注册为自定义的代理函数;
(5)Java虚拟机在生成某个类对象时调用自定义的代理函数,在自定义的代理函数中对加密过的Java字节码文件进行解密处理;
(6)将解密后的Java字节码文件生成相应的类对象后返回给Java虚拟机。
然而,上述技术主要是针对Java平台、针对Java标准虚拟机实现的技术,其在智能终端Android移动研究领域,有着明显的不足。这是因为Android系统开发的应用程序,虽然使用Java语言书写的,但其运行环境不是传统意义的Java虚拟机,而是自己开发的Dalvik虚拟机设备,有着自己的堆栈与编译环境。
现有技术中的Java技术主要采用以下几种方式来保护Java字节码不被反编译:
(1)隔离程序
将关键的代码放服务器,通过远程访问方式获得服务,使得无法破译程序代码。
(2)代码混淆
通过将定义的类、变量、方法和包的名字改为无意义的字或符串,使用非法的字符代替变量符号,以及在软件中添加一些无关的指令或永远执行不到的指令等手段来增加反编译和对反编译后源代码阅读的难度。但该方法并不能真正阻止反编译,而且混淆都有一定规律可寻。
(3)转换本地代码
将Java程序像C/C++程序一样编译成本机可执行的二进制代码。但是,会使得Java程序失去其跨平台的特性,而且该技术目前并不十分成熟,因此不适用于大型应用程序。
(4)自定义类加载器
首先将Java字节码文件进行加密处理,然后自已编写一个Java类装载器,在Java字节码文件装载时再进行解密处理。但是,该方法的缺点在于虽然经过加密的Java字节码文件无法被反编译,但自定义的类加载器本身却不能防止被反编译。因此,加密过的Java字节码文件仍然是不安全的。
发明内容
鉴于以上所述现有技术的缺点,本发明的目的在于提供一种Android系统中保护dex文件不被反编译的方法,通过引用方法将dex文件加载于不可访问内存中,拒绝下载dex文件 于本地以复制传播;在执行时,通过引用执行,让反编译人员无法找到dex文件而无法进行逆向工程,从而保护Android程序不被反编译。
为实现上述目的及其他相关目的,本发明提供一种Android系统中保护dex文件不被反编译的方法,包括以下内容:1)将dex文件加载于Android系统的不可访问内存中;2)在执行时,通过引用执行,使得无法找到dex文件。
根据上述的Android系统中保护dex文件不被反编译的方法,其中:不可访问内存定义为一组没有任何可访问指针指向的由计算机程序进行动态分配的内存块。
根据上述的Android系统中保护dex文件不被反编译的方法,其中:述1)中,通过引用方法将dex文件加载于Android系统的不可访问内存中。
根据上述的Android系统中保护dex文件不被反编译的方法,其中:所述1)包括以下步骤:a、用户开启程序,程序向服务器发送加载请求,同时申请一段内存;b、服务器检查请求Android安装包对应的dex文件,生成一个新特征dex文件和一个reskey值,推送到到智能终端;c、智能终端将申请的内存加锁为不可用内存;d、智能终端生成一引用树,分别指向不同的资源块,不同资源块用偏移区分;e、Android系统加载新特征dex文件,并解析成字节码;f、引用定义使用reskey值生成新一个一次使用的引用值;g、加锁内存根据引用加载解析后字节码,使用引用的reskey值重新解析字节码成为可执行的dex字节码。
根据上述的Android系统中保护dex文件不被反编译的方法,其中:若不可访问内存被非法使用,则立即清除dex文件。
进一步地,根据上述的Android系统中保护dex文件不被反编译的方法,其中:所述非法使用包括复制、更改引用、移动、非法访问和调用。
进一步地,根据上述的Android系统中保护dex文件不被反编译的方法,其中:清除dex文件时,需清除不可用内存中该dex文件相关的所有数据和痕迹。
进一步地,根据上述的Android系统中保护dex文件不被反编译的方法,其中:当程序的dex文件被清除后,程序不能正常运行,需要使用重新下载安装。
根据上述的Android系统中保护dex文件不被反编译的方法,其中:所述Android系统中保护dex文件不被反编译的方法应用于使用Android操作系统的智能终端中。
进一步地,根据上述的Android系统中保护dex文件不被反编译的方法,其中:所述智能终端包括智能手机、平板电脑和PDA。
如上所述,本发明的Android系统中保护dex文件不被反编译的方法,具有以下有益效果:
(1)通过引用方法将dex文件加载于不可访问内存中,保证了程序核心文件不会在运行时被复制、分析、移动、更改,极大的保护程序的安全性;
(2)在执行时,通过引用执行,反编译人员无法找到dex文件而无法进行逆向工程,从操作系统层面,进一步加固了Android系统的应用程序的安全级别。
附图说明
图1显示为现有技术中Android系统中加载程序的示意图;
图2显示为本发明的Android系统中保护dex文件不被反编译的方法的流程图。
具体实施方式
以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。
需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。
在本发明的Android系统中保护dex文件不被反编译的方法中,首先需定义以下不可访问内存的概念:
不可访问内存
定义为一组没有任何可访问指针指向的由计算机程序进行动态分配的内存块。
通俗来说,不可访问内存是程序无法直接访问的动态内存,同时也无法通过指针指向一个可访问的起始对象来进行访问。
需要说明的是,本发明的Android系统中保护dex文件不被反编译的方法可应用于使用Android操作系统的智能终端中。其中,本发明中所涉及的智能终端包括并不限于智能手机、平板电脑、PDA,以及其他具有数据处理功能的终端设备。通常,智能终端是指具有独立的操作系统,可以由用户自行安装软件、游戏等第三方服务商提供的程序,通过此类程序来不断对手持设备的功能进行扩充,并可以通过移动通讯网络来实现无线网络接入的这样一类终端设备。
参照图2,本发明的Android系统中保护dex文件不被反编译的方法包括以下内容:
1)将dex文件加载于Android系统的不可访问内存中。
其中,通过引用方法将dex文件加载于Android系统的不可访问内存中。引用方法中采用一个指向文本中reskey值的索引表。该索引表只在程序执行时产生。加载一次dex文件时,需要一个相对应的reskey值。
具体地,包括以下步骤:
a、用户开启程序,程序向服务器发送加载请求,同时申请一段内存;
b、服务器检查请求Android安装包(AndroidPackage,APK)对应的dex文件,生成一个新特征dex文件和一个reskey值,推送到到智能终端;
c、智能终端将申请内存加锁为不可用内存;
d、智能终端生成一引用树,分别指向不同的资源块,不同资源块用偏移区分;
e、系统加载新特征dex文件,并解析成字节码;
f、引用定义使用reskey值生成新一个一次使用引用值;
g、加锁内存根据引用加载解析后的字节码,使用引用的reskey值重新解析字节码成为可执行的dex字节码。
该步骤相当于解锁内存,但实际加锁内存只提供解析完的dex字节码给Android虚拟机,这样防止分离,防破解内存步骤就实现了对外不可用。
2)在执行时,通过引用执行,使得无法找到dex文件。
优选地,还包括:若不可访问内存被非法使用,则立即清除dex文件。其中,非法使用包括但不限于复制、更改引用、移动、非法访问和调用。其中,清除dex文件时,需清除不可用内存中该dex文件相关的所有数据和痕迹,并上报不可访问内存的管理模块。当程序的dex文件被清除后,程序不能正常运行,需要使用重新下载安装。
利用本发明的Android系统中保护dex文件不被反编译的方法进行Android程序加载时,包括以下步骤:
a、安装并运行Android安装包(AndroidPackage,APK)。
具体地,智能终端通过在网络下载APK,并进行安装运行。
b、服务器根据请求加载dex、lib、xml等受保护文件到智能终端的不可访问内存。
c、不可访问内存的管理模块监控程序执行是否正常。
d、若不可用内存被非法使用,立即清除程序。其中,非法使用包括但不限于复制、更改引用、移动、非法访问和调用。
其中,清除程序时,需清除不可用内存所有数据和痕迹,并上报不可访问内存的管理模块。当程序的dex、xml等重要数据被清除后,程序不能正常运行,需要使用重新下载安装。
综上所述,本发明的Android系统中保护dex文件不被反编译的方法通过引用方法将dex文件加载于不可访问内存中,保证了程序核心文件不会在运行时被复制、分析、移动、更改,极大的保护程序的安全性;在执行时,通过引用执行,反编译人员无法找到dex文件而无法进行逆向工程,从操作系统层面,进一步加固了Android系统的应用程序的安全级别。所以,本发明有效克服了现有技术中的种种缺点而具高度产业利用价值。
上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。

Claims (10)

  1. 一种Android系统中保护dex文件不被反编译的方法,其特征在于:包括以下内容:
    1)将dex文件加载于Android系统的不可访问内存中;
    2)在执行时,通过引用执行,使得无法找到dex文件。
  2. 根据权利要求1所述的Android系统中保护dex文件不被反编译的方法,其特征在于:不可访问内存定义为一组没有任何可访问指针指向的由计算机程序进行动态分配的内存块。
  3. 根据权利要求1所述的Android系统中保护dex文件不被反编译的方法,其特征在于:所述1)中,通过引用方法将dex文件加载于Android系统的不可访问内存中。
  4. 根据权利要求1所述的Android系统中保护dex文件不被反编译的方法,其特征在于:所述1)包括以下步骤:
    a、用户开启程序,程序向服务器发送加载请求,同时申请一段内存;
    b、服务器检查请求Android安装包对应的dex文件,生成一个新特征dex文件和一个reskey值,推送到到智能终端;
    c、智能终端将申请内存加锁为不可用内存;
    d、智能终端生成一引用树,分别指向不同的资源块,不同资源块用偏移区分;
    e、Android系统加载新特征dex文件,并解析成字节码;
    f、引用定义使用reskey值生成新一个一次使用的引用值;
    g、加锁内存根据引用加载解析后字节码,使用引用的reskey值重新解析字节码成为可执行的dex字节码。
  5. 根据权利要求1所述的Android系统中保护dex文件不被反编译的方法,其特征在于:若不可访问内存被非法使用,则立即清除dex文件。
  6. 根据权利要求4所述的Android系统中保护dex文件不被反编译的方法,其特征在于:所述非法使用包括复制、更改引用、移动、非法访问和调用。
  7. 根据权利要求4所述的Android系统中保护dex文件不被反编译的方法,其特征在于:清除dex文件时,需清除不可用内存中该dex文件相关的所有数据和痕迹。
  8. 根据权利要求4所述的Android系统中保护dex文件不被反编译的方法,其特征在于:当程序的dex文件被清除后,程序不能正常运行,需要使用重新下载安装。
  9. 根据权利要求1所述的Android系统中保护dex文件不被反编译的方法,其特征在于:所述Android系统中保护dex文件不被反编译的方法应用于使用Android操作系统的智能终端中。
  10. 根据权利要求9所述的Android系统中保护dex文件不被反编译的方法,其特征在于:所述智能终端包括智能手机、平板电脑和PDA。
PCT/CN2015/095200 2015-06-25 2015-11-20 Android系统中保护dex文件不被反编译的方法 WO2016206297A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15896181.3A EP3296906A4 (en) 2015-06-25 2015-11-20 Method for protecting dex file from being decompiled in android system
US15/575,815 US20180129794A1 (en) 2015-06-25 2015-11-20 Method for Protecting Dex File from Decompilation in Android System

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510359041.4A CN105046116B (zh) 2015-06-25 2015-06-25 Android系统中保护dex文件不被反编译的方法
CN201510359041.4 2015-06-25

Publications (1)

Publication Number Publication Date
WO2016206297A1 true WO2016206297A1 (zh) 2016-12-29

Family

ID=54452656

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095200 WO2016206297A1 (zh) 2015-06-25 2015-11-20 Android系统中保护dex文件不被反编译的方法

Country Status (4)

Country Link
US (1) US20180129794A1 (zh)
EP (1) EP3296906A4 (zh)
CN (1) CN105046116B (zh)
WO (1) WO2016206297A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934461A (zh) * 2021-09-26 2022-01-14 厦门亿联网络技术股份有限公司 一种基于dex的安卓系统格式化方法及其装置
CN114968278A (zh) * 2021-02-24 2022-08-30 Oppo广东移动通信有限公司 应用程序的安装方法和装置、电子设备、可读存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105046116B (zh) * 2015-06-25 2018-07-31 上海斐讯数据通信技术有限公司 Android系统中保护dex文件不被反编译的方法
CN106203120B (zh) * 2016-07-15 2019-03-05 北京邮电大学 一种针对Android加固应用的多点Hook逆向方法
CN106648965A (zh) * 2016-10-13 2017-05-10 安徽鼎集信息科技有限公司 一种实时文件备份系统
CN106843919B (zh) * 2016-12-12 2021-02-23 北京奇虎科技有限公司 一种dex文件的存储方法和装置
CN107977553B (zh) * 2017-12-25 2020-07-10 中国电子产品可靠性与环境试验研究所 移动应用程序的安全加固的方法及装置
CN108846264A (zh) * 2018-06-11 2018-11-20 北京奇虎科技有限公司 代码加固方法、装置、智能终端和计算机可读存储介质
CN111181898A (zh) * 2018-11-13 2020-05-19 中国石油化工股份有限公司 基于后台服务器、app客户端的数据安全防护方法
CN110806906B (zh) * 2019-10-30 2022-04-12 腾讯科技(深圳)有限公司 一种Dex分包方法、装置、设备及介质
CN111581639B (zh) * 2020-03-27 2022-10-14 北京大学 一种Android加壳应用程序通用自动化脱壳方法及系统
CN112115430A (zh) * 2020-09-03 2020-12-22 深圳创维-Rgb电子有限公司 一种apk的加固方法、电子设备及存储介质
CN118092920A (zh) * 2022-11-25 2024-05-28 蔚来移动科技有限公司 一种插件安装的优化方法及控制装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181974A1 (en) * 2012-12-25 2014-06-26 Kaspersky Lab Zao System and Method for Detecting Malware Using Isolated Environment
CN104318135A (zh) * 2014-10-27 2015-01-28 中国科学院信息工程研究所 一种基于可信执行环境的Java代码安全动态载入方法
CN104462959A (zh) * 2014-12-04 2015-03-25 北京奇虎科技有限公司 一种安卓应用的加固保护方法、服务器和系统
CN105046116A (zh) * 2015-06-25 2015-11-11 上海斐讯数据通信技术有限公司 Android系统中保护dex文件不被反编译的方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999622A (en) * 1995-11-22 1999-12-07 Microsoft Corporation Method and apparatus for protecting widely distributed digital information
US7000119B1 (en) * 2000-04-20 2006-02-14 Realnetworks, Inc. Instruction/data protection employing derived obscuring instruction/data
US7503049B2 (en) * 2003-05-29 2009-03-10 Panasonic Corporation Information processing apparatus operable to switch operating systems
US7694151B1 (en) * 2003-11-20 2010-04-06 Johnson Richard C Architecture, system, and method for operating on encrypted and/or hidden information
CN100504897C (zh) * 2006-02-20 2009-06-24 联想(北京)有限公司 一种启动受保护分区的方法
ES2755780T3 (es) * 2011-09-16 2020-04-23 Veracode Inc Análisis estático y de comportamiento automatizado mediante la utilización de un espacio aislado instrumentado y clasificación de aprendizaje automático para seguridad móvil
US8892876B1 (en) * 2012-04-20 2014-11-18 Trend Micro Incorporated Secured application package files for mobile computing devices
GB2515047B (en) * 2013-06-12 2021-02-10 Advanced Risc Mach Ltd Security protection of software libraries in a data processing apparatus
KR101518420B1 (ko) * 2014-11-11 2015-05-07 주식회사 에스이웍스 안드로이드 플랫폼에서의 apk 파일 관리 장치 및 방법
EP3057019A1 (en) * 2015-02-13 2016-08-17 Thomson Licensing Method and device for protecting an application and method and device for executing a protected application thus protected

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181974A1 (en) * 2012-12-25 2014-06-26 Kaspersky Lab Zao System and Method for Detecting Malware Using Isolated Environment
CN104318135A (zh) * 2014-10-27 2015-01-28 中国科学院信息工程研究所 一种基于可信执行环境的Java代码安全动态载入方法
CN104462959A (zh) * 2014-12-04 2015-03-25 北京奇虎科技有限公司 一种安卓应用的加固保护方法、服务器和系统
CN105046116A (zh) * 2015-06-25 2015-11-11 上海斐讯数据通信技术有限公司 Android系统中保护dex文件不被反编译的方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3296906A4 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968278A (zh) * 2021-02-24 2022-08-30 Oppo广东移动通信有限公司 应用程序的安装方法和装置、电子设备、可读存储介质
CN113934461A (zh) * 2021-09-26 2022-01-14 厦门亿联网络技术股份有限公司 一种基于dex的安卓系统格式化方法及其装置
CN113934461B (zh) * 2021-09-26 2023-10-13 厦门亿联网络技术股份有限公司 一种基于dex的安卓系统格式化方法及其装置

Also Published As

Publication number Publication date
CN105046116A (zh) 2015-11-11
EP3296906A4 (en) 2018-05-23
EP3296906A1 (en) 2018-03-21
CN105046116B (zh) 2018-07-31
US20180129794A1 (en) 2018-05-10

Similar Documents

Publication Publication Date Title
WO2016206297A1 (zh) Android系统中保护dex文件不被反编译的方法
TWI648648B (zh) 安卓平台上可執行程式的保護方法
WO2016078130A1 (zh) 一种防逆向apk文件的动态加载方法
JP6227772B2 (ja) 動的ライブラリを保護する方法及び装置
EP2962193B1 (en) Compiler based obfuscation
CN103914637B (zh) 一种安卓平台的可执行程序加密方法
EP2897073B1 (en) Device for obfuscating application code and method for same
CN102831342B (zh) 一种提高安卓系统中应用程序保护强度的方法
CN111552931A (zh) java代码的加壳方法与系统
US8090959B2 (en) Method and apparatus for protecting .net programs
CN102043932A (zh) 一种防止Java程序被反编译的方法
CN101997912A (zh) 基于Android平台的强制访问控制装置及控制方法
WO2013170724A1 (zh) 安卓系统中java应用程序的保护方法
CN103902859A (zh) 基于JAVA下hook技术的代码保护方法及系统
BRPI0614089A2 (pt) método para evitar engenharia reversa de software, modificação não autorizada e interceptação de dados de tempo de execução
CN103745141A (zh) 智能终端android系统中防止应用程序反编译的方法
WO2022078366A1 (zh) 应用保护方法、装置、设备及介质
WO2015154436A1 (zh) 一种数据处理方法及装置
CN111045746B (zh) 代码扩展方法和框架
CN103885784A (zh) 具有安全模块可插拔功能的Android平台构建方法
WO2015058639A1 (zh) 一种应用程序保护系统和方法
CN116910712A (zh) 代码保护方法、系统、电子设备及存储介质
Lim et al. Protecting Android Applications with Multiple DEX Files Against Static Reverse Engineering Attacks.
CN112559980B (zh) 一种可内嵌众多任意app的小程序运行时
CN104751026A (zh) 安卓系统的软件保护方法、软件应用方法及相关装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15896181

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15575815

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2015896181

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE