WO2016201853A1 - 加解密功能的实现方法、装置及服务器 - Google Patents
加解密功能的实现方法、装置及服务器 Download PDFInfo
- Publication number
- WO2016201853A1 WO2016201853A1 PCT/CN2015/092988 CN2015092988W WO2016201853A1 WO 2016201853 A1 WO2016201853 A1 WO 2016201853A1 CN 2015092988 W CN2015092988 W CN 2015092988W WO 2016201853 A1 WO2016201853 A1 WO 2016201853A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- code
- smali
- class
- custom
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000006870 function Effects 0.000 claims description 32
- 238000002347 injection Methods 0.000 claims description 24
- 239000007924 injection Substances 0.000 claims description 24
- 230000000694 effects Effects 0.000 claims description 16
- 238000009434 installation Methods 0.000 claims description 4
- 238000012423 maintenance Methods 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 7
- 239000000243 solution Substances 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000012858 packaging process Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000002787 reinforcement Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/55—Detecting local intrusion or implementing counter-measures
- G06F21/56—Computer malware detection or handling, e.g. anti-virus arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/121—Restricting unauthorised execution of programs
- G06F21/125—Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2107—File encryption
Definitions
- the present invention relates to the field of communications, and in particular, to a method, an apparatus, and a server for implementing an encryption and decryption function.
- enterprise mobile applications occupy an increasingly important position in the daily work of enterprises, and the demand for mobile office is becoming more and more common.
- Enterprise mobile applications are different from ordinary mobile applications (Apps).
- enterprise applications are more diversified and personalized, such as access control for core systems, and enterprise users tend to be more value-chain solutions. Since there is no unified standard planning at the beginning of enterprise mobile application development, many enterprises have a large number of isolated mobile applications. How to flexibly and conveniently add new capabilities to mobile applications to adapt to the changing needs of enterprises becomes more difficult.
- the present invention provides a method, an apparatus, and a server for implementing an encryption and decryption function.
- a method for implementing an encryption and decryption function including: decompiling an Android installation package (Android Package, referred to as an APK) file, and obtaining smali (a JAVA virtual machine of an Android system) a register language) file used by Dalvik; replacing the code for performing an input/output (I/O) operation in the smali file with a custom code, wherein the custom code is used to perform I/O Operation and encryption and decryption of the I/O data; compiling and signing the replaced smali file to obtain a new APK file.
- Android Package Android Package
- smali a JAVA virtual machine of an Android system
- register language used by Dalvik
- replacing the code for performing an I/O operation in the smali file with the customized code includes: replacing a class in the smali file for performing an I/O operation with a custom class, where The class for performing an I/O operation includes at least one of the following: a file output stream FileOutputStream, a file input stream FileInputStream, a file read FileReader, a file write FileWriter, a random access file RandomAccessFile, and the like.
- replacing the class in the smali file for performing an I/O operation with a customized class includes: determining a class used in the smali file to perform an I/O operation; The class used by the smali file to perform I/O operations is replaced with a custom class.
- the method before replacing the class for performing the I/O operation in the smali file with the customized class, the method further includes: parsing the Android list AndroidManifest.xml file of the APK file to obtain the original package. Name, wherein the original package name is used for positioning of the smali file location when the injection replacement is performed.
- the method further includes: acquiring information of an application application of the APK file; where the APK file inherits from a subclass of the Application class. , the custom Application subclass smali code is injected into the Application subclass code of the smali file itself; in the case that the APK file does not inherit from the Application subclass, add Android: Android name in AndroidManifes.xml: The attribute of name, where the value of the attribute is the full name of the custom Application subclass.
- the method further includes: replacing a parent class in the smali file that inherits from the activity activity subclass into a custom Activity subclass base activity BaseActivity .
- the method further includes: adding, in the AndroidManifest.xml, the instruction to perform the code injection replacement operation. mark.
- an apparatus for implementing an encryption and decryption function including: a decompilation module configured to decompile an APK file to obtain a smali file; and a replacement module configured to set the smali
- the code for performing input/output I/O operations in the file is replaced with a custom code for performing I/O operations and encrypting and decrypting I/O data; compiling the module , set to compile and sign the replaced smali file to get a new APK file.
- a server including: the device for implementing the encryption and decryption function; wherein the server further includes: a first obtaining device, configured to acquire the APK file; Device, set to provide the new APK file.
- the server further includes: a second obtaining device, configured to obtain a keystore that signs the new APK file.
- the APK file is decompiled to obtain the smali file; the code for performing the input/output I/O operation in the smali file is replaced with the customized code, wherein the customized code is used for execution. I/O operation and encryption and decryption of I/O data; compiling and signing the replaced smali file to obtain a new APK file, which solves the problem that the application without source code can no longer add new decryption function. Problem, reducing the maintenance cost of the application.
- FIG. 1 is a flowchart of a method for implementing an encryption and decryption function according to an embodiment of the present invention
- FIG. 2 is a schematic structural diagram of an apparatus for implementing an encryption and decryption function according to an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a server according to an embodiment of the present invention.
- FIG. 4 is a flow chart 1 of a package injection code in accordance with an alternative embodiment of the present invention.
- FIG. 5 is a flow chart 2 of a package injection code in accordance with an alternate embodiment of the present invention.
- FIG. 1 is a flowchart of a method for implementing an encryption and decryption function according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
- Step S102 decompiling the APK file to obtain a smali file
- Step S104 replacing the code for performing the I/O operation in the smali file with the customized code, wherein the customized code is used to perform the I/O operation and perform the encryption and decryption operation on the data of the I/O;
- step S106 the replaced smali file is compiled and signed to obtain a new APK file.
- the code for the I/O operation in the smali file is replaced with the custom code that can also perform the encryption and decryption operation, thereby realizing the I/O data of the APK file without the source code of the APK file.
- the encryption and decryption solves the problem that the application without the source code can no longer add the decryption function, which reduces the maintenance cost of the application and also improves the security of the application.
- smali refers to the assembly language of a .dex format file used by the Java virtual machine (Dalvik) in Android system; the smali file is the file obtained by decompiling the APK file via a disassembler (such as Baksmali). The contents of the smali file are described by the smali language.
- the class used to perform the I/O operation in the decompiled smali file may be replaced with a custom class, where the class for performing the I/O operation Including but not limited to at least one of the following: FileOutputStream, FileInputStream, FileReader, FileWriter, RandomAccessFile, and so on.
- class substitution when class substitution is performed, adaptive modifications can be made to related files, such as Application subclass and Activity sub. Classes, etc.
- the I/O operation used may be all I/O operations, or may be one of the I/O operations, in order to avoid unnecessary class replacement and avoid replacement.
- the problem of the increase of the APK file caused by the necessary classes When replacing the class used to perform I/O operations in the smali file with a custom class, you can first determine the smali file used for decompilation. Class and code that performs I/O operations; then replaces the class used by the smali file to perform I/O operations with a custom class. For classes that are not used in the APK file, you can not replace them.
- the method may further include: parsing an AndroidManifest.xml file obtained by decompiling the APK file to obtain an original package name, wherein the original package name is used for positioning the class file location when performing class replacement. .
- the method may further include: acquiring an Application information of the APK file; and if the APK file has a subclass that inherits from the Application, the customized Application sub is The class code is injected into the Application subclass code of the smali file; in the case that the APK file does not inherit from the subclass of Application, the android:name attribute is added in AndroidManifes.xml, where the value of the attribute is a custom Application sub The full name of the class.
- the method may further include: replacing the parent class of the Activity subclass in the smali file with a custom Activity subclass BaseActivity.
- the Activity subclass can extend the services or functions that need to be executed. For example, you can start a custom service in the Activity subclass, or get the encryption and decryption key function from the server.
- an apparatus for implementing the encryption and decryption function is also provided, which is used to implement the foregoing embodiment and the optional implementation manner.
- the descriptions of the modules involved in the apparatus are described below.
- the term "module” may implement a combination of software and/or hardware of a predetermined function.
- the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- the apparatus includes: a decompilation module 22, a replacement module 24, and a compilation module 26, wherein the decompilation module 22 is configured.
- the replacement module 24, coupled to the decompilation module 22, is set to replace the code used to perform the I/O operation in the smali file with the custom code, where the custom The code is used to perform I/O operations and to encrypt and decrypt the I/O data;
- the compiling module 26, coupled to the replacement module 24, is configured to compile and sign the replaced smali file to obtain a new APK file.
- the replacement module 24 is arranged to replace the class in the smali file for performing the I/O operation with a custom class, wherein the class for performing the I/O operation includes but is not limited to at least one of the following: FileOutputStream , FileInputStream, FileReader, FileWriter, RandomAccessFile, etc.
- the replacement module 24 includes: a determining unit 242 configured to determine a class used by the smali file to perform an I/O operation; a replacement unit 244 coupled to the determining unit 242, configured to use the smali file The class used to perform I/O operations is replaced with a custom class.
- the device further includes: a parsing module, coupled between the decompilation module 22 and the replacement module 24, configured to parse the AndroidManifest.xml file obtained by decompiling the APK file, to obtain an original package name, where the original package name Used to locate the class file location when doing class substitution.
- a parsing module coupled between the decompilation module 22 and the replacement module 24, configured to parse the AndroidManifest.xml file obtained by decompiling the APK file, to obtain an original package name, where the original package name Used to locate the class file location when doing class substitution.
- the device further includes: an obtaining module, coupled to the parsing module, configured to obtain information of an Application of the decompiled APK file; and a processing module coupled to the obtaining module, configured to inherit from the Application class in the APK file
- an obtaining module coupled to the parsing module, configured to obtain information of an Application of the decompiled APK file
- a processing module coupled to the obtaining module, configured to inherit from the Application class in the APK file
- the custom Application subclass code is injected into the Application subclass smali code of the APK file; and/or, in the case where the APK file does not inherit from the Subclass of Application, it is added in AndroidManifes.xml.
- the device further includes a second replacement module, coupled to the parsing module, configured to replace the parent class of the Activity subclass in the decompiled smali file with a custom Activity subclass.
- a second replacement module coupled to the parsing module, configured to replace the parent class of the Activity subclass in the decompiled smali file with a custom Activity subclass.
- the apparatus further comprises: an injection module coupled between the replacement module 24 and the compilation module 26, configured to add a flag in the AndroidManifest.xml for indicating that the code replacement operation has been performed.
- An embodiment of the present invention further provides a server.
- the user can upload the APK file through the interface provided by the server (for example, the portal website), and after the APK file is processed by the server, the user downloads the new APK file.
- the server for example, the portal website
- the server includes the above-mentioned encryption and decryption function implementation device 32.
- the server further includes: a first acquisition device 34 coupled to the encryption and decryption function.
- the implementation device 32 is configured to acquire an APK file;
- the providing device 36 is coupled to the encryption/decryption implementation device 32 and configured to provide a new APK file for the user to download.
- the first obtaining device 34 acquires the APK file through an Internet or a local area network.
- the server further includes: a second obtaining device, configured to obtain a keystore of the signed new APK file.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- An optional embodiment of the present invention provides a method and apparatus for encrypting and decrypting an enterprise mobile application file.
- the optional embodiment relates to a field of smali code injection technology and terminal application development of an Android application, for example.
- the smali code injection method is added to the enterprise mobile application to add and write encryption and decryption files.
- the following technical solutions are adopted:
- the user logs in to the portal using the username and password, uploads the application to be packaged, selects the encryption and decryption package to perform related configuration, and automatically packages and injects it in the background. After the package is successfully downloaded, the user can use the function of reading, writing, decrypting and decrypting files. application.
- the packaging process includes the following process: determining whether the uploaded application is an APK file, and whether the application has been added with encryption and decryption functions. If it is not a valid APK file or has added encryption and decryption functions, the packaging process is exited. After checking, decompile the uploaded app.
- Analyze the decompiled AndroidManifest.xml file record the startup Activity, package name and other information, analyze the decompiled smali code to see if there is any injection, if there is an injection, modify the original APK file smali code to inject, And copy the relevant files used for encryption and decryption to the corresponding folder, such as .so file, injected smali file, etc., and modify the related items of AndroidManifest.xml file, and finally recompile and sign the application that has been injected with read/write encryption and decryption code. .
- the code runs to the place where the file needs to be written, such as calling the related method of the FileOutputStream class. Because of the injected code, the FileOutputStream class is replaced with a custom class with encryption function (in this embodiment) For MyFileOutputStream), the related method in MyFileOutputStream is actually called to complete the operation of writing ciphertext.
- the application runs to the place where you need to read the file, similar to writing a file, the code actually running is the code with the function of reading ciphertext after injection.
- the class to be injected may be dynamically selected according to the parsing of the original APK smali code, and will not be All rewritten classes with encryption and decryption are copied to it.
- the original APK file only uses FileOutputStream and FileInputStream.
- the system only needs to inject the custom FileOutputStream and the custom FileInputStream class without injecting the custom FileReader, etc., which not only improves the performance of the injection, but also prevents the injection. After the APK file is too large.
- the packaging process is shown in Figure 4.
- the original APK file is decompiled into a directory, then the decompiled file is copied to a target directory, then the smali code of the original APK file is parsed, the injection point is recorded, and the injection is injected.
- Copy the required smali file into the target directory modify the smali of the original APK file to achieve injection, including processing AndroidManifetste.xml, finally run apktool to mark the target directory as an APK file, and finally sign the regenerated APK file to get An APK file that is infused with encryption and decryption code.
- Step S501 determining whether the APK file to be packaged has been injected with the same code, and in the process, it can also determine whether the APK file is a real APK file, and if it is a real APK file and has not injected the same code, Go to step S502, otherwise exit.
- Step S502 Decompile the APK file to be injected into the specified directory. If successful, execute step S503, otherwise exit.
- Step S503 Detect whether the target directory contains a .so file, and if the .so file gives a prompt "The application contains a so library, the file encryption and decryption reinforcement has an unpredictable risk, whether to continue", if yes, proceed to step S504, otherwise exit .
- Step S504 Parse and analyze the smali code of the original APK file to find out whether there is a file I/O operation. If yes, proceed to step S505. Otherwise, the original APK file has no injection point, and no injection or exit is required.
- Step S505 copy the decompiled file and inject the required file to the target folder.
- Step S506 Parsing the AndroidManifest.xml file of the original APK file to obtain the original package name.
- Step S507 Acquire information of the Application of the original APK file. If the original APK file has a subclass that inherits from Application, then the custom class code is injected into the original Application subclass smali code. If it does not inherit from the Application subclass, modify AndroidManifes.xml to add the android:name attribute. The value is the full name of the custom Application subclass.
- Step S508 Inject a custom BaseActivity, and replace the parent class of the Activity subclass in all the original APK files with the BaseActivity.
- Step S509 Injecting the smali code of the read/write encryption and decryption, and replacing the code of the original I/O operation with the encrypted and decrypted code.
- Step S510 processing the icon of the original APK file, plus the mark of the package, as the difference from the original APK file.
- Step S511 processing other contents of the AndroidManifest.xml, such as adding a mark injected into the encryption and decryption code, adding a missing permission (permission) and the like.
- Step S512 The APK tool (apktool) is called to compile the target folder. If the tool is successfully built, an APK file that is not signed after the injection code is generated, and if it fails, the object is exited.
- Step S513 Call the jar signer (jarsigner) to sign the APK file generated in the previous step.
- Step S514 Copy the signed APK file to the specified directory, and the process ends.
- the decompilation process uses the apktool, and the steps S505 to S509 are processing the contents of the AndroidManifest.xml, injecting the relevant smali code.
- the APK file generated by the package uses the jarsigner signature, and the signed keystore can be uploaded through the portal. If there is no Application in the original APK file, the injected code will be used. If there is, the smali code about the encryption and decryption will be injected at the end of the original Application, so that the original code will be executed before the packaged APK file starts. The code completes the initialization work.
- the smali files used for injection can be implemented by different encryption methods, and each algorithm represents an encryption and decryption scheme. It can be seen from the above description that the encryption and decryption scheme can be flexibly replaced in the optional embodiment of the present invention, and the original architecture does not need to be changed.
- the above embodiments and optional embodiments of the present invention can provide the mobile application with the ability to read and decrypt files by means of code injection without obtaining the original APK file source code, thereby being flexible and convenient. Customize and transform existing enterprise mobile applications to increase the security of application data.
- a storage medium is further provided, wherein the software includes the above-mentioned software, including but not limited to: an optical disk, a floppy disk, a hard disk, an erasable memory, and the like.
- the embodiment of the present invention solves the problem that the decryption function cannot be newly added to the application without the source code, and the maintenance cost of the application is reduced.
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Technology Law (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Virology (AREA)
- Stored Programmes (AREA)
- Storage Device Security (AREA)
Abstract
本发明提供了一种加解密功能的实现方法、装置及服务器,其中,该方法包括:对APK文件进行反编译,得到smali文件;将smali文件中用于执行I/O操作的代码替换为自定义的代码,其中,自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;对替换过的smali文件进行编译并签名,得到新的APK文件。通过本发明,解决了对于没有源代码的应用无法再新增加解密功能的问题,减少了应用的维护成本。
Description
本发明涉及通信领域,具体而言,涉及一种加解密功能的实现方法、装置及服务器。
目前企业的信息技术(IT)建设向移动终端发展,企业移动应用在企业的日常工作中占据越来越重要的位置,其中移动办公等需求越来越普遍。企业移动应用不同于普通的手机应用程序(App),首先企业应用的多样化和个性化需求较强,比如对于核心系统的访问控制等,另外企业用户更加的趋向于全价值链的解决方案。由于企业移动应用发展之初没有统一标准的规划,很多的企业存在大量孤立遗留的移动应用,怎样灵活方便的为移动应用增加新的能力以适应企业多变的需求变的更加困难。
企业很多的移动应用相关的开发人员已经很难找到,代码维护也很少。如果重新修改源码来增加某些能力,如为原来的应用增加读写加解密文件的功能等,不仅对不熟悉代码的人来说比较困难,而且会给企业带来更大的成本。
目前很多的移动应用加解密是直接在应用的源代码级采用各种加密算法来保证数据的安全,对于没有源代码的应用无能为力。
针对相关技术中对于没有源代码的应用无法再新增加解密功能的问题,目前尚未提出有效的解决方案。
发明内容
为了解决上述技术问题,本发明提供了一种加解密功能的实现方法、装置及服务器。
根据本发明实施例的一个方面,提供了一种加解密功能的实现方法,包括:对安卓安装包(Android Package,简称为APK)文件进行反编译,得到smali(一种安卓系统的JAVA虚拟机Dalvik所使用的寄存器语言)文件;将所述smali文件中用于执行输入/输出(I/O)操作的代码替换为自定义的代码,其中,所述自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;对替换过的所述smali文件进行编译并签名,得到新的APK文件。
可选地,将所述smali文件中用于执行I/O操作的代码替换为自定义的代码包括:将所述smali文件中用于执行I/O操作的类替换为自定义的类,其中,所述用于执行I/O操作的类包括以下至少之一:文件输出流FileOutputStream、文件输入流FileInputStream、文件读FileReader、文件写FileWriter、随机接入文件RandomAccessFile等。
可选地,将所述smali文件中用于执行I/O操作的类替换为自定义的类包括:确定所述smali文件中所使用到的用于执行I/O操作的类;将所述smali文件所使用到的用于执行I/O操作的类替换为自定义的类。
可选地,在将所述smali文件中用于执行I/O操作的类替换为自定义的类之前,所述方法还包括:解析所述APK文件的安卓清单AndroidManifest.xml文件,得到原始包名,其中,所述原始包名用于在进行注入替换时smali文件位置的定位。
可选地,在解析所述APK文件的AndroidManifest.xml文件之后,所述方法还包括:获取所述APK文件的应用Application的信息;在所述APK文件有继承自Application类的子类的情况下,将自定义的Application子类smali代码注入到所述smali文件本身的Application子类代码中;在所述APK文件没有继承自Application子类的情况下,在AndroidManifes.xml中添加安卓:名字android:name的属性,其中,所述属性的值是自定义的Application子类的完整名称。
可选地,在解析所述APK文件的AndroidManifest.xml文件之后,所述方法还包括:将所述smali文件中的继承自活动Activity子类的父类替换成自定义的Activity子类基础活动BaseActivity。
可选地,在将所述smali文件中用于执行I/O操作的代码替换为自定义的代码之后,所述方法还包括:在AndroidManifest.xml中增加用于指示进行过代码注入替换操作的标记。
根据本发明实施例的另一个方面,还提供了一种加解密功能的实现装置,包括:反编译模块,设置为对APK文件进行反编译,得到smali文件;替换模块,设置为将所述smali文件中用于执行输入/输出I/O操作的代码替换为自定义的代码,其中,所述自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;编译模块,设置为对替换过的所述smali文件进行编译并签名,得到新的APK文件。
根据本发明实施例的另一个方面,还提供了一种服务器,包括:上述的加解密功能的实现装置;其中,所述服务器还包括:第一获取装置,设置为获取所述APK文件;提供装置,设置为提供所述新的APK文件。
可选地,所述服务器还包括:第二获取装置,设置为获取签名所述新的APK文件的keystore。
通过本发明实施例,采用对APK文件进行反编译,得到smali文件;将smali文件中用于执行输入/输出I/O操作的代码替换为自定义的代码,其中,自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;对替换过的smali文件进行编译并签名,得到新的APK文件的方式,解决了对于没有源代码的应用无法再新增加解密功能的问题,减少了应用的维护成本。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的加解密功能的实现方法的流程图;
图2是根据本发明实施例的加解密功能的实现装置的结构示意图;
图3是根据本发明实施例的服务器的结构示意图;
图4是根据本发明可选实施例的打包注入代码的流程图一;
图5是根据本发明可选实施例的打包注入代码的流程图二。
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。
本发明实施例提供了一种加解密功能的实现方法,图1是根据本发明实施例的加解密功能的实现方法的流程图,如图1所示,该流程包括如下步骤:
步骤S102,对APK文件进行反编译,得到smali文件;
步骤S104,将smali文件中用于执行I/O操作的代码替换为自定义的代码,其中,自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;
步骤S106,对替换过的smali文件进行编译并签名,得到新的APK文件。
通过上述步骤,将smali文件中用于I/O操作的代码替换为还可以进行加解密操作的自定义的代码,从而在没有APK文件源码的情况下,实现了APK文件的I/O数据的加解密,解决了对于没有源代码的应用无法再新增加解密功能的问题,减少了应用的维护成本,同时也提升了应用的安全性。
其中,smali是指安卓系统里的Java虚拟机(Dalvik)所使用的一种.dex格式文件的汇编语言;smali文件即为经由反汇编器(例如Baksmali)对APK文件进行反编译而得到的文件,smali文件的内容由smali语言描述。
可选地,在实施过程中,在步骤S104中,可以将反编译得到的smali文件中用于执行I/O操作的类替换为自定义的类,其中,用于执行I/O操作的类包括但不限于以下至少之一:FileOutputStream、FileInputStream、、FileReader、FileWriter、RandomAccessFile等。此外,在进行类替换时,对于相关的文件可以进行适应性修改,例如Application子类和Activity子
类等。
可选地,对于一个应用而言,所使用到得I/O操作可能是全部I/O操作,也可能是其中的某一个I/O操作,为了避免不必要的类替换以及避免替换了不必要的类导致的APK文件增大的问题,在将smali文件中用于执行I/O操作的类替换为自定义的类时,可以先确定反编译所得到的smali文件所使用到的用于执行I/O操作的类及代码;然后将smali文件所使用到的用于执行I/O操作的类替换为自定义的类。对于APK文件中没有使用的类,可以不进行替换。
可选地,在步骤S104之前,方法还可以包括:解析对APK文件进行反编译得到的AndroidManifest.xml文件,得到原始包名,其中,原始包名用于在进行类替换时类文件位置的定位。
可选地,在解析反编译得到的AndroidManifest.xml文件之后,上述方法还可以包括:获取APK文件的Application的信息;在APK文件有继承自Application的子类的情况下,将自定义的Application子类代码注入到smali文件的Application子类代码中;在APK文件没有继承自Application的子类的情况下,在AndroidManifes.xml中添加android:name的属性,其中,属性的值是自定义的Application子类的完整名称。
可选地,在解析反编译得到的AndroidManifest.xml文件之后,上述方法还可以包括:将smali文件中的Activity子类的父类替换成自定义的Activity子类BaseActivity。其中,在Activity子类可以扩展需要执行的服务或者功能,例如,可以在Activity子类中启动自定义的服务,或者从服务器获取加解密密钥的功能等。
可选地,为了能对进行过代码注入的APK文件进行标识,在将smali文件中用于执行I/O操作的代码替换为自定义的代码之后,可以在AndroidManifest.xml中增加用于指示进行过代码替换操作的标记。
在本实施例中还提供了一种加解密功能的实现装置,用于实现上述实施例及可选实施方式,已经进行过说明的不再赘述,下面对该装置中涉及到的模块进行说明。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图2是根据本发明实施例的加解密功能的实现装置的结构示意图,如图2所示,该装置包括:反编译模块22、替换模块24和编译模块26,其中,反编译模块22,设置为对APK文件进行反编译,得到smali文件;替换模块24,耦合至反编译模块22,设置为将smali文件中用于执行I/O操作的代码替换为自定义的代码,其中,自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;编译模块26,耦合至替换模块24,设置为对替换过的smali文件进行编译并签名,得到新的APK文件。
可选地,替换模块24设置为将smali文件中用于执行I/O操作的类替换为自定义的类,其中,用于执行I/O操作的类包括但不限于以下至少之一:FileOutputStream、FileInputStream、、FileReader、FileWriter、RandomAccessFile等。
可选地,替换模块24包括:确定单元242,设置为确定smali文件所使用到的用于执行I/O操作的类;替换单元244,耦合至确定单元242,设置为将smali文件所使用到的用于执行I/O操作的类替换为自定义的类。
可选地,所述装置还包括:解析模块,耦合至反编译模块22和替换模块24之间,设置为解析反编译APK文件得到的AndroidManifest.xml文件,得到原始包名,其中,原始包名用于在进行类替换时类文件位置的定位。
可选地,所述装置还包括:获取模块,耦合至解析模块,设置为获取反编译得到的APK文件的Application的信息;处理模块,耦合至获取模块,设置为在APK文件有继承自Application类的子类情况下,将自定义的Application子类代码注入到APK文件的Application子类smali代码中;和/或,在APK文件没有继承自Application的子类的情况下,在AndroidManifes.xml中添加android:name的属性,其中,属性的值是自定义的Application子类的完整名称。
可选地,所述装置还包括第二替换模块,耦合至解析模块,设置为将反编译得到的smali文件中的Activity子类的父类替换成自定义的Activity子类。
可选地,所述装置还包括:注入模块,耦合至替换模块24和编译模块26之间,设置为在AndroidManifest.xml中增加用于指示进行过代码替换操作的标记。
本发明实施例还提供了一种服务器。为了向用户提供APK文件处理的服务,用户可以通过服务器提供的接口(例如门户网站)上传APK文件,在APK文件经过服务器处理后,再由用户下载新的APK文件。
图3是根据本发明实施例的服务器的结构示意图,如图3所示,该服务器包括上述的加解密功能的实现装置32;其中,服务器还包括:第一获取装置34,耦合至加解密功能的实现装置32,设置为获取APK文件;提供装置36,耦合至加解密功能的实现装置32,设置为提供新的APK文件,以供用户下载。
可选地,第一获取装置34是通过国际互联网络或者局域网络获取该APK文件的。
可选地,服务器还包括:第二获取装置,设置为获取签名新的APK文件的keystore。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
为了使本发明实施例的描述更加清楚,下面结合可选实施例进行描述和说明。
本发明可选实施例提供了一种企业移动应用文件加解密的方法和装置,该可选实施例涉及例如安卓(Android)应用的smali代码注入技术和终端应用的开发领域。
为了提供简单灵活的工具,在没有企业移动应用源码的情形下,通过smali代码注入的方式为企业移动应用增加读写加解密文件的能力,在本发明可选实施例中采用以下技术方案:
用户使用用户名和密码登录门户网站,上传所要打包的应用,选择加解密打包项进行相关的配置,后台自动打包注入,打包成功后下载,安装到手机上即可使用有读写加解密文件功能的应用。
其中的打包流程包括如下过程:判断上传的应用是不是APK文件,以及该应用是否已经增加过加解密功能,如果不是合法的APK文件或者已经增加过加解密功能,则退出打包流程。通过检查后,反编译上传的应用。分析反编译得到的AndroidManifest.xml文件,记录启动Activity、包名等信息,分析反编译得到的smali代码,看是否有注入的地方,如有注入的地方,修改原APK文件的smali代码进行注入,并拷贝加解密使用的相关文件到相应的文件夹,如.so文件,注入的smali文件等,并修改AndroidManifest.xml文件相关的项,最后重新编译并签名得到注入过读写加解密代码的应用。
被注入过加解密代码的APK文件具有读写加解密文件功能的原理如下:
1、由于修改了AndroidManifest.xml文件,注入了新的Application代码,应用刚启动会执行指定的Application子类中的代码,完成初始化等操作。
2、使用应用的过程中,代码运行到需要写文件的地方,如调用FileOutputStream类的相关方法,由于注入了代码,FileOutputStream类被替换成自定义的具有加密功能的类(在本实施例中记为MyFileOutputStream),实际上调用的是MyFileOutputStream中相关的方法,完成写入密文的操作。
3、应用运行到需要读文件的地方,与写文件类似,实际上运行的代码是注入后的具有读密文功能的代码。
4、实际上所有读写文件的I/O操作的代码都被替换成注入的代码,而注入的代码是继承原先java类库提供I/O的代码,加入了加解密的部分,这样原先只能读写明文的APK文件就具有了读写密文的功能。
另外,在一些可选的实施例中,由于java的I/O操作的类比较多,在注入的时候,可以根据原APK smali代码的解析,动态的选择所需要注入的类,而不会把所有重写的具有加解密功能的类都拷贝到其中去。比如,原APK文件只使用了FileOutputStream和FileInputStream,系统只需注入自定义的FileOutputStream和自定义的FileInputStream类,而不用把自定义的FileReader等注入进去,这样不仅可以提高注入的性能,还能防止注入后APK文件过大。
下面结合附图对smali代码注入实现增加读写加解密功能的技术方案的实施进行描述。
在浏览器中输入门户网站的网页地址(URL),输入用户名和密码,点击登录。从本地选择要上传打包的应用。上传成功后在应用列表中可以看到。选择应用,点击打包在弹出的页面中输入打包信息,描述,选择文件加解密打包项,点击打包,即可开始打包,打包过程可能会持续一段时间。打包成功后可以查看日志,并可以将打包后的应用下载到本地安装到手机终端上。
打包的流程如图4所示,先将原始的APK文件反编译到一个目录,再将反编译后的文件拷贝到一个目标目录,接着解析原APK文件的smali代码,记录注入点,并将注入所需要的smali文件拷入到目标目录,修改原APK文件的smali以实现注入,包括处理AndroidManifetste.xml,最后运行apktool将目标目录打成APK文件,最后对重新生成的APK文件进行签名即可得到注入了加解密代码的APK文件。
打包注入的可选流程如图5所示,描述如下:
步骤S501:判断要打包的APK文件是否已经注入过相同的代码,在这个过程中可还可以判断出APK文件是否是真正的APK文件,如果是真正的APK文件而且没有注入过相同的代码,则进行步骤S502,否则退出。
步骤S502:反编译待注入的APK文件到指定目录,若成功则执行步骤S503,否则退出。
步骤S503:检测目标目录是否含有.so文件,若有.so文件给出提示“该应用含有so库,文件加解密加固存在不可预知风险,是否继续”,若选择是则继续步骤S504,否则退出。
步骤S504:解析并分析原APK文件的smali代码,查找是否有文件I/O操作,若有则继续步骤S505,否则表示原APK文件没有注入点,不需要注入,退出。
步骤S505:拷贝反编译得到的文件和注入所需要的文件到目标文件夹。
步骤S506:解析原始APK文件的AndroidManifest.xml文件,得到原始包名。
步骤S507:获取原始APK文件的Application的信息。若原始APK文件有继承自Application的子类,则将自定义的类代码注入到原始的Application子类smali代码中,若没有继承自Application的子类,则修改AndroidManifes.xml加入android:name的属性,值是自定义的Application子类的完整名称。
步骤S508:注入自定义的BaseActivity,将所有原APK文件中的Activity子类的父类替换成BaseActivity。
步骤S509:注入读写加解密的smali代码,将原始I/O操作的代码替换成加解密的代码。
步骤S510:处理原始APK文件的图标,加上打过包的标记,作为和原始APK文件的区别。
步骤S511:处理AndroidManifest.xml的其它内容,如加上注入过加解密代码的标记,增加缺少的权限(permission)等。
步骤S512:调用APK工具(apktool)编译目标文件夹,若成功构建则生成注入代码后未签名的APK文件,如果失败则退出。
步骤S513:调用jar签名器(jarsigner)签名上一步生成的APK文件。
步骤S514:将已签名的APK文件拷贝到指定目录,流程结束。
其中,反编译的过程用到了apktool,步骤S505到步骤S509是在处理AndroidManifest.xml的内容,注入相关smali代码。最后打包生成的APK文件用到了jarsigner签名,签名的密钥库(keystore)可以通过门户上传。原始APK文件如果没有Application,则使用注入的代码,如果有,则会在原始Application末尾注入关于加解密的smali代码,这样在打过包的APK文件启动时会先执行原始的代码再执行注入的代码完成初始化的工作。
此外,注入使用的smali文件,可以采用不同的加密方式实现,每一种算法表示一种加解密方案。并且由上述描述可知,本发明可选实施例中可以灵活的替换加解密方案,不需要更改原有架构。
综上所述,通过本发明的上述实施例和可选实施例,可以在无需获得原来APK文件源码的前提下通过代码注入的方式赋予移动应用读写文件加解密的能力,从而可以灵活方便的定制和改造原有的企业移动应用,增加应用数据的安全性。
在另外一个实施例中,还提供了一种软件,该软件用于执行上述实施例及可选实施方式中描述的技术方案。
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件,该存储介质包括但不限于:光盘、软盘、硬盘、可擦写存储器等。
工业实用性:通过上述描述可知,本发明实施例解决了对于没有源代码的应用无法再新增加解密功能的问题,减少了应用的维护成本。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的对象在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (10)
- 一种加解密功能的实现方法,包括:对安卓安装包APK文件进行反编译,得到smali文件;将所述smali文件中用于执行输入/输出I/O操作的代码替换为自定义的代码,其中,所述自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;对替换过的所述smali文件进行编译并签名,得到新的APK文件。
- 根据权利要求1所述的方法,其中,将所述smali文件中用于执行I/O操作的代码替换为自定义的代码包括:将所述smali文件中用于执行I/O操作的类替换为自定义的类,其中,所述用于执行I/O操作的类包括以下至少之一:文件输出流FileOutputStream、文件输入流FileInputStream、文件读FileReader、文件写FileWriter、随机接入文件RandomAccessFile。
- 根据权利要求2所述的方法,其中,将所述smali文件中用于执行I/O操作的类替换为自定义的类包括:确定所述smali文件中所使用到的用于执行I/O操作的类;将所述smali文件所使用到的用于执行I/O操作的类替换为自定义的类。
- 根据权利要求2所述的方法,其中,在将所述smali文件中用于执行I/O操作的类替换为自定义的类之前,所述方法还包括:解析所述APK文件的安卓清单AndroidManifest.xml文件,得到原始包名,其中,所述原始包名用于在进行注入替换时smali文件位置的定位。
- 根据权利要求4所述的方法,其中,在解析所述APK文件的AndroidManifest.xml文件之后,所述方法还包括:获取所述APK文件的应用Application的信息;在所述APK文件有继承自Application类的子类的情况下,将自定义的Application子类smali代码注入到所述smali文件本身的Application子类代码中;在所述APK文件没有继承自Application子类的情况下,在AndroidManifes.xml中添加安卓:名字android:name的属性,其中,所述属性的值是自定义的Application子类的完整名称。
- 根据权利要求4所述的方法,其中,在解析所述APK文件的AndroidManifest.xml文件之后,所述方法还包括:将所述smali文件中的继承自活动Activity子类的父类替换成自定义的Activity子类基础活动BaseActivity。
- 根据权利要求1所述的方法,其中,在将所述smali文件中用于执行I/O操作的代码替换为自定义的代码之后,所述方法还包括:在AndroidManifest.xml中增加用于指示进行过代码替换操作的标记。
- 一种加解密功能的实现装置,包括:反编译模块,设置为对安卓安装包APK文件进行反编译,得到smali文件;替换模块,设置为将所述smali文件中用于执行输入/输出I/O操作的代码替换为自定义的代码,其中,所述自定义的代码用于执行I/O操作以及对I/O的数据进行加解密操作;编译模块,设置为对替换过的所述smali文件进行编译并签名,得到新的APK文件。
- 一种服务器,包括:如权利要求8所述的加解密功能的实现装置;其中,所述服务器还包括:第一获取装置,设置为获取所述安卓安装包APK文件;提供装置,设置为提供所述新的APK文件。
- 根据权利要求9所述的服务器,其中,所述服务器还包括:第二获取装置,设置为获取签名所述新的APK文件的密钥库keystore。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510331292.1A CN106326691B (zh) | 2015-06-15 | 2015-06-15 | 加解密功能的实现方法、装置及服务器 |
CN201510331292.1 | 2015-06-15 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016201853A1 true WO2016201853A1 (zh) | 2016-12-22 |
Family
ID=57546761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/092988 WO2016201853A1 (zh) | 2015-06-15 | 2015-10-27 | 加解密功能的实现方法、装置及服务器 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106326691B (zh) |
WO (1) | WO2016201853A1 (zh) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109492353A (zh) * | 2018-10-11 | 2019-03-19 | 北京奇虎科技有限公司 | 应用加固方法、装置、电子设备和存储介质 |
CN109814912A (zh) * | 2018-12-15 | 2019-05-28 | 中国平安人寿保险股份有限公司 | 应用程序打包方法及系统 |
CN111124444A (zh) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | 代码注入的方法及其装置、计算机程序产品、存储介质 |
CN113190263A (zh) * | 2021-04-21 | 2021-07-30 | 宝宝巴士股份有限公司 | 一种集成第三方sdk的方法及装置 |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108762775A (zh) * | 2018-05-24 | 2018-11-06 | 苏州乐麟无线信息科技有限公司 | 一种安装包的打包方法和装置 |
CN110896540A (zh) * | 2019-11-21 | 2020-03-20 | 国网辽宁省电力有限公司电力科学研究院 | 移动互联网客户端安全评估工具、方法、计算机设备及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365699A (zh) * | 2012-12-21 | 2013-10-23 | 北京安天电子设备有限公司 | 基于apk的系统api和运行时字符串提取方法及系统 |
CN104021346A (zh) * | 2014-06-06 | 2014-09-03 | 东南大学 | 基于程序流程图的Android恶意软件检测方法 |
CN104102880A (zh) * | 2014-06-30 | 2014-10-15 | 华中科技大学 | 一种检测Android权限提升攻击的应用程序重写方法和系统 |
WO2014183447A1 (en) * | 2013-05-14 | 2014-11-20 | Tencent Technology (Shenzhen) Company Limited | Method, system and sever for downloading installation package |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104484585A (zh) * | 2014-11-26 | 2015-04-01 | 北京奇虎科技有限公司 | 一种应用程序安装包的处理方法、装置及移动设备 |
CN104463002B (zh) * | 2014-12-24 | 2017-04-05 | 北京奇虎科技有限公司 | 一种加固apk的方法和装置以及apk加固客户端和服务器 |
-
2015
- 2015-06-15 CN CN201510331292.1A patent/CN106326691B/zh active Active
- 2015-10-27 WO PCT/CN2015/092988 patent/WO2016201853A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365699A (zh) * | 2012-12-21 | 2013-10-23 | 北京安天电子设备有限公司 | 基于apk的系统api和运行时字符串提取方法及系统 |
WO2014183447A1 (en) * | 2013-05-14 | 2014-11-20 | Tencent Technology (Shenzhen) Company Limited | Method, system and sever for downloading installation package |
CN104021346A (zh) * | 2014-06-06 | 2014-09-03 | 东南大学 | 基于程序流程图的Android恶意软件检测方法 |
CN104102880A (zh) * | 2014-06-30 | 2014-10-15 | 华中科技大学 | 一种检测Android权限提升攻击的应用程序重写方法和系统 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109492353A (zh) * | 2018-10-11 | 2019-03-19 | 北京奇虎科技有限公司 | 应用加固方法、装置、电子设备和存储介质 |
CN109492353B (zh) * | 2018-10-11 | 2024-04-16 | 北京奇虎科技有限公司 | 应用加固方法、装置、电子设备和存储介质 |
CN111124444A (zh) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | 代码注入的方法及其装置、计算机程序产品、存储介质 |
CN111124444B (zh) * | 2018-11-01 | 2023-12-19 | 百度在线网络技术(北京)有限公司 | 代码注入的方法及其装置、计算机程序产品、存储介质 |
CN109814912A (zh) * | 2018-12-15 | 2019-05-28 | 中国平安人寿保险股份有限公司 | 应用程序打包方法及系统 |
CN113190263A (zh) * | 2021-04-21 | 2021-07-30 | 宝宝巴士股份有限公司 | 一种集成第三方sdk的方法及装置 |
CN113190263B (zh) * | 2021-04-21 | 2022-05-17 | 宝宝巴士股份有限公司 | 一种集成第三方sdk的方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN106326691B (zh) | 2021-06-18 |
CN106326691A (zh) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6815385B2 (ja) | アプリケーションのコード難読化のためのシステムおよび方法 | |
WO2016201853A1 (zh) | 加解密功能的实现方法、装置及服务器 | |
US10592696B2 (en) | CPU obfuscation for cloud applications | |
CN108229112B (zh) | 一种保护应用程序、应用程序的运行方法以及装置 | |
AU2012337403B2 (en) | Cryptographic system and methodology for securing software cryptography | |
US10678893B2 (en) | Methods and related apparatus for managing access to digital assets | |
CN109784007B (zh) | 一种字节码加密的方法、字节码解密的方法及终端 | |
CN109992987B (zh) | 基于Nginx的脚本文件保护方法、装置及终端设备 | |
US20150294114A1 (en) | Application randomization | |
US20180067777A1 (en) | Application protection method, server, and terminal | |
CN104680039A (zh) | 一种应用程序安装包的数据保护方法及装置 | |
US10430166B2 (en) | Resource injection for application wrapping | |
WO2019062015A1 (zh) | 源代码保护方法、应用服务器及计算机可读存储介质 | |
JP2018527664A (ja) | アプリケーションのコードを保護するためのシステムおよび方法 | |
Kim et al. | Android Application Protection against Static Reverse Engineering based on Multidexing. | |
KR101472346B1 (ko) | 암호화된 웹 어플리케이션 제공 방법, 이를 지원하는 단말, 및 이를 위한 기록매체 | |
CN112966227A (zh) | 代码加密解密方法和装置、存储介质 | |
WO2016206393A1 (zh) | 管理应用的方法和装置、实现读写操作的方法和装置 | |
CN114547558B (zh) | 授权方法、授权控制方法及装置、设备和介质 | |
CN110597496B (zh) | 应用程序的字节码文件获取方法及装置 | |
JP2021118444A (ja) | 情報処理装置、情報処理方法及びプログラム | |
CN116249980A (zh) | 通过异构加密的软件访问 | |
WO2015058639A1 (zh) | 一种应用程序保护系统和方法 | |
CN117313046A (zh) | 一种代码加固方法、代码加载方法、设备及介质 | |
US20190199694A1 (en) | Individual encryption of control commands |
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: 15895422 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15895422 Country of ref document: EP Kind code of ref document: A1 |