CN109062582A - A kind of encryption method and device of application installation package - Google Patents
A kind of encryption method and device of application installation package Download PDFInfo
- Publication number
- CN109062582A CN109062582A CN201810811830.0A CN201810811830A CN109062582A CN 109062582 A CN109062582 A CN 109062582A CN 201810811830 A CN201810811830 A CN 201810811830A CN 109062582 A CN109062582 A CN 109062582A
- Authority
- CN
- China
- Prior art keywords
- encryption
- entry address
- executable file
- installation package
- application
- 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
Links
- 238000009434 installation Methods 0.000 title claims abstract description 81
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000003860 storage Methods 0.000 claims abstract description 42
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 19
- 238000012545 processing Methods 0.000 claims description 17
- 230000006837 decompression Effects 0.000 claims description 5
- 238000012856 packing Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 39
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 9
- 238000005336 cracking Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000018109 developmental process Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000033772 system development Effects 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 239000000654 additive Substances 0.000 description 1
- 230000000996 additive effect Effects 0.000 description 1
- 238000009412 basement excavation Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002265 prevention Effects 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/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/53—Decompilation; Disassembly
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Storage Device Security (AREA)
Abstract
This application discloses a kind of encryption methods of application installation package, to solve the problem of that application program installation kit may be cracked by modes such as decompilings and application program operation code is caused to reveal.Method includes: the executable file obtained in application installation package to be encrypted;Entry address to be encrypted is determined in the executable file, wherein the entry address is used to indicate the storage position of class name or function name in executable file;Call it is pre-set obscure Encryption Algorithm the entry address carried out to obscure encryption, to obtain obscuring encryption entry address;Based on comprising the executable file for obscuring encryption entry address, encryption application installation package is generated.Disclosed herein as well is a kind of encryption devices of application program installation kit.
Description
Technical field
This application involves field of computer technology more particularly to the encryption methods and device of a kind of application installation package.
Background technique
It is more and more that there is different function and can be applied to intelligent terminal with the continuous development of Internet information technique
Application program in equipment is developed, and greatly enriches daily life.Application program mentioned here, than
Such as, it can be the application program on computer, the application (Application, APP) being also possible on mobile terminal.
However, with the rapid development of end-use market, application program by mountain vallage, be cracked the problem of also become more next
It is more serious.For some outstanding applications, due to lacking the protection mechanism to source code, it is easy to decompiling can be passed through
Mode cracks, and causes the leakage of application code, this will bring very big loss to the developer of application program.
All the time, Apple Inc.'s Mobile operating system IOS system makes due to itself having a variety of safety prevention measures
Obtain IOS system and for IOS system development using famous with safety always.
But with the fast development of the technologies such as bug excavation and reverse-engineering, IOS system also becomes no longer as former
Safety like that, for malicious events such as ios platform apple application packet the cracking of (iPhone Application, IPA), mountain vallages
Become to emerge one after another.And due to the closure of IOS system itself, many software development commercial cities, which abandon, all the time is directed to
The security protection of ios platform IPA packet causes the IPA packet for ios platform exploitation to have no when cracking means in face of decompiling etc.
Security protection, so that code be easily caused to reveal.
Therefore lift pins crack difficulty to what the IPA application of IOS system development was wrapped, become urgent problem to be solved.
Summary of the invention
The embodiment of the present application provides a kind of encryption method of application installation package, may be broken to solve application installation package
The problem of solving, and application program operation code caused to reveal.
The embodiment of the present application also provides a kind of encryption device of application installation package, may be by solve application installation package
The problem of cracking, and application program operation code caused to reveal.
The embodiment of the present application adopts the following technical solutions:
A kind of encryption method of application installation package characterized by comprising
Obtain the executable file in application installation package to be encrypted;Determination is to be encrypted in the executable file enters
Port address, wherein the entry address is used to indicate the storage position of class name or function name in executable file;It calls preparatory
The Encryption Algorithm of obscuring being arranged carries out the entry address to obscure encryption, to obtain obscuring encryption entry address;It is based on
Comprising the executable file for obscuring encryption entry address, encryption application installation package is generated.
A kind of encryption device of application installation package characterized by comprising
Executable file acquiring unit, for obtaining the executable file in application installation package to be encrypted;
Entry address determination unit, for determining entry address to be encrypted in the executable file, wherein described
Entry address is used to indicate the storage position of class name or function name in executable file;
Encryption unit pre-set obscure Encryption Algorithm and obscure at encryption to the entry address for calling
Reason, to obtain obscuring encryption entry address;
Installation kit generation unit, for generating encryption based on comprising the executable file for obscuring encryption entry address
Application installation package.
The embodiment of the present application use at least one above-mentioned technical solution can reach it is following the utility model has the advantages that
Using method provided by the embodiment of the present application, by the executable text of the application installation package to be encrypted got
Part determines in the executable file and needs what is encrypted to be used to indicate the storage position of class name or function name in executable file
Entry address, and by call it is pre-set obscure Encryption Algorithm the entry address carried out to obscure encryption, in turn
Obtain obscuring encryption entry address, it is subsequent can be based on encryption be generated comprising the executable file for obscuring encryption entry address after
Application installation package.Due in the present solution, entry address is obscured by encryption in executable file, i.e., according to the entrance
It is required correct class name or function name that address, which can not be found using operation, thus even if passing through the means such as decompiling
Crack to the application installation package encrypted the executable file of the rear available application program using this programme, still
Since entry address is after carrying out obscuring processing in executable file, thus cracks personnel and still can not according to the entry address
Correct class name and function name required for obtaining the application at runtime, and then the class name and function name of the application can not be passed through
Come the problem of determining the code of the program, revealed so as to avoid application code.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen
Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is a kind of idiographic flow schematic diagram of the encryption method of application installation package provided by the embodiments of the present application;
Fig. 2 is a kind of concrete structure schematic diagram of the executable file of Mach-O format provided by the embodiments of the present application;
Fig. 3 is a kind of concrete structure schematic diagram of the encryption device of application installation package provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
The embodiment of the present application provides a kind of encryption method of application installation package, may be by solve application installation package
The problem of cracking, and application program operation code caused to reveal.
The encryption method of application installation package provided by the embodiments of the present application, the executing subject of this method, can be, but not limited to
For mobile phone, tablet computer, PC (Personal Computer, PC), smart television and any can run using journey
At least one of terminal device of sequence.In addition, the executing subject of this method, is also possible to server, for example, for application
The server (being properly termed as application installation package encryption server) that installation kit is encrypted, etc..
For ease of description, hereafter executing subject in this way be application program installation kit encryption server for, to this
The embodiment of method is introduced.It is appreciated that it is one kind that the executing subject of this method, which is application program encryption server,
Illustrative explanation, is not construed as the restriction to this method.
The specific implementation flow chart of this method is as shown in Figure 1, mainly include the following steps:
Step 11, the executable file in application installation package to be encrypted is obtained;
Include the installation file of the application program in the application installation package (Install Package), runs the peace
The installation file of the application, can be saved in the storage equipment (e.g., hard disk) of intelligent terminal by dress packet.
It is grasped it should be noted that application installation package encryption method provided by this programme can be for Apple Inc. is mobile
Make the application installation package (iPhoneApplication, IPA) in system (IOS system).Generally, the IPA installation of application program
Packet is often a zip compressed package, and this document includes 3 components: " .app file " under payload catalogue, this document is whole
The main program of a application, the inside contain the whole resources and executable file of the application;ITunesArtwork file, essence
It is the png picture without suffix name, for showing icon in iTunes;ITunesMetadata.plist file, record
The data such as buyer's information, price.
Thus in the embodiment of the present application, it after to application installation package decompression to be encrypted, can be obtained from decompression
The executable file of the application installation package is got in " .app file ".Wherein, the executable file in IPA installation kit is Mach
The file of Object (Mach-O) format.The executable file of Mach-O format is mainly made of following three parts, such as Fig. 2 institute
Show:
1, file header (Header), wherein file header often has specific word in the executable file of Mach-O format
Accord with length.
2, loading command area (Load commands), loading command area is often in the executable file of Mach-O format
It directly follows behind file header part, contains the loading command of multiple format, those loading commands add in Mach-O file
It when carrying parsing, is called by kernel loads device or dynamic linker, how guidance is arranged the corresponding binary data segment of load.
There are many kinds of the types for the loading command that loading command area is saved, can by ordering corresponding command type
To determine the order particular content that is included, and some of them order be used to indicate in operation the class name of required calling or
Function name can be determined to be used to indicate class name or letter in the storage position of data field according to the type of loading command
The loading command of several addresses, and determine in the loading command entry address for being used to indicate class name or function name.Tool
How body determines the entry address of class name or function name, the associated description in step 2 as described below in loading command area.
3, data field (Data) contains many data segments (segment) in data field, each data segment defines this
The attributes such as data, address and the memory of Mach-O file, these data segments are mapped in dynamic linker loading procedure
In virtual memory.Each data segment has different functions, generally comprises:
1) .__PAGEZERO: null pointer trap section is mapped to the first page of virtual memory space, for capturing to NULL
The reference of pointer;
2) it .__TEXT: contains and executes code and other read-only datas.In order to allow kernel by it directly from executable text
Part is mapped to shared drive, and the virtual memory permission that this section is arranged in static connector is not allow to write.
3) .__DATA: program data is contained;
4) .__OBJC:Objective-C run when Support Library, contain apply operation be required calling class, class
Title, the title of function and function;
5) .__LINKEDIT: contain the initial data used for dynamic link library, such as symbol, character string, relocation table
Entry etc..
Step 2: entry address to be encrypted is being determined in the executable file that step 1 is got by executing;
Wherein, the entry address in executable file is used to indicate the storage of class name or function name in executable file
Position.
Through related introduction above it is found that in the executable file of Mach-O format, it is used to indicate class name or function
Loading command area is often stored in the entry address of name storage position in the form of loading command, thus in the embodiment of the present application
In, the class name encrypted or function name can be obtained from the loading command area of the executable file of Mach-O format
Entry address.
It should be noted that the order saved in the executable file of Mach-O format in loading command area is often
With fixed format, for example, wherein the format ordered often may include:
Wherein, the format of the two information of command type cmd and entire order length is fixed, and shared character length
It is also fixation, occupies preceding 8 bytes.And payload [xxxx] then indicates the particular content of this order, and
The length of payload is also not fixed, and the entry address for being used to indicate class name or function name storage position is just stored in plus
In the payload for carrying order.
In the embodiment of the present application, application installation package encryption server can be traversed according to the file header of executable file
Loading command area, to determine entry address to be encrypted in loading command area.Specifically, can be come by following sub-step
Determine entry address to be encrypted in executable file:
Sub-step a: the file size of file header in executable file is determined, and according to the length of this document head, by distance
It is determined as the starting in first loading command area of the executable file at initial position this document head length of executable file
Position.
Assuming that the length of the file header determined is 6 bytes, then application installation package encryption server can will be apart from can hold
The position of 6 byte of initial position of style of writing part, is determined as the initial position of first loading command.
Sub-step b: according to the initial position by executing first loading command that sub-step 2 determines, traversal load life
All loading commands in area are enabled, to determine the class name or function that are used to indicate required calling in operation in loading command area
Storage position order of the name in data field.
It should be noted that multiple loading commands are usually contained in loading command area, and in the file header of executable file
In, there are specific fields generally to indicate the number of loading command in loading command area, thus in the present solution, application installation package adds
Close server can determine loading command quantity included in the loading command area according to the specific fields in file header, and
According to the quantity of loading command and the initial position of first loading command, each loading command in loading command area is determined
Initial position, and then realize to the traversal of each loading command, required for determining and be used to indicate in loading command area in operation
The storage position order of the class name of calling or function name in data field.
Sub-step c: determining to be used to indicate required calling in operation in loading command area by executing sub-step 2
Class name or function name, by the position of 8 byte of initial position apart from the order, determine after the storage position order of data field
For the order include the initial position of specific data, and successively determines the entry address in the order.
For example, the class name or function name for being used to indicate required calling in operation determined by executing sub-step 2
Storage position order in data field is as follows:
The SECTION information got as where class name, method name is ordered by loading following SEGMENT (32).
In mentioned order, cmd shows the type of the order, which is SEGMENT order, and cmdsize indicates the life
The length of order includes the length of owned SECTION, and segname indicates the title of the SEGMENT order, and vmaddr is indicated
The virtual memory address of the order meaning data, vmsize indicate the order meaning datarams size, and fileoff indicates data
Offset hereof, filesize indicate size of data, and nsects indicates the SECTION quantity that the SEGMENT is possessed,
SECTION has same format, can traverse its all SECTION data by nsects parameter, as follows:
By following SECTION (32) structure, the specific offset address hereof such as class name, method name is got.
In said structure, sectname indicates title, and segname indicates the SEGMENT title where the section,
Addr indicates datarams address, and size indicates size of data, and offset indicates data offset hereof, and wherein the
Content represented by addr and offset is then entry address to be determined in this programme.It thus can be accordingly for referring to
Show that the class name of required calling or function name are determined to be encrypted in the loading command of the storage position of data field in operation
Entry address.
Step 3: call it is pre-set obscure Encryption Algorithm the entry address carried out to obscure encryption, to obtain
Obscure encryption entry address;
It should be noted that in the present solution, mainly by modifying to the offset in entry address, so that logical
It crosses modified offset realization and encryption is obscured to entry address, specifically, this programme can use following methods to entering
Port address is obscured: according to pre-set encryption Obfuscating Algorithms, calculating the offset for obscuring the entry address;Root
The entry address is rewritten according to the offset, obscures entry address to obtain encryption.
In actual operation, kernel loads device can according in loading command address and offset, to determine needs
The class name of calling in the storage position of data field, thus in this programme can by change offset so that according to address
And the offset after obscuring can not determine that class name to be called in the correct storage location of data field, is installed application to reach
The encryption of packet is obscured.In one embodiment, the offset of obscuring calculated for the entry address can specifically include: really
The fixed storage area of the class name or function name in the executable file;According to the storage area in the executable text
Position in part calculates according to pre-set encryption Obfuscating Algorithms and obscures offset for the entry address, so that
According to it is described obscure offset and rewrite to obtain encryption obscure position indicated by entry address outside the storage area.
Specifically, offset can be carried out to obscure encryption using following methods in this programme, pre-seted at random first
Two constant numerical value, for calculating new offset, another passes through the two for calculating new memory length for one of them
Number and the offset determined before and memory length value is added or additive operation, and the knot verifying addition or subtracting each other
Whether fruit there is exception, and whether the data of each order are continuous, and by constantly correcting default value, obtains correct calculating
As a result, to obtain obscuring encrypted offset.
Obscure processing by above-mentioned so that in executable file entry address be encrypted, i.e., according to the entry address without
It is required correct class name or function name that method, which is found using operation, thus even if by means such as decompilings to use
The application installation package that this programme is encrypted crack the executable file of the rear available application program, but due to
Entry address is after carrying out obscuring processing in executable file, thus cracks personnel and be still unable to get this according to the entry address
Using required correctly class name and function name at runtime, and then can not be determined by the class name and function name of the application
The code of the program, the problem of leakage so as to avoid application code
Step 4: based on comprising the executable file for obscuring encryption entry address, generating encryption application installation package.
The encryption application installation package, application program installation kit as users to use.It is subsequent, encryption application can be issued
Installation kit downloads user according to demand and uses the encryption application installation package.Specifically, encryption can be applied
Installation kit is published to application program download platform (such as in application program store), downloads and uses for user.
Using the encryption method of application installation package provided by the embodiment of the present application, pacified by the application to be encrypted got
The executable file for filling packet determines that need to encrypt is used to indicate class name or function name in executable text in the executable file
The entry address of storage position in part, and pre-set obscure Encryption Algorithm by calling the entry address is obscured
Encryption, and then obtain obscuring encryption entry address, it is subsequent to encrypt the executable of entry address based on obscuring comprising this
The encrypted application installation package of file generated.Due in the present solution, entry address is obscured by encryption in executable file
, i.e., can not be found according to the entry address using operation is required correct class name or function name, thus even if
The application installation package encrypted using this programme is carried out cracking rear available application program by means such as decompilings
Executable file, but due in executable file entry address be after carrying out obscuring processing, thus crack personnel according to
The entry address correct class name and function name required for being still unable to get the application at runtime, and then can not be by this
The class name of application and function name determine the code of the program, the problem of so as to avoid application code leakage.
Present invention also provides a kind of encryption devices of application installation package, may be broken to solve application installation package
The problem of solving, and application program operation code caused to reveal.The concrete structure schematic diagram of the device is as shown in Figure 3, comprising: can hold
Row file obtaining unit 31, entry address determination unit 32, encryption unit 33 and installation kit generation unit 34.
Wherein, executable file acquiring unit 31, for obtaining the executable file in application installation package to be encrypted;
Entry address determination unit 32, for determining entry address to be encrypted in the executable file, wherein institute
It states entry address and is used to indicate the storage position of class name or function name in executable file;
Obfuscation unit 33 pre-set obscure Encryption Algorithm and obscure at encryption to the entry address for calling
Reason, to obtain obscuring encryption entry address;
Installation kit generation unit 34, for generating and adding based on comprising the executable file for obscuring encryption entry address
Close application installation package.
In one embodiment, entry address determination unit is specifically used for: obscuring calculation according to pre-set encryption
Method calculates the offset for obscuring the entry address;The entry address is rewritten according to the offset, with
Entry address is obscured to encryption.
In one embodiment, encryption unit is specifically used for: determining the class name or function name in the executable text
Storage area in part;It is mixed according to pre-set encryption according to position of the storage area in the executable file
Confuse algorithm, calculates and obscures offset for the entry address so that according to it is described obscure offset and rewrite encrypted
Position indicated by entry address is obscured outside the storage area.
In one embodiment, executable file acquiring unit is specifically used for: obtaining the application installation to be encrypted
Packet;Processing is unziped it to the application installation package to be encrypted, obtains the executable file.
In one embodiment, installation kit generation unit is specifically used for: obscuring entry address to comprising the encryption
Executable file carries out packing processing corresponding with the decompression, to obtain encryption application installation package.
In one embodiment, the application installation package is iOS application packet.
Using the encryption device of application installation package provided by the embodiment of the present application, pacified by the application to be encrypted got
The executable file for filling packet determines that need to encrypt is used to indicate class name or function name in executable text in the executable file
The entry address of storage position in part, and pre-set obscure Encryption Algorithm by calling the entry address is obscured
Encryption, and then obtain obscuring encryption entry address, it is subsequent to encrypt the executable of entry address based on obscuring comprising this
The encrypted application installation package of file generated.Due in the present solution, entry address is obscured by encryption in executable file
, i.e., can not be found according to the entry address using operation is required correct class name or function name, thus even if
The application installation package encrypted using this programme is carried out cracking rear available application program by means such as decompilings
Executable file, but due in executable file entry address be after carrying out obscuring processing, thus crack personnel according to
The entry address correct class name and function name required for being still unable to get the application at runtime, and then can not be by this
The class name of application and function name determine the code of the program, the problem of so as to avoid application code leakage.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art
For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal
Replacement, improvement etc., should be included within the scope of the claims of this application.
Claims (12)
1. a kind of encryption method of application installation package characterized by comprising
Obtain the executable file in application installation package to be encrypted;
Entry address to be encrypted is determined in the executable file, wherein the entry address is used to indicate class name or letter
Several storage positions in executable file;
Call it is pre-set obscure Encryption Algorithm the entry address carried out to obscure encryption, with obtain obscuring encrypt into
Port address;
Based on comprising the executable file for obscuring encryption entry address, encryption application installation package is generated.
2. the method according to claim 1, wherein described call pre-set encryption Obfuscating Algorithms to described
Entry address carries out encryption and obscures processing, obscures entry address to obtain encryption, specifically includes:
According to pre-set encryption Obfuscating Algorithms, the offset for obscuring the entry address is calculated;
The entry address is rewritten according to the offset, obscures entry address to obtain encryption.
3. according to the method described in claim 2, it is characterized in that, according to pre-set encryption Obfuscating Algorithms, calculating is directed to
Offset is obscured in the entry address, specifically includes:
Determine the storage area of the class name or function name in the executable file;
It is calculated according to position of the storage area in the executable file according to pre-set encryption Obfuscating Algorithms
Obscure offset for the entry address so that according to it is described obscure offset and rewrite to obtain encryption obscure entry address
Indicated position is outside the storage area.
4. the method according to claim 1, wherein obtaining the executable text in application installation package to be encrypted
Part specifically includes:
Obtain the application installation package to be encrypted;
Processing is unziped it to the application installation package to be encrypted, obtains the executable file.
5. according to the method described in claim 4, generation encryption is answered it is characterized in that, obscuring entry address based on the encryption
With installation kit, specifically include:
Packing processing corresponding with the decompression is carried out to the executable file for obscuring entry address comprising the encryption, with
To encryption application installation package.
6. the method according to any one of claims 1 to 5, which is characterized in that the application installation package is iOS application
Packet.
7. a kind of encryption device of application installation package characterized by comprising
Executable file acquiring unit, for obtaining the executable file in application installation package to be encrypted;
Entry address determination unit, for determining entry address to be encrypted in the executable file, wherein the entrance
Address is used to indicate the storage position of class name or function name in executable file;
Encryption unit, for call it is pre-set obscure Encryption Algorithm the entry address carried out to obscure encryption, with
It obtains obscuring encryption entry address;
Installation kit generation unit, for generating encryption application based on comprising the executable file for obscuring encryption entry address
Installation kit.
8. device according to claim 7, which is characterized in that entry address determination unit is specifically used for:
According to pre-set encryption Obfuscating Algorithms, the offset for obscuring the entry address is calculated;
The entry address is rewritten according to the offset, obscures entry address to obtain encryption.
9. device according to claim 8, which is characterized in that encryption unit is specifically used for:
Determine the storage area of the class name or function name in the executable file;
It is calculated according to position of the storage area in the executable file according to pre-set encryption Obfuscating Algorithms
Obscure offset for the entry address so that according to it is described obscure offset and rewrite to obtain encryption obscure entry address
Indicated position is outside the storage area.
10. device according to claim 7, which is characterized in that executable file acquiring unit is specifically used for:
Obtain the application installation package to be encrypted;
Processing is unziped it to the application installation package to be encrypted, obtains the executable file.
11. device according to claim 10, which is characterized in that installation kit generation unit is specifically used for:
Packing processing corresponding with the decompression is carried out to the executable file for obscuring entry address comprising the encryption, with
To encryption application installation package.
12. device according to any one of claims 7 to 11, which is characterized in that the application installation package is iOS application
Packet.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810811830.0A CN109062582B (en) | 2018-07-23 | 2018-07-23 | Encryption method and device for application installation package |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810811830.0A CN109062582B (en) | 2018-07-23 | 2018-07-23 | Encryption method and device for application installation package |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109062582A true CN109062582A (en) | 2018-12-21 |
CN109062582B CN109062582B (en) | 2022-02-01 |
Family
ID=64835304
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810811830.0A Active CN109062582B (en) | 2018-07-23 | 2018-07-23 | Encryption method and device for application installation package |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109062582B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110110506A (en) * | 2019-03-28 | 2019-08-09 | 江苏通付盾信息安全技术有限公司 | Program reinforcement means and device based on application program installation kit |
CN110119600A (en) * | 2019-03-28 | 2019-08-13 | 江苏通付盾信息安全技术有限公司 | Program reinforcement means and device based on application program installation kit |
CN110119601A (en) * | 2019-03-28 | 2019-08-13 | 江苏通付盾信息安全技术有限公司 | Program reinforcement means and device based on application program installation kit |
CN110135152A (en) * | 2019-03-28 | 2019-08-16 | 江苏通付盾信息安全技术有限公司 | Application program attack detection method and device |
CN110147653A (en) * | 2019-03-28 | 2019-08-20 | 江苏通付盾信息安全技术有限公司 | Application security reinforcement means and device |
CN110147655A (en) * | 2019-03-28 | 2019-08-20 | 江苏通付盾信息安全技术有限公司 | The security protection system and method for application program |
CN110597496A (en) * | 2019-09-10 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Method and device for acquiring bytecode file of application program |
CN110990056A (en) * | 2019-11-01 | 2020-04-10 | 北京三快在线科技有限公司 | Reverse analysis method, device, electronic equipment and storage medium |
CN111212057A (en) * | 2019-12-30 | 2020-05-29 | 武汉联影医疗科技有限公司 | Resource packet transmission method and device, computer equipment and readable storage medium |
CN111917680A (en) * | 2019-05-07 | 2020-11-10 | ***通信集团湖南有限公司 | Encryption system, method, server and storage medium |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101634992A (en) * | 2009-06-11 | 2010-01-27 | 上海交通大学 | Light-weight file encryption and decrypting and recovering method in NTFS file system |
CN104111832A (en) * | 2014-07-03 | 2014-10-22 | 北京思特奇信息技术股份有限公司 | Android application program installation package packing method and system and unpacking method |
CN104318135A (en) * | 2014-10-27 | 2015-01-28 | 中国科学院信息工程研究所 | Java code safety dynamic loading method on basis of trusted execution environment |
WO2015058620A1 (en) * | 2013-10-25 | 2015-04-30 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for generating installation package corresponding to an application and executing application |
CN104809414A (en) * | 2015-05-04 | 2015-07-29 | 深圳市创世达实业有限公司 | USB (universal serial bus) flash disk encryption key storing method capable of preventing cold boot attack |
US20150304104A9 (en) * | 2000-03-29 | 2015-10-22 | Wolfgang Hammersmith | One-time-pad encryption with central key service |
CN105512521A (en) * | 2015-12-25 | 2016-04-20 | 北京奇虎科技有限公司 | Reinforcement and protection method and system for software installation package |
CN105740703A (en) * | 2016-01-29 | 2016-07-06 | 北京奇虎科技有限公司 | Application reinforcement method and apparatus |
CN105978876A (en) * | 2016-05-11 | 2016-09-28 | 杭州图南电子有限公司 | Instruction encryption method applied to broadcast communication |
CN106034119A (en) * | 2015-03-16 | 2016-10-19 | 阿里巴巴集团控股有限公司 | Encryption mixing method and device for application installation package |
CN106599629A (en) * | 2016-12-16 | 2017-04-26 | Tcl集团股份有限公司 | Strengthening method and apparatus for Android application program |
CN107169370A (en) * | 2017-04-21 | 2017-09-15 | 广州优视网络科技有限公司 | The encryption method and encryption device of executable file |
CN108064382A (en) * | 2017-10-27 | 2018-05-22 | 福建联迪商用设备有限公司 | A kind of method and terminal of the software decryption based on Ukey |
-
2018
- 2018-07-23 CN CN201810811830.0A patent/CN109062582B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150304104A9 (en) * | 2000-03-29 | 2015-10-22 | Wolfgang Hammersmith | One-time-pad encryption with central key service |
CN101634992A (en) * | 2009-06-11 | 2010-01-27 | 上海交通大学 | Light-weight file encryption and decrypting and recovering method in NTFS file system |
WO2015058620A1 (en) * | 2013-10-25 | 2015-04-30 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for generating installation package corresponding to an application and executing application |
CN104111832A (en) * | 2014-07-03 | 2014-10-22 | 北京思特奇信息技术股份有限公司 | Android application program installation package packing method and system and unpacking method |
CN104318135A (en) * | 2014-10-27 | 2015-01-28 | 中国科学院信息工程研究所 | Java code safety dynamic loading method on basis of trusted execution environment |
CN106034119A (en) * | 2015-03-16 | 2016-10-19 | 阿里巴巴集团控股有限公司 | Encryption mixing method and device for application installation package |
CN104809414A (en) * | 2015-05-04 | 2015-07-29 | 深圳市创世达实业有限公司 | USB (universal serial bus) flash disk encryption key storing method capable of preventing cold boot attack |
CN105512521A (en) * | 2015-12-25 | 2016-04-20 | 北京奇虎科技有限公司 | Reinforcement and protection method and system for software installation package |
CN105740703A (en) * | 2016-01-29 | 2016-07-06 | 北京奇虎科技有限公司 | Application reinforcement method and apparatus |
CN105978876A (en) * | 2016-05-11 | 2016-09-28 | 杭州图南电子有限公司 | Instruction encryption method applied to broadcast communication |
CN106599629A (en) * | 2016-12-16 | 2017-04-26 | Tcl集团股份有限公司 | Strengthening method and apparatus for Android application program |
CN107169370A (en) * | 2017-04-21 | 2017-09-15 | 广州优视网络科技有限公司 | The encryption method and encryption device of executable file |
CN108064382A (en) * | 2017-10-27 | 2018-05-22 | 福建联迪商用设备有限公司 | A kind of method and terminal of the software decryption based on Ukey |
Non-Patent Citations (4)
Title |
---|
DAVID R. RAYMOND 等: "Scalable, Cluster-based Anti-replay Protection for Wireless Sensor Networks", 《IN PROCEEDINGS OF THE 2007 IEEE SMC INFORMATION ASSURANCE AND SECURITY WORKSHOP》 * |
任献彬 等: "数据加密技术在嵌入式***中的应用", 《现代电子技术》 * |
张建明 等: "PE可执行文件通用加密工具的设计与实现", 《计算机***应用》 * |
贺依盟 等: "AXI总线加密模块的设计与验证", 《杭州电子科技大学学报(自然科学版)》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110110506A (en) * | 2019-03-28 | 2019-08-09 | 江苏通付盾信息安全技术有限公司 | Program reinforcement means and device based on application program installation kit |
CN110119600A (en) * | 2019-03-28 | 2019-08-13 | 江苏通付盾信息安全技术有限公司 | Program reinforcement means and device based on application program installation kit |
CN110119601A (en) * | 2019-03-28 | 2019-08-13 | 江苏通付盾信息安全技术有限公司 | Program reinforcement means and device based on application program installation kit |
CN110135152A (en) * | 2019-03-28 | 2019-08-16 | 江苏通付盾信息安全技术有限公司 | Application program attack detection method and device |
CN110147653A (en) * | 2019-03-28 | 2019-08-20 | 江苏通付盾信息安全技术有限公司 | Application security reinforcement means and device |
CN110147655A (en) * | 2019-03-28 | 2019-08-20 | 江苏通付盾信息安全技术有限公司 | The security protection system and method for application program |
CN110119601B (en) * | 2019-03-28 | 2022-07-12 | 江苏通付盾信息安全技术有限公司 | Program reinforcing method and device based on application program installation package |
CN110135152B (en) * | 2019-03-28 | 2021-07-02 | 江苏通付盾信息安全技术有限公司 | Application program attack detection method and device |
CN111917680A (en) * | 2019-05-07 | 2020-11-10 | ***通信集团湖南有限公司 | Encryption system, method, server and storage medium |
CN110597496B (en) * | 2019-09-10 | 2021-09-24 | 腾讯科技(深圳)有限公司 | Method and device for acquiring bytecode file of application program |
CN110597496A (en) * | 2019-09-10 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Method and device for acquiring bytecode file of application program |
CN110990056A (en) * | 2019-11-01 | 2020-04-10 | 北京三快在线科技有限公司 | Reverse analysis method, device, electronic equipment and storage medium |
CN111212057A (en) * | 2019-12-30 | 2020-05-29 | 武汉联影医疗科技有限公司 | Resource packet transmission method and device, computer equipment and readable storage medium |
CN111212057B (en) * | 2019-12-30 | 2022-09-27 | 武汉联影医疗科技有限公司 | Resource packet transmission method and device, computer equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109062582B (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109062582A (en) | A kind of encryption method and device of application installation package | |
CN108229112B (en) | Protection application program, and running method and device of application program | |
US20190146932A1 (en) | Cryptographic pointer address encoding | |
TWI530874B (en) | Method and apparatus for generating application installation packages and running applications | |
WO2016078130A1 (en) | Dynamic loading method for preventing reverse of apk file | |
CN109784007B (en) | Byte code encryption method, byte code decryption method and terminal | |
CN106203006A (en) | Android application reinforcement means based on dex Yu so file Dynamic Execution | |
CN104317625A (en) | Dynamic loading method for APK files | |
CN104408337A (en) | Reinforcement method for preventing reverse of APK (Android package) file | |
CN105068932A (en) | Android application program packing detection method | |
US9971582B2 (en) | Selecting application wrapper logic components based on features of a mobile application to be wrapped | |
CN109598107A (en) | A kind of code conversion method and device based on application installation package file | |
CN106326691B (en) | Encryption and decryption function realization method and device and server | |
CN110609687A (en) | Compiling method, device, electronic equipment and storage medium | |
CN106650428A (en) | Method and device for optimizing application codes | |
CN110309630B (en) | Java code encryption method and device | |
CN112069468A (en) | Method and equipment for dynamic watermarking of page | |
KR102272635B1 (en) | System and method for converting large scale application | |
CN108460254A (en) | Firmware guard method and device | |
CN106775843B (en) | Dalvik byte code optimization method based on memory loading | |
US8448244B1 (en) | Methods and systems for fused files comprising logic and content data | |
CN111143879A (en) | Android platform SD card file protection method, terminal device and storage medium | |
CN108664796B (en) | So file protection method and device | |
US11775471B2 (en) | System and method for caching converted files and compiling computer code from the cache | |
CN113220314A (en) | APP resource loading and APK generation method, device, equipment and medium |
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 |