CN106897587A - The method and apparatus of reinforcement application, loading reinforcement application - Google Patents
The method and apparatus of reinforcement application, loading reinforcement application Download PDFInfo
- Publication number
- CN106897587A CN106897587A CN201710107806.4A CN201710107806A CN106897587A CN 106897587 A CN106897587 A CN 106897587A CN 201710107806 A CN201710107806 A CN 201710107806A CN 106897587 A CN106897587 A CN 106897587A
- Authority
- CN
- China
- Prior art keywords
- file
- application
- executable file
- executable
- resource file
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 230000002787 reinforcement Effects 0.000 title claims abstract description 148
- 238000000034 method Methods 0.000 title claims abstract description 86
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 133
- 238000009434 installation Methods 0.000 claims abstract description 34
- 230000003014 reinforcing effect Effects 0.000 claims abstract description 19
- 230000006835 compression Effects 0.000 claims abstract description 12
- 238000007906 compression Methods 0.000 claims abstract description 12
- 238000013507 mapping Methods 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 7
- 238000011161 development Methods 0.000 claims description 7
- 230000004044 response Effects 0.000 claims description 6
- 239000003795 chemical substances by application Substances 0.000 description 17
- 238000010200 validation analysis Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000006854 communication Effects 0.000 description 6
- 230000003068 static effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 5
- 230000011514 reflex Effects 0.000 description 5
- 238000012795 verification Methods 0.000 description 5
- 230000006378 damage Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 241000700605 Viruses Species 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007596 consolidation process Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 210000003127 knee Anatomy 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
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/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
- 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/14—Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
-
- 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/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Abstract
This application discloses reinforcement application, the method and apparatus of loading reinforcement application.One specific embodiment of the method includes:At least one executable file is obtained from the source program for treating reinforcement application, then at least one executable file is spliced as first resource file after the first predetermined encryption algorithm is encrypted, then encrypted according to the second predetermined encryption algorithm after also the file size of at least one executable file is arranged according to the splicing order of corresponding executable file, as Secondary resource file, it is then based on treating the compression generation of resource file the installation package file of reinforcement application, wherein, here resource file includes above-mentioned first resource file, above-mentioned Secondary resource file, and the information resources file including the decipherment algorithm corresponding with predetermined encryption algorithm.The implementation method can realize the reinforcing to the application including one or more executable files.
Description
Technical field
The application is related to field of computer technology, and in particular to field of information security technology, more particularly to reinforcement application, plus
The method and apparatus for carrying reinforcement application.
Background technology
After terminal applies issue, user can view the source program code of application by decompiling instrument.Some are used
The source program code of application is checked to steal other people fruits of labour in family, or inserts other programs (such as virus by code
Code) etc. operation the source program code applied is processed, interference other users are used the normal of terminal applies, or even are invaded
Violate the information security of other users.In the prior art, generally the source program of shell side sequence and terminal applies is stitched together, and
The length (such as byte number) of executable file in the source program of terminal applies (executable file, such as dex files) is placed
In the end of splicing file.The reinforcement means of this terminal applies, is often applicable comprising a terminal applies for executable file,
When terminal applies have multiple executable files, it is impossible to and the splicing of shell side sequence.Accordingly, it is desirable to provide one kind can be to comprising one
Or the universal method that the terminal applies of multiple executable files are reinforced.
The content of the invention
The purpose of the application is to propose a kind of method and apparatus of improved reinforcement application, and loading reinforcement application side
Method and device solve the technical problem that background section above is mentioned.
In a first aspect, this application provides a kind of method of reinforcement application, the method includes:From the source journey for treating reinforcement application
At least one executable file is obtained in sequence;At least one executable file is encrypted by the first predetermined encryption algorithm laggard
Row splicing is as first resource file;By the file size of at least one executable file according to corresponding executable file
Splicing order is encrypted after arranging according to the second predetermined encryption algorithm, as Secondary resource file;Based on the pressure to resource file
The installation package file of reinforcement application is treated in contracting generation, wherein, resource file include above-mentioned first resource file, Secondary resource file,
Information resources file including the decipherment algorithm corresponding with the first predetermined encryption algorithm, the second predetermined encryption algorithm difference.
In certain embodiments, at least one executable file is spelled after the first predetermined encryption algorithm is encrypted
Connect includes as first resource file:The Classloader of each executable file is replaced as predetermined Classloader respectively;Will
At least one executable file after displacement Classloader after the encryption of the first predetermined encryption algorithm by being spliced as the
One resource file;And, above-mentioned resource file also includes:Record the Classloader of each executable file and making by oneself for being replaced
4th resource file of the mapping relations between adopted Classloader.
In certain embodiments, the method for the reinforcement application that the application is provided is by calling the logic of local development kit
Realize.
Second aspect, present invention also provides a kind of method for loading reinforcement application, the method includes:From reinforcement application
Installation package file obtains resource file, wherein, the resource file includes:By at least one executable file of reinforcement application according to
Splice the first resource file of generation after the encryption of first predetermined encryption algorithm, by the file of at least one executable file
The Secondary resource that length is generated after being arranged according to the splicing order of corresponding executable file according to the encryption of the second predetermined encryption algorithm
File, including the decipherment algorithm corresponding with above-mentioned first predetermined encryption algorithm, the second predetermined encryption algorithm difference the 3rd money
Source file;Secondary resource file is decrypted by decipherment algorithm corresponding with the second predetermined encryption algorithm in information resources file,
To obtain the file size of each executable file in first resource file;According to the file of each acquired executable file
Length obtains at least one executable file from first resource file;The reinforcing is loaded according to acquired executable file
Using.
In certain embodiments, above-mentioned resource file also includes recording the Classloader of each executable file and being replaced
Default Classloader between mapping relations the 4th resource file;And, installed according to acquired executable file or
Running the reinforcement application includes:Whether detect in each executable file comprising predetermined Classloader;If comprising establishment is predetermined
The object of Classloader, for replacing class loading corresponding with predetermined Classloader in the executable file described in mapping relations
Device.
In certain embodiments, loading the reinforcement application according to acquired executable file also includes:From it is above-mentioned to
The application title of reinforcement application entrance is obtained in a few executable file;Create the application with reinforcement application entrance
The corresponding application of title;The application message of the application that will be created by above-mentioned mapping relations is replaced as reinforcing use
Application message.
In certain embodiments, included according to acquired executable file loading reinforcement application:Acquired is held
Style of writing part is calculated check value by preset-key algorithm;Consistent with preset value in response to check value, loading above-mentioned reinforcing should
With, wherein, preset value is calculated to the executable file of source program by server by preset-key algorithm.
The third aspect, present invention also provides a kind of device of reinforcement application, the device includes:Acquisition module, configuration is used
At least one executable file is obtained in from the source program for treating reinforcement application;First generation module, is configured to this at least
One executable file is spliced as first resource file after the first predetermined encryption algorithm is encrypted;Second generation mould
Block, after being configured to arrange the file size of at least one executable file according to the splicing order of corresponding executable file
Encrypted according to the second predetermined encryption algorithm, as Secondary resource file;3rd generation module, is configured to be based on to resource text
The installation package file of reinforcement application is treated in the compression generation of part, wherein, the resource file includes above-mentioned first resource file, the second money
Source file, the information resources including the decipherment algorithm corresponding with the first predetermined encryption algorithm, the second predetermined encryption algorithm difference
File.
In certain embodiments, the first generation module is further configured to:By the Classloader of each executable file
Predetermined Classloader is replaced as respectively;At least one executable file after Classloader will be replaced to be calculated by the first predetermined encryption
Spliced as the first resource file after method encryption;And, above-mentioned resource file also includes:Each is recorded to can perform
4th resource file of the mapping relations between the Classloader of file and the self defined class loader replaced.
In certain embodiments, the device by call local development kit logic reinforce described in treat reinforcement application.
Fourth aspect, present invention also provides a kind of device for loading reinforcement application, the device includes:Resource file is obtained
Module, is configured to obtain resource file from the installation package file of reinforcement application, wherein, the resource file includes:Should by reinforcing
With at least one executable file according to the first predetermined encryption algorithm encrypt after carry out splice generation first resource file, will
The file size of at least one executable file is default according to second after being arranged according to the splicing order of corresponding executable file
The Secondary resource file of AES encryption generation, including distinguish phase with the first predetermined encryption algorithm, the second predetermined encryption algorithm
The information resources file of corresponding decipherment algorithm;Deciphering module, be configured in information resources file it is default with second plus
The corresponding decipherment algorithm decryption Secondary resource file of close algorithm, to obtain the text of each executable file in first resource file
Part length;Executable file acquisition module, the file size of each executable file being configured to according to acquired in is from first
At least one executable file is obtained in resource file;Load-on module, is configured to the executable file loading according to acquired in
The reinforcement application.
In certain embodiments, above-mentioned resource file also includes recording the Classloader of each executable file and being replaced
Default Classloader between mapping relations the 4th resource file;And, load-on module is further configured to:Detection is each
Whether predetermined Classloader is included in individual executable file;If comprising, the object of predetermined Classloader is created, it is above-mentioned for replacing
Classloader corresponding with predetermined Classloader in executable file described in mapping relations.
In certain embodiments, load-on module is also configured to:Obtained from above-mentioned at least one executable file and reinforced
Using the application title of entrance;Create application corresponding with the application title of reinforcement application entrance;By upper
The application message for stating the application that mapping relations will be created is replaced as the application message of reinforcing.
In certain embodiments, load-on module also includes:Computing unit, is configured to lead to acquired executable file
Cross preset-key algorithm and be calculated check value;Loading unit, be configured to it is consistent with preset value in response to check value, loading should
Reinforcement application, wherein, preset value is calculated to the executable file of source program by server by preset-key algorithm.
5th aspect, this application provides a kind of computing device, including:One or more processors;Storage device, is used for
Store one or more programs;When one or more programs are by one or more of computing devices so that one
Or multiple processors realize any of the above-described method.
6th aspect, present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, is stored thereon with calculating
Machine program, the program is when executed by realizing any of the above-described method.
Reinforcement application, the method and apparatus of loading reinforcement application that the application is provided, by from the source journey for treating reinforcement application
At least one executable file is obtained in sequence, then by least one executable file after the first predetermined encryption algorithm is encrypted
Spliced as first resource file, then also by the file size of at least one executable file according to corresponding executable
The splicing order of file is encrypted after arranging according to the second predetermined encryption algorithm, as Secondary resource file, is then based on to money
The installation package file of reinforcement application is treated in the compression generation of source file, wherein, resource file here includes above-mentioned first resource text
Part, above-mentioned Secondary resource file and the information resources file including the decipherment algorithm corresponding with predetermined encryption algorithm.Due to
Calculated after the file size of each executable file is arranged according to the splicing order of corresponding executable file and according to predetermined encryption
Method is encrypted, and is compressed in the installation package file for treating reinforcement application, it is possible to achieve to being answered including one or more executable files
Reinforcing.
Brief description of the drawings
By the detailed description made to non-limiting example made with reference to the following drawings of reading, the application other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart of one embodiment of the method for the reinforcement application according to the application;
Fig. 3 is the flow chart of one embodiment of the method for the loading reinforcement application according to the application;
Fig. 4 is a schematic diagram for application scenarios of the method for the loading reinforcement application according to the application;
Fig. 5 is the structural representation of one embodiment of the device of the reinforcement application according to the application;
Fig. 6 is the structural representation of one embodiment of the device of the loading reinforcement application according to the application;
Fig. 7 is adapted for the structural representation for realizing the terminal device of the embodiment of the present application or the computer system of server
Figure.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that, in order to
Be easy to description, be illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the embodiment of the method or apparatus of the reinforcement application and loading reinforcement application that can apply the application
Exemplary system architecture 100.
As shown in figure 1, system architecture 100 can include electronic equipment 101,102,103,104, network 105.Network 105
To electronic equipment 101, between 102,103,104 provide communication link medium.Network 105 can include various connection classes
Type, such as wired, wireless communication link or fiber optic cables etc..
In system architecture 100, electronic equipment 101 can be any electronic equipment with certain computing capability, using opening
The application of exploitation can be published to internet by originator by electronic equipment 101 by network 105.In the embodiment that the application is provided
In, before the issue application of electronic equipment 101 consolidation process can be carried out to application.In some implementations, electronic equipment 101 can be with
As by issue application provide support background server.
Electronic equipment 102,103,104 can be terminal device, one or more operating systems can be provided with thereon, such as
Android (Andriod) system etc..Its application that can be downloaded by network 105, installed under corresponding operating system, such as by electricity
The application run under Android system of the issue of sub- equipment 101.Electronic equipment 102,103,104 can include but is not limited to intelligence
Mobile phone, panel computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer
III, dynamic image expert's compression standard audio aspect 3), MP4 (Moving Picture Experts Group Audio
Layer IV, dynamic image expert's compression standard audio aspect 4) player, pocket computer on knee and desktop computer etc.
Deng.
It should be noted that the method for reinforcement application provided herein is typically performed by electronic equipment 101, accordingly
Ground, the device of reinforcement application is generally positioned in electronic equipment 101.The method of loading reinforcement application provided herein is general
By electronic equipment 102,103,104 perform, correspondingly, load reinforcement application device be generally positioned at electronic equipment 102,103,
In 104.
It should be understood that the number of the electronic equipment and network in Fig. 1 is only schematical.According to realizing needs, can be with
With any number of electronic equipment and network.
With continued reference to Fig. 2, the flow 200 of one embodiment of reinforcement application method according to the application is shown.Should add
Gu the method for application, comprises the following steps:
Step 201, obtains at least one executable file from the source program for treating reinforcement application.
Generally, application can include one or more by executable file (such as Android platform of recording source program
On dex type files).Source program can be according to certain programming language (such as C/C++, Java etc.) specifications
Write, it can be stored in one or more readable texts, each text can serve as one and can perform
File.In practice, the source program of an application may belong to same engineering in compiling procedure, with executable file as dex
As a example by type file, the side operator in each dex file is up to 65535 respectively, when the side operator in engineering has exceeded 65535
When, its source program will be split and be stored in multiple dex files.
In the present embodiment, the method operation of above-mentioned reinforcement application electronic equipment thereon is (such as in being Fig. 1
Electronic equipment 101 etc.) one or more executable files can be obtained from the source program for treating reinforcement application.Wherein, here
Source program can be the program write by C/C++, Java etc. random procedure design language.Above-mentioned electronic equipment can be from source
The file of predetermined executable file format is read in program, for example, being obtained from APK (Android Package, Android installation kit)
Take the text of dex forms.
Step 202, is spelled after above-mentioned at least one executable file is encrypted by the first predetermined encryption algorithm
Connect as first resource file.
In the present embodiment, above-mentioned electronic equipment (such as the electronic equipment 101 shown in Fig. 1) can be preset with first and preset
AES, its one or more executable file that will can be obtained in step 201 are calculated by first predetermined encryption respectively
Method is encrypted, and afterwards, can be stitched together for the executable file after encryption as first resource text by above-mentioned electronic equipment
Part.
Here, the first predetermined encryption algorithm can be including but not limited to Code obfuscation, apk destructions, signature verification etc.
Etc method at least one method.Wherein, Code obfuscation can be using various instructions (such as jmp, call, ret)
Some storehouse skills, position computing etc. make a kind of method malfunctioned when dis-assembling, for example, target location is pointed to another
The centre position of bar instruction, will occur logical miss when dis-assembling;Apk destructions can be with multipair executable file
The title of all variables in code, function, class is encrypted as brief English alphabet code name by code after being obscured, and increases generation
The reading difficulty of code;Signature verification can be by such as RSA (a kind of asymmetric public key AES), ElGamal etc extremely
A kind of few AES carries out encrypted signature, and signature is authenticated;Etc., no longer enumerate herein.
Executable file after above-mentioned electronic equipment can be encrypted is stitched together as first resource file.In practice,
When executable file only one of which, above-mentioned electronic equipment can using the encrypted executable file as first resource file, when
When executable file has multiple, above-mentioned electronic equipment can will respectively encrypt after the plurality of executable file splice successively as
First resource file.Wherein, multiple executable files splicing order can be any splicing sequentially, the application is not limited this
It is fixed.In some implementations, above-mentioned electronic equipment can by the executable file after encryption be converted into bytecode recorded it is same
In file, to realize the splicing of executable file.
In some optional implementations of the present embodiment, Classloader can be included in executable file.For example,
In the application that source program is write by Java language, Classloader (ClassLoader) is arrived for loading classes (class) bytecode
In Java Virtual Machine.In practice, Java Virtual Machine is as follows using the mode of java class:The source program write by Java language is existed
Java bytecode file (suffix is the file of .class), class are converted into after being compiled by CompilerTools (such as Javac)
Loader is responsible for reading the Java byte code in Java bytecode file, and is converted into one of java.lang.Class classes
Example.Each such example is used for representing a java class.Now, above-mentioned electronic equipment enters to each executable file
Before row encryption, the Classloader of each executable file can also be respectively replaced as predetermined Classloader, then, class will be replaced
At least one executable file after loader is spliced as above-mentioned first resource file.Wherein, predetermined Classloader
Can be the self defined class loaders different from known Classloader.So, predetermined class loader can be made by Java words
Java byte code in section code file is converted into being converted into predetermined Classloader during the example of java.lang.Class classes being put
The example of the Classloader correspondence class changed.For example, the Classloader A in executable file is used to load " car " this class,
Now, Classloader A is replaced by default loader B (self defined class loader), then Java Virtual Machine is by default loader B
The example of " car " this class corresponding to Classloader A, such as red car can be created.
Step 203, the file size of above-mentioned at least one executable file is suitable according to the splicing of corresponding executable file
Encrypted according to the second predetermined encryption algorithm after sequence arrangement, as Secondary resource file.
In the present embodiment, above-mentioned electronic equipment can also further by the text of one or more above-mentioned executable files
Part length is arranged according to the splicing order of corresponding executable file, then, the file after arrangement is preset according to second and is added
Close algorithm for encryption, as Secondary resource file.Here, the file size of executable file can be that executable file is included
Byte number, such as 1024.
Wherein, the second predetermined encryption algorithm can be including but not limited to Code obfuscation, apk destructions, signature verification etc.
Etc method at least one method.Second predetermined encryption algorithm can be consistent with the first predetermined encryption algorithm, it is also possible to
Inconsistent with the first predetermined encryption algorithm, the application is not construed as limiting to this.
In practice, above-mentioned electronic equipment can first provide the number of executable file, Ran Hou in Secondary resource file
According to the second predetermined encryption after the file size of executable file is arranged in order according to the splicing order of corresponding executable file
Algorithm for encryption.Alternatively, specific position is individual to represent executable file during electronic equipment can preset Secondary resource file
Number, executable file length.For example, electronic equipment can preset 4 bits of first character section in Secondary resource file
Position such as represents executable file number for 3, then ensuing two bytes for recording executable file number with 0011
One length of executable file of record is represented, such as FFFF represents that executable file length is 65535.
In some optional implementations of the present embodiment, Secondary resource file can be as the head of first resource file text
Part.In some implementations, first resource file can also include Secondary resource file.
Step 204, the installation package file of reinforcement application is treated based on the compression generation to resource file.
In the present embodiment, above-mentioned electronic equipment can be to including above-mentioned first resource file, Secondary resource file
And contain with the first predetermined encryption algorithm, the second predetermined encryption algorithm resource file corresponding decipherment algorithm of difference the 3rd
On the basis of the resource file of resource file is compressed, together with the alternative document of generation application installation package, generates and wait to reinforce
The installation package file of application.
It is appreciated that treating the executable file of reinforcement application, executable file information (such as executable file number, file
Length etc.) be all encrypted, then, it is necessary to be first decrypted to the file being encrypted when the application after reinforcing is loaded.Therefore, it is above-mentioned
Electronic equipment can also record corresponding decipherment algorithm in reinforcement application, for being decrypted to the file being encrypted.
In some optional implementations of the present embodiment, the Classloader in above-mentioned executable file is predetermined class loading
Device is replaced.Now, above-mentioned resource file can also include:Record the Classloader of each executable file and making by oneself for being replaced
4th resource file of the mapping relations between adopted Classloader.By replacing the Classloader in executable file, Ke Yizeng
Plus source program decodes difficulty, so as to improve the validity of reinforcement application.
In some optional implementations of the present embodiment, the method for reinforcement application is by calling local development kit
The logic realization of (Native Development Kit, NDK).It is appreciated that NDK is based on the exploitation of C or C++ programming languages
, difficulty is decoded by the way that source program using the dynamic base developed by NDK, can be increased in reinforcement application, so as to improve add
Gu the validity of application.
With continued reference to Fig. 3.Fig. 3 is the flow of another embodiment of the method for the loading reinforcement application according to the application
300.The method of the loading reinforcement application, comprises the following steps:
Step 301, resource file is obtained from the installation package file of reinforcement application.
In the present embodiment, when reinforcement application is mounted or starts, the method for loading reinforcement application is run thereon
Electronic equipment (such as the electronic equipment 102,103,104 in Fig. 1) can be obtained from the installation package file of reinforcement application first
Resource file.Wherein, resource file here can include:At least one executable file of reinforcement application is pre- according to first
If AES encryption after carry out splice generation first resource file, by the file size of at least one executable file according to
The Secondary resource file that the splicing order of corresponding executable file is generated after arranging according to the encryption of the second predetermined encryption algorithm, including
The information resources file of the decipherment algorithm corresponding with the first predetermined encryption algorithm, the second predetermined encryption algorithm difference.
Here, the first predetermined encryption algorithm and the second predetermined encryption algorithm can be respectively that including but not limited to code is mixed
Confuse, apk destructions, at least one method in the method for signature verification etc.First predetermined encryption algorithm and second is preset
AES can be identical algorithm, or different algorithms.
It is appreciated that if the installation package file of reinforcement application includes independent resource file, above-mentioned electronic equipment can
With the above-mentioned resource file of direct access from the installation package file of reinforcement application;If the installation package file of reinforcement application is compression
File, above-mentioned electronic equipment can be decompressed first to installation package file, then therefrom obtain corresponding resource file.Wherein,
In installation package file, each resource file can be the file for saving as different-format, and above-mentioned electronic equipment can be according to file
Form obtains different resource files respectively.In some implementations, above-mentioned electronic equipment can also be provided by calling fetching portion
Source file, for example, calling the information resources file including decipherment algorithm when starting reinforcement application.
Step 302, second is decrypted by decipherment algorithm corresponding with the second predetermined encryption algorithm in information resources file
Resource file, to obtain the file size of each executable file in first resource file.
In the present embodiment, above-mentioned electronic equipment can then be obtained from information resources file and calculated with the second predetermined encryption
The corresponding decipherment algorithm of method, and be used to decrypt Secondary resource file, so as to obtain each executable text in first resource file
The file size of part.In practice, each AES corresponds to corresponding decipherment algorithm, will not be repeated here.In some realizations
In, executable file has multiple, then the number of executable file can also be recorded in Secondary resource file.Now, above-mentioned electricity
Sub- equipment can first obtain the number of executable file, then the file size for obtaining each executable file respectively.
In some optional implementations of the present embodiment, Secondary resource file can be of first resource file
Point.Now, above-mentioned electronic equipment can first decrypt first resource file, then Secondary resource file is obtained from first resource file
It is decrypted, to obtain the file size of executable file from Secondary resource file.
Step 303, the file size according to each acquired executable file is obtained at least from first resource file
One executable file.
In the present embodiment, the executable file length that above-mentioned electronic equipment can also further according to acquired in, from the
The file with file size respective byte is read in one resource file, so that one or more executable files of sub-department.For example,
Assuming that it is 3 that executable file number is obtained in step 302, the file size of each executable file be followed successively by 10 Mbytes, 2,000,000
Byte, 8 Mbytes, due in Secondary resource file, the file size of executable file according to corresponding executable file spelling
Order arrangement is connect, then above-mentioned electronic equipment the original position of executable file can be successively read 10,000,000 from first resource file
Byte, 2 Mbytes, 8,000,000 word content sections are respectively as the first executable file, the second executable file, the 3rd executable file.
It is appreciated that after above-mentioned electronic equipment obtains each executable file, can also be wrapped by information resources file
Contain with for encrypting the corresponding decipherment algorithm of the first predetermined encryption algorithm of first resource file to each executable file
It is decrypted.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can call the dynamic base that NDK is developed
Obtain, decrypt above-mentioned executable file.So, be the equal of in Java language by taking the source program that Java language is write as an example
In call the logic of C language and process source program, be that the decompiling of application increases difficulty, so as to further improve application source code
Confidentiality and security.
Step 304, above-mentioned reinforcement application is loaded according to acquired executable file.
In the present embodiment, above-mentioned electronic equipment can load above-mentioned reinforcing and answer then according to acquired executable file
With.For example, so that source program is the application that Java language is write as an example, executable file of the above-mentioned electronic equipment according to acquired in adds
The flow for carrying above-mentioned reinforcement application can include:Execution will create the class of object and its Classloader of parent, be created with loading
Build object class and its directly with indirect parent;Static member while class is loaded in loading classes, for example to static state into
Member's variable is initialized, is performed static statement block etc., is carried out according to the sequencing of code in executable file;Then, exist
After the completion of the class loading of needs, start to create object, load non-static member, for example, non-static member variable is carried out initially
Change, perform non-static statement block, carried out according to the loading sequence of code in executable file;Then according in executable file
The constructor of object, to generate the object of required class.
In some optional implementations of the present embodiment, Classloader, above-mentioned electronics can be included in executable file
The resource file that equipment is obtained in step 301 can also include:Record the Classloader of each executable file and replaced
Default Classloader between mapping relations the 4th resource file.Now, above-mentioned electronic equipment obtains first resource file
In executable file after, reflex mechanism can be first passed through and go to call in executable text file that an establishment for class (class) should
With object (makeApplication) method, application (Application) object is created.Wherein, reflex mechanism here
Including but not limited to it is following at least one:Judge the class belonging to any one object, construct the object of any one class, judge to appoint
Member variable that one class of meaning has and method, method, the generation dynamic proxy for calling any one object.Therefore, it is above-mentioned
Whether electronic equipment can be detected in each executable file comprising the predetermined Classloader, if comprising predetermined class loading
Device, then call establishment application (makeApplication) method of respective class (class), creates an application
(Application) during object, it is replaced into and creates the executable file that the predetermined Classloader in above-mentioned mapping relations is replaced
Classloader respective class (class) establishment application method, create the class loading of executable file replaced
Application (Application) object of device respective class (class).
In some optional implementations of the present embodiment, above-mentioned electronic equipment adds in the executable file acquired in basis
When carrying the reinforcement application, executable file that can also be first just acquired is calculated verification by preset-key algorithm
Value, then compares the check value that this is calculated with preset value, when check value is consistent with preset value, loads the reinforcing
Using.Wherein, above-mentioned key algorithm can be such as MD5 (Message Digest Algorithm, Message Digest 5 the 5th
Version), the AES of RSA Algorithm etc.Above-mentioned preset value can be by upper by server to the executable file of source program
State what preset-key algorithm was calculated.The preset value can be included in the installation of above-mentioned reinforcement application in the form of resource file
In APMB package, resulting validation value is entered with the preset value for performing the electronic equipment of method of above-mentioned loading reinforcement application
Row contrast.The preset value can also be stored in server end, for performing the electronic equipment of the method for above-mentioned loading reinforcement application
When resulting validation value is sent into server, validation value is contrasted with the preset value by server, and contrast is tied
Fruit feeds back to above-mentioned electronic equipment.By validation value and the comparing result of the preset value, above-mentioned electronic equipment can be verified can be held
The integrality of style of writing part.For example, if validation value is consistent with preset value, above-mentioned electronic equipment can determine that executable file has been
Whole, to continue to load the reinforcement application;Otherwise, above-mentioned electronic equipment can determine that executable file is incomplete.It is optional
Ground, when above-mentioned electronic equipment determines that executable file is imperfect, it can stop loading the reinforcement application, or be carried to making mistake
Show.
As an application scenarios, the method for the reinforcement application of embodiments herein and the method example of loading reinforcement application
In such as can apply to agent application.In the application scenarios, first, electronic equipment (such as Fig. 1 institutes reinforced to application
The electronic equipment 101 for showing) at least one executable file can be obtained from the source program for treating reinforcement application by agent application,
Spliced the first resource text as agent application after executable file is encrypted by the first predetermined encryption algorithm
Part, calculates after the file size of executable file is arranged according to the splicing order of corresponding executable file according to the second predetermined encryption
Method is encrypted, and as the Secondary resource file of agent application, and the installation of reinforcement application is treated based on the compression generation to resource file
APMB package, wherein, here and resource file at least includes above-mentioned first resource file, Secondary resource file and including with the
One predetermined encryption algorithm, the second predetermined encryption algorithm distinguish the information resources file of corresponding decipherment algorithm.In the applied field
The Classloader of each executable file can also be respectively replaced as predetermined Classloader by Jing Zhong, agent application, such as self-defined
Classloader.It is appreciated that now, treat the executable file of reinforcement application, and executable file relevant information as agency
The resource file of application generates the installation package file for treating reinforcement application, therefore, the installation package file also includes agent application
Perform file.
Application by above-mentioned treatment turns into reinforcement application, and after the reinforcement application is published, user can be by terminal
Equipment (such as the electronic equipment 102,103,104 in Fig. 1) downloads the installation package file of the reinforcement application, installs afterwards, runs
The reinforcement application.As shown in figure 4, the reinforcement application is in the operation of terminal device, in step 401, in response to receiving this
The start-up operation of reinforcement application, such as user can first start to the clicking operation of the reinforcement application icon, corresponding terminal equipment
Agent application.Then, in step 402, the object for creating class by Classloader completes the company of agent application and reinforcement application
Connect.Specifically:By step 4021, agent application can be decompressed by the installation package file (ApK) to reinforcement application, be obtained
The resource file of agent application, i.e., above-mentioned first resource file, Secondary resource file and including being calculated with the first predetermined encryption
Method, the second predetermined encryption algorithm distinguish the information resources file of corresponding decipherment algorithm;In the application scenarios, each can hold
Classloader (Classloader) proxied application of style of writing part has been replaced as self defined class loader, then by step 4022,
Agent application can first initialize self defined class loader, go to realize especially by the object for creating self defined class loader;So
Afterwards, by step 4023, the object of the self defined class loader that agent application is initialized by reflex mechanism goes the displacement can to hold
Corresponding Classloader in style of writing part.Further, by step 403, agent application can be created by reflex mechanism and reinforced
Application (Application) object of application.Specifically:By step 4031, agent application can first from executable file
Obtain the application title of reinforcement application entrance;Then, in step 4032, go to call in agent application by reflex mechanism
Establishment application (makeApplication) method of loading application (LoadedApk) this class (class), creates one and adds
Admittedly using application title corresponding application (Application) object of entrance;Then, in step 4033, Dai Liying
With application (Application) object that will be created by the mapping relations in the 4th resource file for recording mapping relations
Application message is replaced as the application message of reinforcing.So far, agent application has completed to call reinforcement application operation entrance.
Then, by step 404, reinforcement application normally runs in agent application.
Reinforcement application and the method for loading reinforcement application that the embodiment of the present application is provided, by the text of just executable file
Part length is encrypted after being arranged according to the splicing order of corresponding executable file according to the second predetermined encryption algorithm, and encryption splicing
Executable file generates the installation package file of reinforcement application together as resource file, realizes including multiple executable files
Application reinforcing.In some optional realizations, the Classloader in executable file is replaced as default Classloader, afterwards
Executable file is encrypted, is spliced, can improved using the validity reinforced.
With further reference to Fig. 5, as the realization of the method for the reinforcement application to the application, reinforced this application provides one kind
One embodiment of the device of application, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2.
As shown in figure 5, the information push-delivery apparatus 500 of the present embodiment include:Acquisition module 501, the first generation module 502,
Second generation module 503 and the 3rd generation module 504.Wherein, acquisition module 501 may be configured to from the source for treating reinforcement application
At least one executable file is obtained in program;First generation module 502 may be configured at least one executable text
Part is spliced as first resource file after the first predetermined encryption algorithm is encrypted;Second generation module 503 can match somebody with somebody
Put for by the file size of at least one executable file according to corresponding executable file splicing order arrange after according to
Second predetermined encryption algorithm is encrypted, as Secondary resource file;3rd generation module 504 may be configured to be based on to resource
The installation package file of reinforcement application is treated in the compression generation of file, wherein, the resource file includes above-mentioned first resource file, second
Resource file, the 3rd money including the decipherment algorithm corresponding with the first predetermined encryption algorithm, the second predetermined encryption algorithm difference
Source file.
In some optional implementations of the present embodiment, further configuration can be used for the first generation module:By each
The Classloader of executable file is replaced as predetermined Classloader respectively;At least one executable text after Classloader will be replaced
Part is spliced as the first resource file after the first predetermined encryption algorithm is encrypted;And, above-mentioned resource file
Also include:Record the Classloader of each executable file and mapping relations between the self defined class loader replaced
Four resource files.By replacing the Classloader in executable file, source program can be increased and decode difficulty, so as to improve reinforcing
The validity of application.
In some optional implementations of the present embodiment, the device 500 can be by calling local development kit
Logic treats reinforcement application described in reinforcing.Thus, it is possible to further increasing source program decodes difficulty, so as to improve having for reinforcement application
Effect property.
What deserves to be explained is, it is each in the method that all modules described in the device 500 of information pushing are described with reference Fig. 2
Individual step is corresponding.Thus, above with respect to method description operation and feature be equally applicable to reinforcement application device 500 and its
In the module that includes or unit, will not be repeated here.
It will be understood by those skilled in the art that the device 500 of above-mentioned reinforcement application also includes some other known features, example
Such as processor, memory, in order to unnecessarily obscure embodiment of the disclosure, these known structures are not shown in Figure 5.
With further reference to Fig. 6, as the realization of the method to loading reinforcement application, reinforced this application provides one kind loading
One embodiment of the device of application, the device embodiment is corresponding with the embodiment of the method shown in Fig. 3.
As shown in fig. 6, the device 600 of the loading reinforcement application of the present embodiment includes:Resource file acquisition module 601, solution
Close module 602, executable file acquisition module 603 and load-on module 604.Wherein, resource file acquisition module 601 can be configured
For obtaining resource file from the installation package file of reinforcement application, wherein, the resource file can include:By reinforcement application extremely
A few executable file splice the first resource file of generation after being encrypted according to the first predetermined encryption algorithm, by this at least
One file size of executable file is calculated after being arranged according to the splicing order of corresponding executable file according to the second predetermined encryption
The Secondary resource file of method encryption generation, including it is corresponding with the first predetermined encryption algorithm, the second predetermined encryption algorithm difference
The information resources file of decipherment algorithm;Deciphering module 602 may be configured to add by default with second in information resources file
The corresponding decipherment algorithm decryption Secondary resource file of close algorithm, to obtain the text of each executable file in first resource file
Part length;Executable file acquisition module 603 may be configured to the file size of each executable file according to acquired in
At least one executable file is obtained from first resource file;Load-on module 604 may be configured to according to acquired in can
Perform file and load the reinforcement application.
In some optional implementations of the present embodiment, the resource file acquired in resource file acquisition module 601 is also
Can include:Record the Classloader of each executable file and mapping relations between the default Classloader replaced
Four resource files.Now, load-on module 604 can further be configured to:Whether detect in each executable file comprising pre-
Determine Classloader;If including predetermined Classloader in executable file, the object of the predetermined Classloader is created, for replacing the
Classloader corresponding with the predetermined Classloader in the executable file described in mapping relations that four resource files are recorded.
Predetermined Classloader can have multiple, and for each predetermined Classloader, load-on module 604 can be carried out above operation.
In some optional implementations of the present embodiment, load-on module 604 can also be configured to:From first resource text
The application title of reinforcement application entrance is obtained at least one executable file of part;Establishment should with reinforcement application entrance
With the corresponding application of object oriented;The application that the mapping relations recorded according to the 4th resource file will be created
Application message is replaced as the application message of reinforcing.
In some optional implementations of the present embodiment, load-on module 604 can also include:Computing unit (does not show
Go out), may be configured to for acquired executable file to be calculated check value by preset-key algorithm;Loading unit
(not shown), may be configured to consistent with preset value in response to check value, load the reinforcement application, wherein, preset value is by taking
Business device is calculated to the executable file of source program by preset-key algorithm.The preset value can be in the form of resource file
Be included in the installation package file of above-mentioned reinforcement application, for perform above-mentioned loading reinforcement application method electronic equipment by institute
The validation value for obtaining is contrasted with the preset value.The preset value can also be stored in server end, for performing above-mentioned loading
It is by server that validation value is pre- with this when resulting validation value is sent to server by the electronic equipment of the method for reinforcement application
If value is contrasted, and comparing result is fed back into above-mentioned electronic equipment.By validation value and the comparing result of the preset value, on
Stating electronic equipment can verify the integrality of executable file.
What deserves to be explained is, in the method that all modules described in the device 600 of loading reinforcement application are described with reference Fig. 3
Each step it is corresponding.Thus, operation and feature above with respect to method description is equally applicable to load the dress of reinforcement application
600 and the module that wherein includes or unit are put, be will not be repeated here.
It will be understood by those skilled in the art that the device 600 of above-mentioned loading reinforcement application also includes some other known knots
Structure, such as processor, memory etc., in order to unnecessarily obscure embodiment of the disclosure, these known structures are in figure 6 not
Show.
Below with reference to Fig. 7, it illustrates the computer for being suitable to the terminal device/server for realizing the embodiment of the present application
The structural representation of system 700.Terminal device/server shown in Fig. 7 is only an example, should not be to the embodiment of the present application
Function and use range band come any limitation.
As shown in fig. 7, computer system 700 includes CPU (CPU) 701, it can be according to storage read-only
Program in memory (ROM) 702 or be loaded into program in random access storage device (RAM) 703 from storage part 708 and
Perform various appropriate actions and treatment.In RAM 703, the system that is also stored with 700 operates required various programs and data.
CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always
Line 704.
I/O interfaces 705 are connected to lower component:Including the importation 706 of keyboard or touch-screen etc.;Including such as negative electrode
The output par, c 707 of ray tube (CRT), liquid crystal display (LCD) etc.;Storage part 708 including hard disk etc.;And including all
Such as communications portion 709 of LAN card, the NIC of modem.Communications portion 709 via such as internet network
Perform communication process.Driver 710 is also according to needing to be connected to I/O interfaces 705.Detachable media 711, such as disk, CD,
Magneto-optic disk, semiconductor memory etc., as needed on driver 710, in order to the computer journey for reading from it
Sequence is mounted into storage part 708 as needed.
Especially, in accordance with an embodiment of the present disclosure, the process above with reference to flow chart description may be implemented as computer
Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium
On computer program, the computer program includes the program code for the method shown in execution flow chart.In such reality
Apply in example, the computer program can be downloaded and installed by communications portion 709 from network, and/or from detachable media
711 are mounted.When the computer program is performed by CPU (CPU) 701, limited in execution the present processes
Above-mentioned functions.It should be noted that non-volatile computer-readable medium described herein can be non-volatile computer
Readable signal medium or non-volatile computer readable storage medium storing program for executing or the two any combination.Non-volatile meter
What calculation machine readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor is
System, device or device, or any combination above.The more specifically example of non-volatile computer readable storage medium storing program for executing can be with
Including but not limited to:Electrical connection, portable computer diskette with one or more wires, hard disk, random access storage device
(RAM), read-only storage (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc
Read-only storage (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this application,
Non-volatile computer readable storage medium storing program for executing can be it is any comprising or storage program tangible medium, the program can be commanded
Execution system, device or device are used or in connection.And in this application, computer-readable signal media can
Using the data-signal including propagating in a base band or as a carrier wave part, wherein carrying computer-readable program generation
Code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any
Suitable combination.Computer-readable signal media can also be any computer-readable beyond computer-readable recording medium
Medium, the computer-readable medium can be sent, propagated or be transmitted for being used by instruction execution system, device or device
Or program in connection.The program code included on computer-readable medium can be passed with any appropriate medium
It is defeated, including but not limited to:Wirelessly, electric wire, optical cable, RF etc., or above-mentioned any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
The architectural framework in the cards of sequence product, function and operation.At this point, each square frame in flow chart or block diagram can generation
One part for module, program segment or code of table a, part for the module, program segment or code is used comprising one or more
In the executable instruction of the logic function for realizing regulation.It should also be noted that in some are as the realization replaced, being marked in square frame
The function of note can also occur with different from the order marked in accompanying drawing.For example, two square frames for succeedingly representing are actually
Can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also to note
Meaning, the combination of the square frame in each square frame and block diagram and/or flow chart in block diagram and/or flow chart can be with holding
The fixed function of professional etiquette or the special hardware based system of operation are realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in involved module in the embodiment of the present application can be realized by way of software, it is also possible to by hard
The mode of part is realized.Described module can also be set within a processor, for example, can be described as:A kind of processor bag
Include acquisition module, the first generation module, the second generation module and the 3rd generation module.Wherein, the title of these modules is at certain
In the case of do not constitute restriction to the unit in itself, for example, acquisition module is also described as " being configured to from waiting to reinforce
The module of at least one executable file is obtained in the source program of application ".
Used as on the other hand, present invention also provides a kind of computer-readable medium, the computer-readable medium can be
Included in device described in above-described embodiment;Can also be individualism, and without in allocating the device into.Above-mentioned calculating
Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the device so that should
Device:At least one executable file is obtained from the source program for treating reinforcement application;At least one executable file is passed through
Spliced as first resource file after the encryption of first predetermined encryption algorithm;By the file of at least one executable file
Length is encrypted after being arranged according to the splicing order of corresponding executable file according to the second predetermined encryption algorithm, as Secondary resource
File;The installation package file of reinforcement application is treated based on the compression generation to resource file, wherein, resource file includes above-mentioned first
Resource file, Secondary resource file, including the decryption corresponding with the first predetermined encryption algorithm, the second predetermined encryption algorithm difference
The information resources file of algorithm.
Or, above computer computer-readable recording medium carries one or more program, when said one or multiple programs
When being performed by the device so that the device:Resource file is obtained from the installation package file of reinforcement application, wherein, the resource file
Including:Carry out splicing the of generation after at least one executable file of reinforcement application is encrypted according to the first predetermined encryption algorithm
One resource file, after the file size of at least one executable file is arranged according to the splicing order of corresponding executable file
According to the Secondary resource file of the second predetermined encryption algorithm encryption generation, including with above-mentioned first predetermined encryption algorithm, second pre-
If AES distinguishes the information resources file of corresponding decipherment algorithm;By in information resources file with the second predetermined encryption
The corresponding decipherment algorithm decryption Secondary resource file of algorithm, to obtain the file of each executable file in first resource file
Length;File size according to each acquired executable file obtains at least one executable text from first resource file
Part;The reinforcement application is loaded according to acquired executable file.
Above description is only the preferred embodiment and the explanation to institute's application technology principle of the application.People in the art
Member is it should be appreciated that involved invention scope in the application, however it is not limited to the technology of the particular combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where foregoing invention design is not departed from, is carried out by above-mentioned technical characteristic or its equivalent feature
Other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein
The technical scheme that the technical characteristic of energy is replaced mutually and formed.
Claims (18)
1. a kind of method of reinforcement application, it is characterised in that methods described includes:
At least one executable file is obtained from the source program for treating reinforcement application;
At least one executable file is spliced as first resource after the first predetermined encryption algorithm is encrypted
File;
By the file size of at least one executable file according to corresponding executable file splicing order arrange after according to
Second predetermined encryption algorithm is encrypted, as Secondary resource file;
Based on the installation package file that reinforcement application is treated described in the compression generation to resource file, wherein, the resource file includes
The first resource file, the Secondary resource file, including with first predetermined encryption algorithm, the second predetermined encryption algorithm
The information resources file of the corresponding decipherment algorithm of difference.
2. method according to claim 1, it is characterised in that described that at least one executable file is passed through first
Spliced after predetermined encryption algorithm encryption includes as first resource file:
The Classloader of each executable file is replaced as predetermined Classloader respectively;
At least one executable file after Classloader will be replaced to be spelled after the first predetermined encryption algorithm is encrypted
Connect as the first resource file;And
The resource file also includes:The Classloader that records each executable file and the self defined class loader replaced it
Between mapping relations the 4th resource file.
3. method according to claim 1 and 2, it is characterised in that methods described is by calling local development kit
Logic realization.
4. it is a kind of load reinforcement application method, it is characterised in that methods described includes:
Resource file is obtained from the installation package file of the reinforcement application, wherein, the resource file includes:Should by the reinforcing
With at least one executable file according to the first predetermined encryption algorithm encrypt after carry out splice generation first resource file, will
The file size of at least one executable file is pre- according to second after being arranged according to the splicing order of corresponding executable file
If AES encryption generation Secondary resource file, including with first predetermined encryption algorithm, the second predetermined encryption algorithm
The information resources file of the corresponding decipherment algorithm of difference;
Described second is decrypted by decipherment algorithm corresponding with second predetermined encryption algorithm in the information resources file
Resource file, to obtain the file size of each executable file in the first resource file;
File size according to each acquired executable file obtains described at least one from the first resource file
Executable file;
The reinforcement application is loaded according to acquired executable file.
5. method according to claim 4, it is characterised in that the resource file also includes recording each executable file
Classloader and the default Classloader replaced between mapping relations the 4th resource file;And
Executable file acquired in the basis is installed or runs the reinforcement application and includes:
Whether detect in each executable file comprising the predetermined Classloader;
If comprising the object of the establishment predetermined Classloader, for replacing the executable file described in the mapping relations
In Classloader corresponding with the predetermined Classloader.
6. method according to claim 5, it is characterised in that the executable file loading acquired in the basis it is described plus
Gu application also includes:
The application title of reinforcement application entrance is obtained from least one executable file;
Create application corresponding with the application title of reinforcement application entrance;
The application message of the application that will be created by the mapping relations is replaced as the application message of reinforcing.
7. according to any described method in claim 4-6, it is characterised in that the executable file acquired in the basis adds
Carrying the reinforcement application includes:
Acquired executable file is calculated check value by preset-key algorithm;
It is consistent with preset value in response to the check value, the reinforcement application is loaded, wherein, the preset value is by server to source
The executable file of program is calculated by the preset-key algorithm.
8. a kind of device of reinforcement application, it is characterised in that described device includes:
Acquisition module, is configured to obtain at least one executable file from the source program for treating reinforcement application;
First generation module, is configured at least one executable file is laggard by the encryption of the first predetermined encryption algorithm
Row splicing is as first resource file;
Second generation module, is configured to the file size by least one executable file according to corresponding executable file
Splicing order arrange after according to the second predetermined encryption algorithm encrypt, as Secondary resource file;
3rd generation module, is configured to based on the installation package file that reinforcement application is treated described in the compression generation to resource file,
Wherein, the resource file include the first resource file, the Secondary resource file, including with first predetermined encryption
Algorithm, the second predetermined encryption algorithm distinguish the information resources file of corresponding decipherment algorithm.
9. device according to claim 8, it is characterised in that first generation module is further configured to:
The Classloader of each executable file is replaced as predetermined Classloader respectively;
At least one executable file after Classloader will be replaced to be spelled after the first predetermined encryption algorithm is encrypted
Connect as the first resource file;And
The resource file also includes:The Classloader that records each executable file and the self defined class loader replaced it
Between mapping relations the 4th resource file.
10. device according to claim 8 or claim 9, it is characterised in that described device is by calling local development kit
Logic treats reinforcement application described in reinforcing.
11. a kind of devices for loading reinforcement application, it is characterised in that described device includes:
Resource file acquisition module, is configured to obtain resource file from the installation package file of the reinforcement application, wherein, it is described
Resource file includes:Carried out after at least one executable file of the reinforcement application is encrypted according to the first predetermined encryption algorithm
Splice the first resource file of generation, by the file size of at least one executable file according to corresponding executable file
Splicing order arrange after according to the encryption generation of the second predetermined encryption algorithm Secondary resource file, including it is default with described first plus
Close algorithm, the second predetermined encryption algorithm distinguish the information resources file of corresponding decipherment algorithm;
Deciphering module, is configured to corresponding with second predetermined encryption algorithm decryption in the information resources file
Algorithm decrypts the Secondary resource file, to obtain the file size of each executable file in the first resource file;
Executable file acquisition module, the file size of each executable file being configured to according to acquired in is from described first
At least one executable file is obtained in resource file;
Load-on module, is configured to the executable file according to acquired in and loads the reinforcement application.
12. devices according to claim 11, it is characterised in that the resource file also includes recording each executable text
4th resource file of the mapping relations between the Classloader of part and the default Classloader replaced;And
The load-on module is further configured to:
Whether detect in each executable file comprising the predetermined Classloader;
If comprising the object of the establishment predetermined Classloader, for replacing the executable file described in the mapping relations
In Classloader corresponding with the predetermined Classloader.
13. devices according to claim 12, it is characterised in that the load-on module is also configured to:
The application title of reinforcement application entrance is obtained from least one executable file;
Create application corresponding with the application title of reinforcement application entrance;
The application message of the application that will be created by the mapping relations is replaced as the application message of reinforcing.
14. according to any described device in claim 11-13, it is characterised in that the load-on module also includes:
Computing unit, is configured to for acquired executable file to be calculated check value by preset-key algorithm;
Loading unit, is configured to, the loading reinforcement application consistent with preset value in response to the check value, wherein, it is described
Preset value is calculated to the executable file of source program by server by the preset-key algorithm.
A kind of 15. computing devices, including:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are by one or more of computing devices so that one or more of processor realities
The existing method as described in any in claim 1-3.
A kind of 16. computing devices, including:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are by one or more of computing devices so that one or more of processor realities
The existing method as described in any in claim 4-7.
A kind of 17. non-volatile computer readable storage medium storing program for executing, are stored thereon with computer program, it is characterised in that the program
It is when executed by realizing the method as described in any in claim 1-3.
A kind of 18. non-volatile computer readable storage medium storing program for executing, are stored thereon with computer program, it is characterised in that the program
It is when executed by realizing the method as described in any in claim 4-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710107806.4A CN106897587A (en) | 2017-02-27 | 2017-02-27 | The method and apparatus of reinforcement application, loading reinforcement application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710107806.4A CN106897587A (en) | 2017-02-27 | 2017-02-27 | The method and apparatus of reinforcement application, loading reinforcement application |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106897587A true CN106897587A (en) | 2017-06-27 |
Family
ID=59185870
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710107806.4A Pending CN106897587A (en) | 2017-02-27 | 2017-02-27 | The method and apparatus of reinforcement application, loading reinforcement application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106897587A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110113391A (en) * | 2019-04-17 | 2019-08-09 | 北京奇艺世纪科技有限公司 | A kind of client loading method, device and a kind of client operation method, device |
CN111597570A (en) * | 2020-05-19 | 2020-08-28 | 展讯半导体(南京)有限公司 | Application program reinforcing method, device, equipment and storage medium |
CN112947927A (en) * | 2019-11-22 | 2021-06-11 | 华为技术有限公司 | Application program running method and device, terminal equipment and medium |
CN113448923A (en) * | 2020-04-17 | 2021-09-28 | 北京新氧科技有限公司 | File generation method and device and terminal |
CN113849245A (en) * | 2021-09-23 | 2021-12-28 | 武汉深之度科技有限公司 | Application program running method, computing device and storage medium |
WO2023045744A1 (en) * | 2021-09-23 | 2023-03-30 | 中兴通讯股份有限公司 | Reinforcement method, registration method, running method, electronic device and storage medium |
CN115879070A (en) * | 2023-03-01 | 2023-03-31 | 深圳市科力锐科技有限公司 | Security reinforcement method and device, storage medium and backup server |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070100649A1 (en) * | 1998-12-22 | 2007-05-03 | Walker Jay S | Products and processes for vending a plurality of products |
CN101261665A (en) * | 2008-04-10 | 2008-09-10 | 北京深思洛克数据保护中心 | A method for realizing software protection based on data file encryption |
CN104166810A (en) * | 2014-07-29 | 2014-11-26 | 苏州乐米信息科技有限公司 | Encryption method for mobile phone game software |
CN104168435A (en) * | 2014-08-15 | 2014-11-26 | 北京彩云动力教育科技有限公司 | Method and system for batched mergence and playing of audio files |
CN104239054A (en) * | 2014-09-12 | 2014-12-24 | 广州市久邦数码科技有限公司 | Android-system-based plug-in loading method and system |
CN104318155A (en) * | 2014-11-18 | 2015-01-28 | 刘鹏 | Dynamic loading method capable of guarding against reverse APK file |
CN104426894A (en) * | 2013-09-09 | 2015-03-18 | 中国移动通信集团公司 | Registration method of terminal application, business platform equipment and terminal |
CN104834838A (en) * | 2015-04-29 | 2015-08-12 | 福建天晴数码有限公司 | Method and device for preventing unloading storage of DEX file from memory |
CN104966023A (en) * | 2015-03-10 | 2015-10-07 | 深圳市腾讯计算机系统有限公司 | Data protection system, method and apparatus |
CN105790928A (en) * | 2016-04-18 | 2016-07-20 | 电子科技大学 | File segmenting method based on digital abstract |
CN105843841A (en) * | 2016-03-07 | 2016-08-10 | 青岛理工大学 | Small file storing method and system |
CN106355109A (en) * | 2016-09-29 | 2017-01-25 | 维沃移动通信有限公司 | File encryption method and mobile terminal |
CN106412317A (en) * | 2016-10-31 | 2017-02-15 | 努比亚技术有限公司 | File sharing device and method |
-
2017
- 2017-02-27 CN CN201710107806.4A patent/CN106897587A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070100649A1 (en) * | 1998-12-22 | 2007-05-03 | Walker Jay S | Products and processes for vending a plurality of products |
CN101261665A (en) * | 2008-04-10 | 2008-09-10 | 北京深思洛克数据保护中心 | A method for realizing software protection based on data file encryption |
CN104426894A (en) * | 2013-09-09 | 2015-03-18 | 中国移动通信集团公司 | Registration method of terminal application, business platform equipment and terminal |
CN104166810A (en) * | 2014-07-29 | 2014-11-26 | 苏州乐米信息科技有限公司 | Encryption method for mobile phone game software |
CN104168435A (en) * | 2014-08-15 | 2014-11-26 | 北京彩云动力教育科技有限公司 | Method and system for batched mergence and playing of audio files |
CN104239054A (en) * | 2014-09-12 | 2014-12-24 | 广州市久邦数码科技有限公司 | Android-system-based plug-in loading method and system |
CN104318155A (en) * | 2014-11-18 | 2015-01-28 | 刘鹏 | Dynamic loading method capable of guarding against reverse APK file |
CN104966023A (en) * | 2015-03-10 | 2015-10-07 | 深圳市腾讯计算机系统有限公司 | Data protection system, method and apparatus |
CN104834838A (en) * | 2015-04-29 | 2015-08-12 | 福建天晴数码有限公司 | Method and device for preventing unloading storage of DEX file from memory |
CN105843841A (en) * | 2016-03-07 | 2016-08-10 | 青岛理工大学 | Small file storing method and system |
CN105790928A (en) * | 2016-04-18 | 2016-07-20 | 电子科技大学 | File segmenting method based on digital abstract |
CN106355109A (en) * | 2016-09-29 | 2017-01-25 | 维沃移动通信有限公司 | File encryption method and mobile terminal |
CN106412317A (en) * | 2016-10-31 | 2017-02-15 | 努比亚技术有限公司 | File sharing device and method |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110113391A (en) * | 2019-04-17 | 2019-08-09 | 北京奇艺世纪科技有限公司 | A kind of client loading method, device and a kind of client operation method, device |
CN112947927A (en) * | 2019-11-22 | 2021-06-11 | 华为技术有限公司 | Application program running method and device, terminal equipment and medium |
CN113448923A (en) * | 2020-04-17 | 2021-09-28 | 北京新氧科技有限公司 | File generation method and device and terminal |
CN113448923B (en) * | 2020-04-17 | 2023-09-12 | 北京新氧科技有限公司 | File generation method, device and terminal |
CN111597570A (en) * | 2020-05-19 | 2020-08-28 | 展讯半导体(南京)有限公司 | Application program reinforcing method, device, equipment and storage medium |
CN111597570B (en) * | 2020-05-19 | 2023-04-07 | 展讯半导体(南京)有限公司 | Application program reinforcing method, device, equipment and storage medium |
CN113849245A (en) * | 2021-09-23 | 2021-12-28 | 武汉深之度科技有限公司 | Application program running method, computing device and storage medium |
WO2023045744A1 (en) * | 2021-09-23 | 2023-03-30 | 中兴通讯股份有限公司 | Reinforcement method, registration method, running method, electronic device and storage medium |
CN113849245B (en) * | 2021-09-23 | 2023-09-12 | 武汉深之度科技有限公司 | Application program running method, computing device and storage medium |
CN115879070A (en) * | 2023-03-01 | 2023-03-31 | 深圳市科力锐科技有限公司 | Security reinforcement method and device, storage medium and backup server |
CN115879070B (en) * | 2023-03-01 | 2023-05-26 | 深圳市科力锐科技有限公司 | Security reinforcement method and device, storage medium and backup server |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106897587A (en) | The method and apparatus of reinforcement application, loading reinforcement application | |
US20170295013A1 (en) | Method for fulfilling a cryptographic request requiring a value of a private key | |
US8090959B2 (en) | Method and apparatus for protecting .net programs | |
CN105683990B (en) | Method and apparatus for protecting dynamic base | |
EP3038004A1 (en) | Method for providing security for common intermediate language-based program | |
CN104680039B (en) | A kind of data guard method and device of application program installation kit | |
CN104318155A (en) | Dynamic loading method capable of guarding against reverse APK file | |
CN104317625A (en) | Dynamic loading method for APK files | |
JP2005243004A (en) | Code rewriting | |
CN107430650B (en) | Securing computer programs against reverse engineering | |
CN109992987B (en) | Script file protection method and device based on Nginx and terminal equipment | |
WO2019091016A1 (en) | Method and device for customizing data acquisition toolkit, terminal, and storage medium | |
CN106228041B (en) | A kind of code protection method for Android precompile | |
JP6392446B2 (en) | Cloud-based application security service providing method and system | |
CN107292135A (en) | A kind of program code guard method and device | |
CN111191195A (en) | Method and device for protecting APK | |
CN111163094B (en) | Network attack detection method, network attack detection device, electronic device, and medium | |
CN114547558B (en) | Authorization method, authorization control device, equipment and medium | |
KR101472346B1 (en) | Method for providing encrypted web application, terminal supporting the same, and recording medium thereof | |
CN104915594A (en) | Application running method and device | |
CN109522683B (en) | Software tracing method, system, computer equipment and storage medium | |
JP2017146967A (en) | Method and system for improving loading speed of intermediate language file | |
CN112416395A (en) | Hot repair updating method and device | |
KR101667774B1 (en) | Apparatus and Method of Providing Security for Script Program | |
CN114416108B (en) | Anti-decompilation method, system and device based on Android resource file index table |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170627 |
|
RJ01 | Rejection of invention patent application after publication |