CN110119601A - Program reinforcement means and device based on application program installation kit - Google Patents

Program reinforcement means and device based on application program installation kit Download PDF

Info

Publication number
CN110119601A
CN110119601A CN201910257445.0A CN201910257445A CN110119601A CN 110119601 A CN110119601 A CN 110119601A CN 201910257445 A CN201910257445 A CN 201910257445A CN 110119601 A CN110119601 A CN 110119601A
Authority
CN
China
Prior art keywords
data
specific type
segment
application program
constant
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.)
Granted
Application number
CN201910257445.0A
Other languages
Chinese (zh)
Other versions
CN110119601B (en
Inventor
汪德嘉
华保健
邵根波
钱潇龄
孟啸龙
郑小敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Pay Shield Information Safe Technology Ltd
Original Assignee
Jiangsu Pay Shield Information Safe Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Pay Shield Information Safe Technology Ltd filed Critical Jiangsu Pay Shield Information Safe Technology Ltd
Publication of CN110119601A publication Critical patent/CN110119601A/en
Application granted granted Critical
Publication of CN110119601B publication Critical patent/CN110119601B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data

Landscapes

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

Abstract

The invention discloses a kind of program reinforcement means and device based on application program installation kit.Wherein, method includes: to extract binary file from application program installation kit;Determine a variety of specific type of data that the non-code segment in binary file is included;Wherein, specific type of data includes constant data and symbol data;The Encryption Algorithm to be matched using the classification with specific type of data, is encrypted specific type of data.This programme passes through the encryption to specific type of data in the non-code segment of binary file, it can be realized the reinforcing to application program, to which the reverse difficulty of application program be substantially improved, it is effectively prevent the conversed analysis to application program, and is not easy to cause the code expansion of application program;Moreover, this programme implementation process simple and flexible, is easy to batch and safeguards that maintenance cost is low.

Description

Program reinforcement means and device based on application program installation kit
Technical field
The present invention relates to computer fields, and in particular to a kind of program reinforcement means and dress based on application program installation kit It sets.
Background technique
With the continuous development of science technology and society, the quantity of various application programs is also skyrocketed through.However, program is inverse To developer or program reverse product often through the decompiling to application program, can realize easily to application program It cracks, so that emerging one after another for application program piracy and phenomena such as beating again packet.
Currently, existing in the prior art and many being reinforced to application program to prevent inversely cracking to application program Product and method.However, inventor has found in the implementation of the present invention, aforesaid way in the prior art at least exists Following defects:
Usually the Code obfuscations methods such as instruction are spent in addition to the program reinforcement means provided in the prior art in a program, so And this kind of reinforcement means can usually cause program to expand, and waste system resource;Also, existing program reinforcement means is to compile It during translating, is completed by the compiler being set in developer's terminal, to cannot achieve the batch dimension of program reinforcement means Shield, maintenance cost are high.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State the program reinforcement means and device based on application program installation kit of problem.
According to an aspect of the invention, there is provided a kind of program reinforcement means based on application program installation kit, comprising:
Binary file is extracted from the application program installation kit;
Determine a variety of specific type of data that the non-code segment in the binary file is included;Wherein, described specific Categorical data includes constant data and symbol data;
The Encryption Algorithm to be matched using the classification with the specific type of data, adds the specific type of data Close processing.
According to another aspect of the present invention, a kind of program bracing means based on application program installation kit is provided, comprising:
Extraction module, suitable for extracting binary file from the application program installation kit;
Determining module, a variety of specific type of data that the non-code segment being adapted to determine that in the binary file is included; Wherein, the specific type of data includes constant data and symbol data;
Encrypting module, suitable for the Encryption Algorithm to be matched using the classification with the specific type of data, to described specific Categorical data is encrypted.
According to another aspect of the invention, provide a kind of calculating equipment, comprising: processor, memory, communication interface and Communication bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
For the memory for storing an at least executable instruction, it is above-mentioned that the executable instruction executes the processor The corresponding operation of program reinforcement means based on application program installation kit.
In accordance with a further aspect of the present invention, provide a kind of computer storage medium, be stored in the storage medium to A few executable instruction, the executable instruction make processor execute such as the above-mentioned program reinforcing side based on application program installation kit The corresponding operation of method.
The program reinforcement means and device based on application program installation kit provided according to the present invention is installed from application program Binary file is extracted in packet;Determine a variety of specific type of data that the non-code segment in binary file is included;Wherein, special Determining categorical data includes constant data and symbol data;The Encryption Algorithm to be matched using the classification with specific type of data is right Specific type of data is encrypted.This programme by the encryption to specific type of data in the non-code segment of binary file at Reason, can be realized the reinforcing to application program, so that the reverse difficulty of application program be substantially improved, effectively prevent to application program Conversed analysis, and be not easy to cause application program code expansion;Moreover, this programme implementation process simple and flexible, is easy to criticize Amount maintenance, maintenance cost are low.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of program reinforcing side based on application program installation kit provided according to an embodiment of the present invention The flow diagram of method;
Fig. 2 shows a kind of program reinforcings based on application program installation kit provided according to a further embodiment of the invention The flow diagram of method;
Fig. 3 shows a kind of program based on application program installation kit provided according to an embodiment of the present invention and reinforces dress The structural schematic diagram set;
Fig. 4 shows a kind of structural schematic diagram of the calculating equipment provided according to an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Fig. 1 shows a kind of program reinforcing side based on application program installation kit provided according to an embodiment of the present invention The flow diagram of method.Wherein, the program reinforcement means based on application program installation kit provided by the present embodiment can be applied In IOS and/or MachOS system.As shown in Figure 1, this method comprises:
Step S110 extracts binary file from application program installation kit.
Program reinforcement means provided by this implementation is different from (not formed executable in the compiler stage in the prior art File) program is reinforced.The application can carry out adding for application program based on the application program installation kit generated Gu so that the application can be to avoid in the prior art because carrying out program reinforcing bring by the compiler in developer's terminal It can not safeguard in batches and drawback that maintenance cost is high.
In actual implementation process, the application program installation kit in IOS system is usually IPA (iPhoneApplication) installation kit needs to carry out IPA installation kit first to extract binary file from IPA installation kit It decompresses (such as being decompressed by unzip order), and then screening identification is carried out to the file after decompression, to obtain binary system File.For example, binary file is usually Mach-O format in IOS system, so as to carried out by format information two into The extraction of file processed.
Further, after extracting binary file in application program installation kit, the application is not to using journey Code in sequence code segment carries out Code obfuscation processing, but is directed to a variety of certain kinds that the non-code segment of application program is included Type data are encrypted.To which the application is by the encipherment protection to non-code segment, application can be largely ensured The safety of program promotes the reverse difficulty to application program.
Step S120 determines a variety of specific type of data that the non-code segment in binary file is included.
In IOS system, binary file has been generally comprised, file Head Section, loading command area and segment data region.And section Data area is can wrap again containing data segment, code segment and/or chained segment etc..Not to code in code segment in the present embodiment It carries out obscuring processing, but carries out encryption guarantor for a variety of specific type of data in non-code segment (such as data segment and chained segment) Shield, so as to reduce code swell increment.
In the present embodiment, a variety of specific type of data are specifically included: constant data and symbol data.Journey is applied actual During sort run, the attack decoding behavior for constant data and symbol data can also threaten entire application program, thus this Application can largely ensure the safety of application program by the encipherment protection to constant data and symbol data, be promoted To the reverse difficulty of application program.
Step S130, the Encryption Algorithm to be matched using the classification with specific type of data carry out specific type of data Encryption.
Further to promote program consolidation effect, different specific type of data are directed in this step, using with the spy The Encryption Algorithm that the classification of categorical data matches is determined specific type of data to be encrypted.For example, being directed to constant The cipher mode of location information enciphering hiding can be used in data, and be directed to meet data can be used symmetric encipherment algorithm etc. progress Encryption.The present embodiment to specific encryption mode without limitation.
It can be seen that the present embodiment extracts binary file from application program installation kit;It determines in binary file A variety of specific type of data that non-code segment is included;Wherein, specific type of data includes constant data and symbol data;Using The Encryption Algorithm to match with the classification of specific type of data, is encrypted specific type of data.This programme by pair The encryption of specific type of data, can be realized the reinforcing to application program in the non-code segment of binary file, thus substantially The reverse difficulty for promoting application program, effectively prevent the conversed analysis to application program, and be not easy to cause the generation of application program Code expansion;Moreover, this programme implementation process simple and flexible, is easy to batch and safeguards that maintenance cost is low.
Fig. 2 shows a kind of program reinforcings based on application program installation kit provided according to a further embodiment of the invention The flow diagram of method.As shown in Fig. 2, this method comprises:
Step S210 extracts binary file from application program installation kit.
Program reinforcement means provided by the present embodiment can be answered based on the application program installation kit generated With the reinforcing of program, so as to avoid in the prior art because carrying out program reinforcing band by the compiler in developer's terminal The drawback that can not be safeguarded in batches and maintenance cost is high come.It wherein, can be by the side that is decompressed to IPA installation kit in IOS system Formula, to extract binary file.
Step S220, determines a variety of specific type of data that the non-code segment in binary file is included, and using with The Encryption Algorithm that the classification of specific type of data matches, is encrypted specific type of data.
Wherein, non-code segment described in the present embodiment is data segment and chained segment;A variety of specific type of data include constant Data and symbol data;And symbol data further includes data segment symbol data and chained segment symbol data.Then this step The rapid consolidation effect further to promote application program, is directed to every kind of specific type of data, is all made of matched add Decryption method is encrypted, to promote the decompiling difficulty of application program, ensures application security.
If specific type of data includes constant data, the specific steps encrypted to the constant data include: from two The corresponding constant data storage parameter of constant data is extracted in the data segment of binary file, and (it includes index that constant data, which stores parameter, Position indicator pointer and/or constant data length mark);To constant data corresponding index position pointer progress migration processing, and/ Or, the content of the corresponding constant data length mark of change constant data.Wherein, the corresponding index position pointer of constant data is used In the storage location for being directed toward constant data, and constant data length mark is used to identify the length of constant data.It will thus be seen that The application the processing such as does not modify to constant data itself, but to storage parameter (the index position pointer of constant data And/or constant data length) encrypt, to advantageously reduce code expansion, and it is conducive to reinforce the promotion of efficiency.
Wherein, it is the normal operation of guarantee procedure, is encrypted to constant data corresponding constant data storage parameter After processing, the constant data storage location that currently corresponding index position pointer is directed toward is attribute-readable;And/or constant number Attribute-readable can be revised as according to the storage location that current corresponding index position pointer is directed toward;And/or constant data is currently right The index position pointer offset constant data answered storage location currently pointed after corresponding constant data length, is readable Attribute;And/or constant data currently corresponding index position pointer offset constant data currently corresponding constant data length it Pointed storage location afterwards, can be revised as attribute-readable.
If specific type of data includes data segment symbol data, the specific step which is encrypted It suddenly include: data segment symbol data to be determined from the data segment of binary file, and it is corresponding to obtain data segment symbol data Index position pointer;Migration processing is carried out to the corresponding index position pointer of data segment symbol data.Wherein, data segment symbolic number According to further comprising: relevant to class symbol data (such as with class or the relevant function name of classification, method name, variable name), And/or symbol data relevant to selector, specifically, data segment symbol data is the symbol data that developer defines.
Wherein, after specific type of data (including data segment symbol data) is encrypted, data segment symbol The data storage location that currently corresponding index position pointer is directed toward is attribute-readable;And/or data segment symbol data is currently right The storage location that the index position pointer answered is directed toward can be revised as attribute-readable.To guarantee that program can operate normally.Into One step is optional, after carrying out migration processing to index position pointer relevant to selector, can further make selector Index position pointer be located in the method ciphertext list of class or classification, thus guarantee selector present operation when can be normal Operation.
If specific type of data includes chained segment symbol data, the specific steps encrypted to chained segment symbol data It include: starting position and the end position that system symbol data section table is determined from the chained segment of binary file, based on being The starting position of system symbol data section table and end position, are encrypted using predetermined encryption algorithm.For example, can be accorded with according to system System symbol data section table all or part of the content is encrypted in the starting position of number section table and end position.
In a kind of optional embodiment, symmetric encipherment algorithm can be used to the constant data storage ginseng of constant data Number, the corresponding index position pointer of data segment symbol data, and/or chained segment symbol data are encrypted.The present embodiment Without limitation to specific symmetric encipherment algorithm.
Step S230 is obtained and is stored decryption code key corresponding with Encryption Algorithm.
Specifically, in the Encryption Algorithm to be matched using the classification with specific type of data, specific type of data is carried out After encryption, available and storage decryption code key corresponding with the encryption method.
Wherein, during code key is decrypted in storage, one of following storage mode or a variety of combinations can be used:
In one embodiment, decryption code key can be stored in the meaningless field in binary file, and guarantee to deposit It is attribute-readable that storage space, which is set in program operation, or can be revised as attribute-readable.Wherein, which can be two The white space between certain blank or hashed field, such as file header end and code segment starting position in binary file. To promote the crypticity of decryption code key, and avoid occupying extra stored memory.
In another embodiment, preset decryption code key storage segment table can be created, decryption code key is stored in decryption Code key stores in segment table.For example, entitled " _ _ DATA, the segment table of _ _ keysymbols " " can be created, and decryption code key is stored in In the newly-built segment table, consequently facilitating the centralized management of decryption code key.
In yet another embodiment, decryption code key can be stored in application program installation kit in the form of default file. For example, can be stored in the form of text, picture etc. in IPA installation kit, so that decryption code key is separated with binary file, Further promote the reverse difficulty of application program.
In another embodiment, the type, occupied of code key can be such as decrypted according to the relevant information of decryption code key Space size etc. dynamically determines the storage mode of decryption code key.
It is the normal operation of guarantee procedure after the reinforcing for completing application program, decryption journey can be executed when program is run Sequence is decrypted with obtaining decryption code key using the specific type of data after decryption secret key pair encryption.
Optionally, further to promote consolidation effect, decryption program can be compiled as to dynamic link library, and in binary system text The loading command of dynamic link library is added in part, and the loading command of dynamic link library is made to be located at the first place of chained command, with guarantor Demonstrate,proving the order can execute at first.
Optionally, the code segment in binary file can also be modified, to be inserted into decryption program, and is made in binary file The variation of other segment tables caused by pre-set programs entrance is directed toward decryption program, and adaptation changes because of code segment.
It can be seen that program reinforcement means provided by the present embodiment, it can be based on the application program installation generated Packet, carries out the reinforcing of application program, so as to avoid in the prior art because carrying out journey by the compiler in developer's terminal Sequence is reinforced and bring can not be safeguarded in batches and maintenance cost is high drawback;Also, in reinforcing process, to constant data, number It is encrypted according to section symbol data and chained segment symbol data, so that the reinforcing to application program is realized in all directions, from And increase the reverse difficulty to application program;Also, in the present embodiment, to constant data, data segment symbol data and chained segment The encryption of the non-code segment such as symbol data advantageously reduces code expansion, conducive to the promotion for reinforcing efficiency, and has and preferably adds Gu effect;In addition, this programme implementation process simple and flexible, is easy to batch and safeguards that maintenance cost is low, is easy to large-scale application and reality It applies.
Fig. 3 shows a kind of program based on application program installation kit provided according to an embodiment of the present invention and reinforces dress The structural schematic diagram set.As shown in figure 3, the device includes: extraction module 31, determining module 32 and encrypting module 33.
Extraction module 31, suitable for extracting binary file from the application program installation kit;
Determining module 32, a variety of specific type numbers that the non-code segment being adapted to determine that in the binary file is included According to;Wherein, the specific type of data includes constant data and symbol data;
Encrypting module 33, suitable for the Encryption Algorithm to be matched using the classification with the specific type of data, to the spy Determine categorical data to be encrypted.
Optionally, if the specific type of data includes constant data;Then encrypting module 33 is further adapted for:
The corresponding index position pointer of the constant data and/or constant are extracted from the data segment of the binary file Data length mark;
Migration processing is carried out to the corresponding index position pointer of the constant data;And/or change the constant data pair The content for the constant data length mark answered.
Optionally, it is described the specific type of data is encrypted after,
The constant data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the constant data storage location that currently corresponding index position pointer is directed toward can be revised as it is readable Attribute;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, is attribute-readable;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, attribute-readable can be revised as.
Optionally, the symbol data further comprises: data segment symbol data and chained segment symbol data.
Optionally, if the specific type of data includes data segment symbol data;
Then encrypting module 33 is further adapted for:
Data segment symbol data is determined from the data segment of the binary file, and obtains the data segment symbolic number According to corresponding index position pointer;
Migration processing is carried out to the corresponding index position pointer of the data segment symbol data.
Optionally, it is described the specific type of data is encrypted after,
The data segment symbol data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the data segment symbol data storage location that currently corresponding index position pointer is directed toward can be modified For attribute-readable.
Optionally, the data segment symbol data further comprises: symbol data relevant to class, and/or and selector Relevant symbol data.
Optionally, if the specific type of data includes chained segment symbol data;
Then encrypting module 33 is further adapted for:
Starting position and the end position of system symbol data section table are determined from the chained segment of the binary file, Starting position and end position based on the system symbol data section table, are encrypted using predetermined encryption algorithm.
Optionally, device further include: cipher key storage block (not shown) is suitable for described to the specific type After data are encrypted, obtain and store decryption code key corresponding with the Encryption Algorithm.
Optionally, cipher key storage block is further adapted for: the decryption code key is stored in the binary file In meaningless field;
And/or the preset decryption code key of creation stores segment table, and the decryption code key is stored in the decryption code key and is stored In segment table;
And/or the decryption code key is stored in the application program installation kit in the form of default file.
Optionally, device further include: deciphering module (not shown) is suitable for executing decryption journey in program operation Sequence is decrypted with obtaining the decryption code key using the specific type of data after the decryption secret key pair encryption Processing.
Optionally, the device further include: order adding module (not shown), suitable for the decryption program is compiled as Dynamic link library, and the loading command of the dynamic link library is added in the binary file, and make the dynamic link The loading command in library is located at the first place of all-links order.
Optionally, device further include: program is inserted into module (not shown), is suitably modified in the binary file Code segment, to be inserted into the decryption program, and pre-set programs entrance is made in the binary file to be directed toward the decryption program.
Wherein, in device provided by the present embodiment each module specific implementation process, can refer to shown in Fig. 1 and/or Fig. 2 The description of corresponding portion in embodiment of the method, this will not be repeated here for the present embodiment.
It can be seen that the present embodiment extracts binary file from application program installation kit;It determines in binary file A variety of specific type of data that non-code segment is included;Wherein, specific type of data includes constant data and symbol data;Using The Encryption Algorithm to match with the classification of specific type of data, is encrypted specific type of data.This programme by pair The encryption of specific type of data, can be realized the reinforcing to application program in the non-code segment of binary file, thus substantially The reverse difficulty for promoting application program, effectively prevent the conversed analysis to application program, and be not easy to cause the generation of application program Code expansion;Moreover, this programme implementation process simple and flexible, is easy to batch and safeguards that maintenance cost is low.
A kind of nonvolatile computer storage media is provided according to an embodiment of the present invention, and the computer storage is situated between Matter is stored with an at least executable instruction, the computer executable instructions can be performed in above-mentioned any means embodiment based on answering With the program reinforcement means of program installation kit.
Fig. 4 shows a kind of structural schematic diagram of the calculating equipment provided according to an embodiment of the present invention, the present invention Specific embodiment does not limit the specific implementation for calculating equipment.
As shown in figure 4, the calculating equipment may include: processor (processor) 402, communication interface (Communications Interface) 404, memory (memory) 406 and communication bus 408.
Wherein:
Processor 402, communication interface 404 and memory 406 complete mutual communication by communication bus 408.
Communication interface 404, for being communicated with the network element of other equipment such as client or other servers etc..
Processor 402 can specifically execute the above-mentioned program based on application program installation kit and add for executing program 410 Correlation step in solid method embodiment.
Specifically, program 410 may include program code, which includes computer operation instruction.
Processor 402 may be central processor CPU or specific integrated circuit ASIC (Application Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention Road.The one or more processors that equipment includes are calculated, can be same type of processor, such as one or more CPU;It can also To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 406, for storing program 410.Memory 406 may include high speed RAM memory, it is also possible to further include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 410 specifically can be used for so that processor 402 executes following operation:
Binary file is extracted from the application program installation kit;
Determine a variety of specific type of data that the non-code segment in the binary file is included;Wherein, described specific Categorical data includes constant data and symbol data;
The Encryption Algorithm to be matched using the classification with the specific type of data, adds the specific type of data Close processing.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
If the specific type of data includes constant data;It is then extracted from the data segment of the binary file described normal Measure the corresponding index position pointer of data and/or constant data length mark;
Migration processing is carried out to the corresponding index position pointer of the constant data;And/or change the constant data pair The content for the constant data length mark answered.
In a kind of optional embodiment, it is described the specific type of data is encrypted after,
The constant data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the constant data storage location that currently corresponding index position pointer is directed toward can be revised as it is readable Attribute;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, is attribute-readable;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, attribute-readable can be revised as.
In a kind of optional embodiment, the symbol data further comprises: data segment symbol data and link Section symbol data.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
If the specific type of data includes data segment symbol data;It is determined from the data segment of the binary file Data segment symbol data, and obtain the corresponding index position pointer of the data segment symbol data;
Migration processing is carried out to the corresponding index position pointer of the data segment symbol data.
In a kind of optional embodiment, it is described the specific type of data is encrypted after,
The data segment symbol data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the data segment symbol data storage location that currently corresponding index position pointer is directed toward can be modified For attribute-readable.
In a kind of optional embodiment, the data segment symbol data further comprises: symbolic number relevant to class According to, and/or symbol data relevant to selector.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
If the specific type of data includes chained segment symbol data;Then determined from the chained segment of the binary file The starting position of system symbol data section table and end position out, starting position and knot based on the system symbol data section table Beam position is encrypted using predetermined encryption algorithm.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
It is described the specific type of data is encrypted after, obtain and store corresponding with the Encryption Algorithm Decryption code key.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
The decryption code key is stored in the meaningless field in the binary file;
And/or the preset decryption code key of creation stores segment table, and the decryption code key is stored in the decryption code key and is stored In segment table;
And/or the decryption code key is stored in the application program installation kit in the form of default file.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
In program operation, decryption program is executed, to obtain the decryption code key, at the decryption secret key pair encryption The specific type of data after reason is decrypted.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
The decryption program is compiled as dynamic link library, and adds the dynamic link library in the binary file Loading command, and the loading command of the dynamic link library is made to be located at the first place of all-links order.
In a kind of optional embodiment, program 410 specifically can be used for so that processor 402 executes following operation:
The code segment in the binary file is modified, to be inserted into the decryption program, and is made in the binary file Pre-set programs entrance is directed toward the decryption program.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein. Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any Can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice Microprocessor or digital signal processor (DSP) realize the journey according to an embodiment of the present invention based on application program installation kit The some or all functions of some or all components in sequence bracing means.The present invention is also implemented as executing this In described method some or all device or device programs (for example, computer program and computer program Product).It is such to realize that program of the invention can store on a computer-readable medium, it either can have one or more The form of a signal.Such signal can be downloaded from an internet website to obtain, be perhaps provided on the carrier signal or with Any other form provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame Claim.
The invention discloses: a kind of program reinforcement means based on application program installation kit of A1., comprising:
Binary file is extracted from the application program installation kit;
Determine a variety of specific type of data that the non-code segment in the binary file is included;Wherein, described specific Categorical data includes constant data and symbol data;
The Encryption Algorithm to be matched using the classification with the specific type of data, adds the specific type of data Close processing.
A2. method according to a1, wherein if the specific type of data includes constant data;
The then Encryption Algorithm that the classification using with the specific type of data matches, to the specific type of data It is encrypted and further comprises:
The corresponding index position pointer of the constant data and/or constant are extracted from the data segment of the binary file Data length mark;
Migration processing is carried out to the corresponding index position pointer of the constant data;And/or change the constant data pair The content for the constant data length mark answered.
A3. the method according to A2, wherein it is described the specific type of data is encrypted after,
The constant data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the constant data storage location that currently corresponding index position pointer is directed toward can be revised as it is readable Attribute;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, is attribute-readable;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, attribute-readable can be revised as.
A4. method according to a1, wherein the symbol data further comprises: data segment symbol data and chain Connect a section symbol data.
A5. method according to a4, wherein if the specific type of data includes data segment symbol data;
The then Encryption Algorithm that the classification using with the specific type of data matches, to the specific type of data It is encrypted and further comprises:
Data segment symbol data is determined from the data segment of the binary file, and obtains the data segment symbolic number According to corresponding index position pointer;
Migration processing is carried out to the corresponding index position pointer of the data segment symbol data.
A6. method according to a5, wherein it is described the specific type of data is encrypted after,
The data segment symbol data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the data segment symbol data storage location that currently corresponding index position pointer is directed toward can be modified For attribute-readable.
A7. method according to a5, wherein the data segment symbol data further comprises: symbol relevant to class Data, and/or symbol data relevant to selector.
A8. method according to a4, wherein if the specific type of data includes chained segment symbol data;
The then Encryption Algorithm that the classification using with the specific type of data matches, to the specific type of data It is encrypted and further comprises:
Starting position and the end position of system symbol data section table are determined from the chained segment of the binary file, Starting position and end position based on the system symbol data section table, are encrypted using predetermined encryption algorithm.
A9. the method according to any one of A1-A8, wherein the specific type of data is encrypted described After processing, the method also includes:
It obtains and stores decryption code key corresponding with the Encryption Algorithm.
A10. the method according to A9, wherein the acquisition simultaneously stores decryption code key corresponding with the Encryption Algorithm Further comprise:
The decryption code key is stored in the meaningless field in the binary file;
And/or the preset decryption code key of creation stores segment table, and the decryption code key is stored in the decryption code key and is stored In segment table;
And/or the decryption code key is stored in the application program installation kit in the form of default file.
A11. the method according to A9, wherein the method also includes:
In program operation, decryption program is executed, to obtain the decryption code key, at the decryption secret key pair encryption The specific type of data after reason is decrypted.
A12. the method according to A11, wherein the method also includes:
The decryption program is compiled as dynamic link library, and adds the dynamic link library in the binary file Loading command, and the loading command of the dynamic link library is made to be located at the first place of all-links order.
A13. the method according to A11, wherein the method also includes:
The code segment in the binary file is modified, to be inserted into the decryption program, and is made in the binary file Pre-set programs entrance is directed toward the decryption program.
The invention also discloses: a kind of program bracing means based on application program installation kit of B14., comprising:
Extraction module, suitable for extracting binary file from the application program installation kit;
Determining module, a variety of specific type of data that the non-code segment being adapted to determine that in the binary file is included; Wherein, the specific type of data includes constant data and symbol data;
Encrypting module, suitable for the Encryption Algorithm to be matched using the classification with the specific type of data, to described specific Categorical data is encrypted.
B15. device according to b14, wherein if the specific type of data includes constant data;
Then the encrypting module is further adapted for:
The corresponding index position pointer of the constant data and/or constant are extracted from the data segment of the binary file Data length mark;
Migration processing is carried out to the corresponding index position pointer of the constant data;And/or change the constant data pair The content for the constant data length mark answered.
B16. the device according to B15, wherein it is described the specific type of data is encrypted after,
The constant data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the constant data storage location that currently corresponding index position pointer is directed toward can be revised as it is readable Attribute;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, is attribute-readable;
And/or the constant data currently constant data described in corresponding index position pointer offset it is current it is corresponding often Data length storage location pointed later is measured, attribute-readable can be revised as.
B17. device according to b14, wherein the symbol data further comprises: data segment symbol data and Chained segment symbol data.
B18. the device according to B17, wherein if the specific type of data includes data segment symbol data;
Then the encrypting module is further adapted for:
Data segment symbol data is determined from the data segment of the binary file, and obtains the data segment symbolic number According to corresponding index position pointer;
Migration processing is carried out to the corresponding index position pointer of the data segment symbol data.
B19. the device according to B18, wherein it is described the specific type of data is encrypted after,
The data segment symbol data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the data segment symbol data storage location that currently corresponding index position pointer is directed toward can be modified For attribute-readable.
B20. the device according to B18, wherein the data segment symbol data further comprises: symbol relevant to class Number, and/or symbol data relevant to selector.
B21. the device according to B17, wherein if the specific type of data includes chained segment symbol data;
Then the encrypting module is further adapted for:
Starting position and the end position of system symbol data section table are determined from the chained segment of the binary file, Starting position and end position based on the system symbol data section table, are encrypted using predetermined encryption algorithm.
B22. the device according to any one of B14-B21, wherein described device further include: cipher key storage block is fitted In it is described the specific type of data is encrypted after, obtain and store decryption corresponding with the Encryption Algorithm Code key.
B23. the device according to B22, wherein the cipher key storage block is further adapted for: by the decryption code key It is stored in the meaningless field in the binary file;
And/or the preset decryption code key of creation stores segment table, and the decryption code key is stored in the decryption code key and is stored In segment table;
And/or the decryption code key is stored in the application program installation kit in the form of default file.
B24. the device according to B22, wherein described device further include:
Deciphering module is suitable for executing decryption program in program operation to obtain the decryption code key and utilizing the solution The specific type of data after close secret key pair encryption is decrypted.
B25. the device according to B24, wherein described device further include:
Order adding module, suitable for the decryption program is compiled as dynamic link library, and in the binary file The loading command of the dynamic link library is added, and the loading command of the dynamic link library is made to be located at the head of all-links order Position.
B26. the device according to B24, wherein described device further include:
Program is inserted into module, and the code segment being suitably modified in the binary file to be inserted into the decryption program, and makes Pre-set programs entrance is directed toward the decryption program in the binary file.
The invention also discloses: a kind of calculating equipment of C27., comprising: processor, memory, communication interface and communication are total Line, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory executes the processor such as storing an at least executable instruction, the executable instruction The corresponding operation of program reinforcement means described in any one of A1-A13 based on application program installation kit.
The invention also discloses a kind of computer storage medium of D28., being stored at least one in the storage medium can be held Row instruction, the executable instruction make processor execute the journey based on application program installation kit as described in any one of A1-A13 The corresponding operation of sequence reinforcement means.

Claims (10)

1. a kind of program reinforcement means based on application program installation kit characterized by comprising
Binary file is extracted from the application program installation kit;
Determine a variety of specific type of data that the non-code segment in the binary file is included;Wherein, the specific type Data include constant data and symbol data;
The Encryption Algorithm to be matched using the classification with the specific type of data, carries out at encryption the specific type of data Reason.
2. the method according to claim 1, wherein if the specific type of data includes constant data;
The then Encryption Algorithm that the classification using with the specific type of data matches, carries out the specific type of data Encryption further comprises:
The corresponding index position pointer of the constant data and/or constant data are extracted from the data segment of the binary file Length mark;
Migration processing is carried out to the corresponding index position pointer of the constant data;And/or to change the constant data corresponding The content of constant data length mark.
3. according to the method described in claim 2, it is characterized in that, the specific type of data is encrypted described Later,
The constant data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or the constant data storage location that currently corresponding index position pointer is directed toward can be revised as attribute-readable;
And/or the current current corresponding constant number of constant data described in corresponding index position pointer offset of the constant data It is attribute-readable according to storage location pointed after length;
And/or the current current corresponding constant number of constant data described in corresponding index position pointer offset of the constant data According to storage location pointed after length, attribute-readable can be revised as.
4. the method according to claim 1, wherein the symbol data further comprises: data segment symbolic number Accordingly and chained segment symbol data.
5. according to the method described in claim 4, it is characterized in that, if the specific type of data includes data segment symbolic number According to;
The then Encryption Algorithm that the classification using with the specific type of data matches, carries out the specific type of data Encryption further comprises:
Data segment symbol data is determined from the data segment of the binary file, and obtains the data segment symbol data pair The index position pointer answered;
Migration processing is carried out to the corresponding index position pointer of the data segment symbol data.
6. according to the method described in claim 5, it is characterized in that, the specific type of data is encrypted described Later,
The data segment symbol data storage location that currently corresponding index position pointer is directed toward is attribute-readable;
And/or can be revised as can for the data segment symbol data storage location that currently corresponding index position pointer is directed toward Read attribute.
7. according to the method described in claim 5, it is characterized in that, the data segment symbol data further comprises: with class phase The symbol data of pass, and/or symbol data relevant to selector.
8. a kind of program bracing means based on application program installation kit characterized by comprising
Extraction module, suitable for extracting binary file from the application program installation kit;
Determining module, a variety of specific type of data that the non-code segment being adapted to determine that in the binary file is included;Wherein, The specific type of data includes constant data and symbol data;
Encrypting module, suitable for the Encryption Algorithm to be matched using the classification with the specific type of data, to the specific type Data are encrypted.
9. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, the processor, the storage Device and the communication interface complete mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction Ask the corresponding operation of program reinforcement means described in any one of 1-7 based on application program installation kit.
10. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium Execute processor as the program reinforcement means of any of claims 1-7 based on application program installation kit is corresponding Operation.
CN201910257445.0A 2019-03-28 2019-04-01 Program reinforcing method and device based on application program installation package Active CN110119601B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910245606 2019-03-28
CN2019102456064 2019-03-28

Publications (2)

Publication Number Publication Date
CN110119601A true CN110119601A (en) 2019-08-13
CN110119601B CN110119601B (en) 2022-07-12

Family

ID=67520638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910257445.0A Active CN110119601B (en) 2019-03-28 2019-04-01 Program reinforcing method and device based on application program installation package

Country Status (1)

Country Link
CN (1) CN110119601B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021151347A1 (en) * 2020-05-29 2021-08-05 平安科技(深圳)有限公司 Ios application-based reinforcement method, apparatus, device, and storage medium
CN113434148A (en) * 2021-06-30 2021-09-24 平安普惠企业管理有限公司 Decryption-preventing client development compiling method and device, electronic equipment and storage medium
CN114282180A (en) * 2021-11-19 2022-04-05 北京云测信息技术有限公司 Code protection method and device, electronic equipment and storage medium
CN114519043A (en) * 2021-12-31 2022-05-20 北京握奇数据股份有限公司 Executable binary file format reverse analysis method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040133794A1 (en) * 2001-03-28 2004-07-08 Kocher Paul C. Self-protecting digital content
CN103745141A (en) * 2013-12-02 2014-04-23 上海斐讯数据通信技术有限公司 Method for preventing application program in intelligent terminal android system from being decompiled
CN106960156A (en) * 2016-01-08 2017-07-18 广州市动景计算机科技有限公司 Data encryption and access method based on application program, device
CN107977553A (en) * 2017-12-25 2018-05-01 中国电子产品可靠性与环境试验研究所 The method and device of the security hardening of mobile applications
CN109062582A (en) * 2018-07-23 2018-12-21 北京云测信息技术有限公司 A kind of encryption method and device of application installation package

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040133794A1 (en) * 2001-03-28 2004-07-08 Kocher Paul C. Self-protecting digital content
CN103745141A (en) * 2013-12-02 2014-04-23 上海斐讯数据通信技术有限公司 Method for preventing application program in intelligent terminal android system from being decompiled
CN106960156A (en) * 2016-01-08 2017-07-18 广州市动景计算机科技有限公司 Data encryption and access method based on application program, device
CN107977553A (en) * 2017-12-25 2018-05-01 中国电子产品可靠性与环境试验研究所 The method and device of the security hardening of mobile applications
CN109062582A (en) * 2018-07-23 2018-12-21 北京云测信息技术有限公司 A kind of encryption method and device of application installation package

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021151347A1 (en) * 2020-05-29 2021-08-05 平安科技(深圳)有限公司 Ios application-based reinforcement method, apparatus, device, and storage medium
CN113434148A (en) * 2021-06-30 2021-09-24 平安普惠企业管理有限公司 Decryption-preventing client development compiling method and device, electronic equipment and storage medium
CN113434148B (en) * 2021-06-30 2024-03-22 广东迅维信息产业股份有限公司 Decryption-preventing client development compiling method and device, electronic equipment and storage medium
CN114282180A (en) * 2021-11-19 2022-04-05 北京云测信息技术有限公司 Code protection method and device, electronic equipment and storage medium
CN114519043A (en) * 2021-12-31 2022-05-20 北京握奇数据股份有限公司 Executable binary file format reverse analysis method
CN114519043B (en) * 2021-12-31 2024-05-24 北京握奇数据股份有限公司 Executable binary file format reverse analysis method

Also Published As

Publication number Publication date
CN110119601B (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN110119601A (en) Program reinforcement means and device based on application program installation kit
US10586026B2 (en) Simple obfuscation of text data in binary files
CN105683990B (en) Method and apparatus for protecting dynamic base
JP6078555B2 (en) Virtual machine device and method using key-driven obfuscation
CN104239757B (en) Application program reversing-preventing method and device and operation method and terminal
CN107273723B (en) So file shell adding-based Android platform application software protection method
CN104680039B (en) A kind of data guard method and device of application program installation kit
CN106203006A (en) Android application reinforcement means based on dex Yu so file Dynamic Execution
CN108830096B (en) Data processing method and device, electronic equipment and storage medium
CN104317625A (en) Dynamic loading method for APK files
CN104408337A (en) Reinforcement method for preventing reverse of APK (Android package) file
CN109784007A (en) A kind of method of byte code encryption, the method and terminal of bytecode decryption
CN109241707A (en) Application program obscures method, apparatus and server
CN110119600A (en) Program reinforcement means and device based on application program installation kit
CN109598107A (en) A kind of code conversion method and device based on application installation package file
WO2019062015A1 (en) Source code protection method, application server, and computer-readable storage medium
CA3150187C (en) Method and apparatus for protecting web script codes
CN109960509A (en) Using the method, apparatus of reinforcing, calculate equipment and computer storage medium
CN110147653A (en) Application security reinforcement means and device
KR101734663B1 (en) Method for preventing reverse engineering of android application and apparatus for performing the method
CN114547558B (en) Authorization method, authorization control device, equipment and medium
CN108733990B (en) Block chain-based file protection method and terminal equipment
CN110135154A (en) The injection attack detection system and method for application program
CN108182358B (en) File protection method and device, computing equipment and computer storage medium
CN109598105A (en) A kind of microcontroller is safely loaded with the method, apparatus, computer equipment and storage medium of firmware

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant