CN107657154A - A kind of guard method of target program, device, equipment and storage medium - Google Patents
A kind of guard method of target program, device, equipment and storage medium Download PDFInfo
- Publication number
- CN107657154A CN107657154A CN201710840787.6A CN201710840787A CN107657154A CN 107657154 A CN107657154 A CN 107657154A CN 201710840787 A CN201710840787 A CN 201710840787A CN 107657154 A CN107657154 A CN 107657154A
- Authority
- CN
- China
- Prior art keywords
- intermediate language
- rule
- byte
- changed
- enforcement engine
- 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
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000009466 transformation Effects 0.000 claims abstract description 67
- 238000006243 chemical reaction Methods 0.000 claims abstract description 57
- 230000004224 protection Effects 0.000 claims abstract description 29
- 230000008859 change Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 4
- 241000544061 Cuculus canorus Species 0.000 claims 2
- 238000004364 calculation method Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000005291 magnetic effect Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/14—Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Devices For Executing Special Programs (AREA)
- Storage Device Security (AREA)
Abstract
The embodiment of the invention discloses a kind of guard method of target program, device, equipment and storage medium.This method includes:Obtain intermediate language corresponding to the command code of enforcement engine;Intermediate language corresponding to the command code of enforcement engine is changed according to transformation rule;Enforcement engine is compiled using the command code corresponding to the intermediate language after conversion, the enforcement engine after being recompilated;Obtain intermediate language corresponding to target program;Intermediate language corresponding to target program is changed according to transformation rule, wherein, the target program after conversion is performed by the enforcement engine after recompility, by technical scheme, can solve the problem that the safety protection problem of unity3d programs.
Description
Technical field
The present embodiments relate to field of information security technology, more particularly to a kind of guard method of target program, device,
Equipment and storage medium.
Background technology
In information security field, software is as a kind of valuable wealth, and the security of software is increasingly by unit, enterprise
Industry and personal concern.Unity3d is a professional game engine, and the program code after being compiled using unity3d uses IL
Instruction storage, may operate under different platform using the mono engines increased income as performing environment.
Using unity3d while providing convenience, the procedure set after compiling is very easy to by decompiling, for example is utilized
Reflector instruments can almost generate the source code of program.
The protection of procedure set after being compiled at present for unity3d is mainly based upon the out of order of method and the protection side such as obscures
Formula, such as ConfuserEx etc..The problem of this protected mode is present is that the program after protection still can check in IL ranks
Code.
The content of the invention
The embodiment of the present invention provides a kind of guard method of target program, device, equipment and storage medium, can solve the problem that
The safety protection problem of unity3d programs.
In a first aspect, the embodiments of the invention provide a kind of guard method of target program, including:
Obtain intermediate language corresponding to the command code of enforcement engine;
Intermediate language corresponding to the command code of the enforcement engine is changed according to transformation rule;
The enforcement engine is compiled using the command code corresponding to the intermediate language after the conversion, obtained again
Enforcement engine after compiling;
Obtain intermediate language corresponding to target program;
Intermediate language corresponding to the target program is changed according to the transformation rule, wherein, by described turn
The target program after changing is performed by the enforcement engine after the recompility.
Further, the transformation rule includes:The sub-rule changed to presetting intermediate language byte;
Corresponding intermediate language is changed in such a way, including:
The default intermediate language byte is searched from corresponding intermediate language;
According to the sub-rule corresponding to the default intermediate language byte with finding, to the corresponding default centre
Language byte is changed.
Further, the sub-rule that described pair of default intermediate language byte is changed includes following at least one:
To the sub-rule of single byte intermediate language conversion;
To the sub-rule of double byte intermediate language conversion.
Further, the transformation rule is stored in information safety devices;
Corresponding intermediate language is changed according to transformation rule, including:
The transformation rule is read from described information safety means;
Corresponding intermediate language is changed using the transformation rule of reading.
Second aspect, the embodiment of the present invention additionally provide a kind of protection device of target program, and the device includes:
First acquisition module, for obtaining intermediate language corresponding to the command code of enforcement engine;
First modular converter, for intermediate language corresponding to the command code of the enforcement engine to be carried out according to transformation rule
Conversion;
Collector, for being carried out using the command code corresponding to the intermediate language after the conversion to the enforcement engine
Compiling, the enforcement engine after being recompilated;
Second acquisition module, for obtaining intermediate language corresponding to target program;
Second modular converter, for intermediate language corresponding to the target program to be turned according to the transformation rule
Change, wherein, the target program after the conversion is performed by the enforcement engine after the recompility.
Further, the transformation rule includes:The sub-rule changed to presetting intermediate language byte;
Corresponding intermediate language is changed in such a way, including:
The default intermediate language byte is searched from corresponding intermediate language;
According to the sub-rule corresponding to the default intermediate language byte with finding, to the corresponding default centre
Language byte is changed.
Further, the sub-rule that described pair of default intermediate language byte is changed includes following at least one:
To the sub-rule of single byte intermediate language conversion;
To the sub-rule of double byte intermediate language conversion.
Further, the transformation rule is stored in information safety devices;
Corresponding intermediate language is changed according to transformation rule, including:
The transformation rule is read from described information safety means;
Corresponding intermediate language is changed using the transformation rule of reading.
The third aspect, the embodiment of the present invention additionally provide a kind of computer equipment, including memory, processor and are stored in
Realized on memory and the computer program that can run on a processor, during the computing device described program as the present invention is real
Apply the guard method of any described target program in example.
Fourth aspect, the embodiment of the present invention additionally provide a kind of computer-readable recording medium, are stored thereon with computer
Program, the guard method of the target program as described in any in the embodiment of the present invention is realized when the program is executed by processor.
The embodiment of the present invention is by obtaining intermediate language corresponding to the command code of enforcement engine;By the command code of enforcement engine
Corresponding intermediate language is changed according to transformation rule;Execution is drawn using the command code corresponding to the intermediate language after conversion
Hold up and be compiled, the enforcement engine after being recompilated;Obtain intermediate language corresponding to target program;Target program is corresponding
Intermediate language changed according to transformation rule, wherein, the target program after conversion passes through the execution after recompility
Engine performs, and can solve the problem that the safety protection problem of unity3d programs.
Brief description of the drawings
Fig. 1 is a kind of flow chart of the guard method of target program in the embodiment of the present invention one;
Fig. 2 is a kind of flow chart of the guard method of target program in the embodiment of the present invention two;
Fig. 3 is a kind of structural representation of the protection device of target program in the embodiment of the present invention three;
Fig. 4 is a kind of structural representation of computer equipment in the embodiment of the present invention four.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that in order to just
Part related to the present invention rather than entire infrastructure are illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is a kind of flow chart of the guard method for target program that the embodiment of the present invention one provides, and the present embodiment can fit
For the situation of the protection of target program, this method can be held by the protection device of target program provided in an embodiment of the present invention
OK, the device can realize that the device can be integrated in the protection of any required target program by the way of software and/or hardware
In terminal device, as shown in figure 1, this method specifically comprises the following steps:
S110, obtain intermediate language corresponding to the command code of enforcement engine.
Wherein, the intermediate language (IL, Intermediate Language) is in one derived on Microsoft platform
Between language, respective code can be converted into IL by the compiler of the various high-level languages (such as C#, VB, F#) on platform, wherein wrapping
The various elements on platform are contained, such as " pattern ", " class ", " interface ", " module ", " attribute ".The intermediate language is used for
Show programmed logic.
Wherein, the enforcement engine is mono enforcement engines.
Specifically, obtaining the command code of enforcement engine, the command code of enforcement engine is converted into corresponding intermediate language, obtained
Take intermediate language corresponding to the command code of enforcement engine.
S120, intermediate language corresponding to the command code of enforcement engine is changed according to transformation rule.
Wherein, the transformation rule is the transformation rule for intermediate language.
Wherein, the transformation rule can be to be changed the partial bytes in intermediate language or by centre
Backward rule is respectively adopted to encode in single byte and two byte codes in language, such as can be, if single byte intermediate language
OXOO is encoded to, is encoded using backward rule, then is changed into OXFE after changing, is encoded to if two byte intermediate languages are original
OXFE, OXOO, encoded using backward rule, be then changed into OXFE, XO22 after changing.
Wherein, intermediate language corresponding to the command code of enforcement engine is compiled again according to the coding rule after conversion
Translate.
Specifically, the coding rule of intermediate language corresponding to the command code of enforcement engine is turned according to transformation rule
Change, such as can be, the coding rule of intermediate language corresponding to the command code of enforcement engine is changed into use backward rule encoding.
S130, enforcement engine is compiled using the command code corresponding to the intermediate language after conversion, compiled again
Enforcement engine after translating.
Wherein, use mode that the command code corresponding to the intermediate language after conversion is compiled to enforcement engine can be for
According to the coding rule after conversion to intermediate language recompilates corresponding to the command code of enforcement engine after, using compiling again
Intermediate language after translating is compiled to enforcement engine, or by intermediate language corresponding to the command code of part enforcement engine
Changed according to transformation rule, and intermediate language corresponding to the command code of the enforcement engine after conversion is replaced and not changed
Enforcement engine corresponding to intermediate language, enforcement engine is compiled using the intermediate language after replacement.
Specifically, using intermediate language corresponding to the coding rule coding enforcement engine after conversion, using recompility
Intermediate language is compiled to enforcement engine mono, the mono after being recompilated.
S140, obtain intermediate language corresponding to target program.
Wherein, the target program is unity3d executable programs.
Specifically, it is intermediate language corresponding to unity3d executable programs obtain target program according to the target program.
S150, intermediate language corresponding to target program is changed according to transformation rule, wherein, the mesh after conversion
Beacon course sequence is performed by the enforcement engine after recompility.
Wherein, the transformation rule of intermediate language corresponding to the target program and the command code of enforcement engine it is corresponding conversion
Rule is identical.
Specifically, by intermediate language corresponding to target program according to corresponding with the above-mentioned command code to enforcement engine middle
The rule of language conversion is changed, and the target program after conversion is performed by the enforcement engine after recompility.If adopt
The target program after conversion, and the execution after recompility can not be then performed without the enforcement engine after recompility with other
The transformation rule of intermediate language corresponding to engine is identical with the transformation rule of intermediate language corresponding to target program.
In a specific example, the command code instructed to IL according to particular conversion rule carries out random transition, turn
Change rule to be stored in protection device, the command code instructed using the IL after conversion compiles mono, and analysis unity3d can perform journey
IL command informations in sequence class and middle method, the transformation rule in protection device is read, the command code that the IL of method is instructed is carried out
Conversion, the instruction after conversion is injected into the program after protection.
The technical scheme of the present embodiment, by obtaining intermediate language corresponding to the command code of enforcement engine;By enforcement engine
Command code corresponding to intermediate language changed according to transformation rule;Using the command code corresponding to the intermediate language after conversion
Enforcement engine is compiled, the enforcement engine after being recompilated;Obtain intermediate language corresponding to target program;By target
Intermediate language is changed according to transformation rule corresponding to program, wherein, the target program after conversion passes through recompility
Enforcement engine afterwards performs, and can solve the problem that the safety protection problem of unity3d programs.
Embodiment two
Fig. 2 is a kind of flow chart of the guard method of target program in the embodiment of the present invention two, and the present embodiment is with foregoing
Optimized based on embodiment one, there is provided the guard method of preferable target program, be specifically, the transformation rule bag
Include:The sub-rule changed to presetting intermediate language byte;Corresponding intermediate language is changed in such a way, wrapped
Include:The default intermediate language byte is searched from corresponding intermediate language;According to the default intermediate language word with finding
The corresponding sub-rule of section, the corresponding default intermediate language byte is changed.
Accordingly, the method for the present embodiment specifically comprises the following steps:
S210, obtain intermediate language corresponding to the command code of enforcement engine.
S220, default intermediate language byte is searched in intermediate language corresponding to the command code from enforcement engine.
Wherein, the intermediate language byte that the default intermediate language byte is changed for needs, such as can be middle
Single byte and two-byte instruction in language.
Specifically, default intermediate language byte is searched in intermediate language corresponding to command code from enforcement engine, such as can
To be, the original of single byte IL instructions CEE_NOP is encoded to 0x00;The original volumes of CEE_ARGLIST of two byte IL instructions
Code is 0xFE, 0x00.
S230, according to the sub-rule corresponding to the default intermediate language byte with finding, to corresponding default middle language
Speech byte is changed.
Wherein, the default intermediate language byte that the sub-rule can be found according to is determined, such as can be,
If the default intermediate language byte found is single byte, and it is original be encoded to 0x00, then transformation rule can be by 0x00
Be converted to 0xFF, if the default intermediate language byte found is two bytes, and it is original be encoded to 0xFE, 0x00, then change
Rule can be that 0x00 is converted to 0xFE, x022 by 0xFE.
Optionally, can pre-establish on presetting intermediate language byte and the database of sub-rule corresponding relation, according to
Default intermediate language byte searches sub-rule corresponding with default intermediate language byte in presetting database.
Specifically, the sub-rule corresponding to according to the default intermediate language byte with finding, the operation to enforcement engine
Default intermediate language byte in intermediate language corresponding to code is changed.
In a specific example, the original of single byte IL instructions CEE_NOP is encoded to 0x00, by recompiling
Be 0xFF afterwards, CCEE_BREAK it is original be encoded to 0x01, by being converted to 0xFE, by that analogy.Two byte IL instructions
CEE_ARGLIST it is original be encoded to 0xFE, 0x00, by being converted to 0xFE, x022, CEE_CEQ it is original be encoded to 0xFE,
0x01, into 0xFE, 0x21 after changing, by that analogy.
S240, enforcement engine is compiled using the command code corresponding to the intermediate language after conversion, compiled again
Enforcement engine after translating.
S250, obtain intermediate language corresponding to target program.
S260, default intermediate language byte is searched from intermediate language corresponding to target program.
S270, according to the sub-rule corresponding to the default intermediate language byte with finding, to corresponding default middle language
Speech byte is changed.
In a specific example, the system environments that the bit manipulation systems of Microsoft Windows 7,64 are provided with protection is
Example, to describe to realize the detailed process of unity3d programmed protections according to one specific embodiment of the application.Wherein in Player classes
OnJumpInputUp it is specific as follows, the code for processing jump game identification code:
Protection device is encryption lock, for storing transformation rule.The detailed step protected to .NET programs is:According to
The command code that particular conversion rule instructs to IL carries out random transition, transformation rule is stored in protection device, using conversion
The command code compiling Mono of IL instructions afterwards.The use of simple Substitution Rules is single byte and two-byte instruction during IL is instructed
Backward rule is respectively adopted to encode in coding, for example the original of single byte IL instructions CEE_NOP is encoded to 0x00, by again
Be 0xFF after coding, CCEE_BREAK it is original be encoded to 0x01, by being converted to as 0xFE, by that analogy.Two byte IL refer to
The CEE_ARGLIST of order it is original be encoded to 0xFE, 0x00, by being converted to 0xFE, x022, CEE_CEQ are original to be encoded to
0xFE, 0x01, into 0xFE, 0x21 after changing, by that analogy;Transformation rule is stored in crack 5 encryption lock, using turn
Coding rule compiling mono after changing, the IL instructions of the method in class and class all in unity3d executable programs are analyzed, it is right
For this example, comprising Player class PlayerInput classes etc. in executable program, some sides are included wherein in Player classes
Method, the code IL codes of OnJumpInputUp herein are
Instructed according to the IL for needing claimed method of analysis, protection system is changed the IL instructions of method;Read
Transformation rule in protection device, the IL of the method command codes instructed are changed;Deep thinking crack 5 is called for this example
Slm_user_data_read functions read transformation rule, and the IL instructions to OnJumpInputUp methods carry out conversion ldarg.0
Instruction encoding before changing is 02, and the instruction encoding after changing is FD, ldflda valuetype [UnityEngine]
UnityEngine.Vector3Player::Velocity change before instruction encoding into 7C45000004, the instruction after conversion
8345000004 are encoded to, will not enumerate below.Call instruction after conversion is injected into the program after protection;Injection
Mode is realized using dnlib.
The technical scheme of the present embodiment, by obtaining intermediate language corresponding to the command code of enforcement engine;By enforcement engine
Command code corresponding to intermediate language changed according to transformation rule;Using the command code corresponding to the intermediate language after conversion
Enforcement engine is compiled, the enforcement engine after being recompilated;Obtain intermediate language corresponding to target program;By target
Intermediate language is changed according to transformation rule corresponding to program, wherein, the target program after conversion passes through recompility
Enforcement engine afterwards performs, and can solve the problem that the safety protection problem of unity3d programs.
Embodiment three
Fig. 3 is a kind of structural representation of the protection device of target program of the embodiment of the present invention three.The present embodiment can fit
For the situation of the protection of target program, the device can realize that the device can integrate in office by the way of software and/or hardware
In the equipment of the defencive function of what offer target program, as shown in figure 3, the protection device of the target program specifically includes:The
One acquisition module 310, the first modular converter 320, collector 330, the second acquisition module 340 and the second modular converter 350.
Wherein, the first acquisition module 310, for obtaining intermediate language corresponding to the command code of enforcement engine;
First modular converter 320, for by intermediate language corresponding to the command code of the enforcement engine according to transformation rule
Changed;
Collector 330, for the command code corresponding to the intermediate language after the use conversion to the enforcement engine
It is compiled, the enforcement engine after being recompilated;
Second acquisition module 340, for obtaining intermediate language corresponding to target program;
Second modular converter 350, for intermediate language corresponding to the target program to be carried out according to the transformation rule
Conversion, wherein, the target program after the conversion is performed by the enforcement engine after the recompility.
Optionally, the transformation rule includes:The sub-rule changed to presetting intermediate language byte;
Corresponding intermediate language is changed in such a way, including:
The default intermediate language byte is searched from corresponding intermediate language;
According to the sub-rule corresponding to the default intermediate language byte with finding, to the corresponding default centre
Language byte is changed.
Optionally, the sub-rule that described pair of default intermediate language byte is changed includes following at least one:
To the sub-rule of single byte intermediate language conversion;
To the sub-rule of double byte intermediate language conversion.
Optionally, the transformation rule is stored in information safety devices;
Corresponding intermediate language is changed according to transformation rule, including:
The transformation rule is read from described information safety means;
Corresponding intermediate language is changed using the transformation rule of reading.
The technical scheme of the present embodiment, by obtaining intermediate language corresponding to the command code of enforcement engine;By enforcement engine
Command code corresponding to intermediate language changed according to transformation rule;Using the command code corresponding to the intermediate language after conversion
Enforcement engine is compiled, the enforcement engine after being recompilated;Obtain intermediate language corresponding to target program;By target
Intermediate language is changed according to transformation rule corresponding to program, wherein, the target program after conversion passes through recompility
Enforcement engine afterwards performs, and can solve the problem that the safety protection problem of unity3d programs.
Example IV
Fig. 4 is a kind of structural representation of computer equipment in the embodiment of the present invention four.Fig. 4 shows real suitable for being used for
The block diagram of the exemplary computer device 12 of existing embodiment of the present invention.The computer equipment 12 that Fig. 4 is shown is only one and shown
Example, should not bring any restrictions to the function and use range of the embodiment of the present invention.
As shown in figure 4, computer equipment 12 is showed in the form of universal computing device.The component of computer equipment 12 can be with
Including but not limited to:One or more processor or processing unit 16, system storage 28, connect different system component
The bus 18 of (including system storage 28 and processing unit 16).
Bus 18 represents the one or more in a few class bus structures, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.Lift
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, MCA (MAC)
Bus, enhanced isa bus, VESA's (VESA) local bus and periphery component interconnection (PCI) bus.
Computer equipment 12 typically comprises various computing systems computer-readable recording medium.These media can be it is any can be by
The usable medium that computer equipment 12 accesses, including volatibility and non-volatile media, moveable and immovable medium.
System storage 28 can include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (RAM) 30 and/or cache memory 32.Computer equipment 12 may further include it is other it is removable/can not
Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for read-write not
Movably, non-volatile magnetic media (Fig. 4 is not shown, is commonly referred to as " hard disk drive ").Although not shown in Fig. 4, can with
There is provided for the disc driver to may move non-volatile magnetic disk (such as " floppy disk ") read-write, and to removable non-volatile
The CD drive of CD (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driving
Device can be connected by one or more data media interfaces with bus 18.Memory 28 can include at least one program and produce
Product, the program product have one group of (for example, at least one) program module, and these program modules are configured to perform of the invention each
The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42, such as memory 28 can be stored in
In, such program module 42 includes --- but being not limited to --- operating system, one or more application program, other programs
Module and routine data, the realization of network environment may be included in each or certain combination in these examples.Program mould
Block 42 generally performs function and/or method in embodiment described in the invention.
Computer equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24
Deng) communication, the equipment communication interacted with the computer equipment 12 can be also enabled a user to one or more, and/or with making
Obtain any equipment that the computer equipment 12 can be communicated with one or more of the other computing device (such as network interface card, modulatedemodulate
Adjust device etc.) communication.This communication can be carried out by input/output (I/O) interface 22.In addition, the calculating in the present embodiment
Machine equipment 12, display 24 exist not as independent individual, but in embedded minute surface, it is not aobvious in the display surface of display 24
When showing, the display surface of display 24 visually combines together with minute surface.Also, computer equipment 12 can also be fitted by network
Orchestration 20 and one or more network (such as LAN (LAN), wide area network (WAN) and/or public network, such as internet)
Communication.As illustrated, network adapter 20 is communicated by bus 18 with other modules of computer equipment 12.It should be understood that to the greatest extent
Not shown in pipe figure, computer equipment 12 can be combined and use other hardware and/or software module, included but is not limited to:Micro- generation
Code, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup are deposited
Storage system etc..
Processing unit 16 is stored in program in system storage 28 by operation, so as to perform various function application and
Data processing, such as realize the guard method for the target program that the embodiment of the present invention is provided:Obtain the command code of enforcement engine
Corresponding intermediate language;Intermediate language corresponding to the command code of the enforcement engine is changed according to transformation rule;Using
The command code corresponding to intermediate language after the conversion is compiled to the enforcement engine, the execution after being recompilated
Engine;Obtain intermediate language corresponding to target program;By intermediate language corresponding to the target program according to the transformation rule
Changed, wherein, the target program after the conversion is performed by the enforcement engine after the recompility.
Embodiment five
The embodiment of the present invention five provides a kind of computer-readable recording medium, is stored thereon with computer program, the journey
The guard method of the target program provided such as all inventive embodiments of the application is provided when sequence is executed by processor:Execution is obtained to draw
Intermediate language corresponding to the command code held up;Intermediate language corresponding to the command code of the enforcement engine is carried out according to transformation rule
Conversion;The enforcement engine is compiled using the command code corresponding to the intermediate language after the conversion, compiled again
Enforcement engine after translating;Obtain intermediate language corresponding to target program;By intermediate language corresponding to the target program according to institute
Transformation rule is stated to be changed, wherein, the target program after the conversion passes through the execution after the recompility
Engine performs.
Any combination of one or more computer-readable media can be used.Computer-readable medium can be calculated
Machine readable signal medium or computer-readable recording medium.Computer-readable recording medium for example can be --- but it is unlimited
In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than combination.Calculate
The more specifically example (non exhaustive list) of machine readable storage medium storing program for executing includes:Electrical connection with one or more wires, just
Take formula computer disk, hard disk, random access memory (RAM), read-only storage (ROM), erasable type and may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In this document, computer-readable recording medium can any include or store journey
The tangible medium of sequence, the program can be commanded the either device use or in connection of execution system, device.
Computer-readable signal media can include in a base band or as carrier wave a part propagation data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but
It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be
Any computer-readable medium beyond computer-readable recording medium, the computer-readable medium can send, propagate or
Transmit for by instruction execution system, device either device use or program in connection.
The program code included on computer-readable medium can be transmitted with any appropriate medium, including --- but it is unlimited
In --- wireless, electric wire, optical cable, RF etc., or above-mentioned any appropriate combination.
It can be write with one or more programming languages or its combination for performing the computer that operates of the present invention
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Also include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
Fully perform, partly perform on the user computer on the user computer, the software kit independent as one performs, portion
Divide and partly perform or performed completely on remote computer or server on the remote computer on the user computer.
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including LAN (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as carried using Internet service
Pass through Internet connection for business).
Pay attention to, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although being carried out by above example to the present invention
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.
Claims (10)
- A kind of 1. guard method of target program, it is characterised in that including:Obtain intermediate language corresponding to the command code of enforcement engine;Intermediate language corresponding to the command code of the enforcement engine is changed according to transformation rule;The enforcement engine is compiled using the command code corresponding to the intermediate language after the conversion, recompilated Enforcement engine afterwards;Obtain intermediate language corresponding to target program;Intermediate language corresponding to the target program is changed according to the transformation rule, wherein, after the conversion The target program performed by enforcement engine after the recompility.
- 2. according to the method for claim 1, it is characterised in that the transformation rule includes:To presetting intermediate language byte The sub-rule changed;Corresponding intermediate language is changed in such a way, including:The default intermediate language byte is searched from corresponding intermediate language;According to the sub-rule corresponding to the default intermediate language byte with finding, to the corresponding default intermediate language Byte is changed.
- 3. according to the method for claim 2, it is characterised in that the cuckoo that described pair of default intermediate language byte is changed Then include following at least one:To the sub-rule of single byte intermediate language conversion;To the sub-rule of double byte intermediate language conversion.
- 4. according to the method in any one of claims 1 to 3, it is characterised in that the transformation rule is stored in information peace In full equipment;Corresponding intermediate language is changed according to transformation rule, including:The transformation rule is read from described information safety means;Corresponding intermediate language is changed using the transformation rule of reading.
- A kind of 5. protection device of target program, it is characterised in that including:First acquisition module, for obtaining intermediate language corresponding to the command code of enforcement engine;First modular converter, for intermediate language corresponding to the command code of the enforcement engine to be turned according to transformation rule Change;Collector, for being compiled using the command code corresponding to the intermediate language after the conversion to the enforcement engine Translate, the enforcement engine after being recompilated;Second acquisition module, for obtaining intermediate language corresponding to target program;Second modular converter, for intermediate language corresponding to the target program to be changed according to the transformation rule, its In, the target program after the conversion is performed by the enforcement engine after the recompility.
- 6. device according to claim 5, it is characterised in that the transformation rule includes:To presetting intermediate language byte The sub-rule changed;Corresponding intermediate language is changed in such a way, including:The default intermediate language byte is searched from corresponding intermediate language;According to the sub-rule corresponding to the default intermediate language byte with finding, to the corresponding default intermediate language Byte is changed.
- 7. device according to claim 6, it is characterised in that the cuckoo that described pair of default intermediate language byte is changed Then include following at least one:To the sub-rule of single byte intermediate language conversion;To the sub-rule of double byte intermediate language conversion.
- 8. the device according to any one of claim 5 to 7, it is characterised in that the transformation rule is stored in information peace In full equipment;Corresponding intermediate language is changed according to transformation rule, including:The transformation rule is read from described information safety means;Corresponding intermediate language is changed using the transformation rule of reading.
- 9. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that the side as described in any in claim 1-4 is realized during the computing device described program Method.
- 10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is by processor The method as described in any in claim 1-4 is realized during execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710840787.6A CN107657154B (en) | 2017-09-18 | 2017-09-18 | A kind of guard method of target program, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710840787.6A CN107657154B (en) | 2017-09-18 | 2017-09-18 | A kind of guard method of target program, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107657154A true CN107657154A (en) | 2018-02-02 |
CN107657154B CN107657154B (en) | 2018-08-17 |
Family
ID=61130613
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710840787.6A Active CN107657154B (en) | 2017-09-18 | 2017-09-18 | A kind of guard method of target program, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107657154B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108682047A (en) * | 2018-05-23 | 2018-10-19 | 北京唐吉诃德科技有限公司 | A kind of three-dimensional building model file conversion method and system |
CN110069250A (en) * | 2019-04-30 | 2019-07-30 | 联陆智能交通科技(上海)有限公司 | LTE-V2X standard application layer data decoding method, system and medium |
CN111538490A (en) * | 2020-04-15 | 2020-08-14 | 北京宝兰德软件股份有限公司 | Freemarker-based data fusion method and device |
CN112434265A (en) * | 2020-11-27 | 2021-03-02 | 北京深思数盾科技股份有限公司 | Program code protection method, device and storage medium |
CN112800418A (en) * | 2020-12-31 | 2021-05-14 | 北京深思数盾科技股份有限公司 | File protection method and device for user-defined program set |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587445A (en) * | 2009-06-19 | 2009-11-25 | 国网电力科学研究院 | PLC compiling implement method |
CN102947835A (en) * | 2010-03-31 | 2013-02-27 | 埃德图加拿大公司 | A system and method for encapsulating and enabling protection through diverse variations in software libraries |
CN103198240A (en) * | 2012-09-29 | 2013-07-10 | 网易(杭州)网络有限公司 | Method and device for protecting security of code |
CN104503754A (en) * | 2014-12-16 | 2015-04-08 | 江南大学 | Programming and compiling design method in robot graphical programming system |
CN105612527A (en) * | 2013-08-22 | 2016-05-25 | Inka安特沃客有限公司 | Method for providing security for common intermediate language-based program |
CN106708497A (en) * | 2015-11-18 | 2017-05-24 | 上海木鸡网络科技有限公司 | Code executing method and device |
CN106815002A (en) * | 2015-12-01 | 2017-06-09 | 北京触控科技有限公司 | A kind of implementation method of cross-platform development of games instrument |
-
2017
- 2017-09-18 CN CN201710840787.6A patent/CN107657154B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101587445A (en) * | 2009-06-19 | 2009-11-25 | 国网电力科学研究院 | PLC compiling implement method |
CN102947835A (en) * | 2010-03-31 | 2013-02-27 | 埃德图加拿大公司 | A system and method for encapsulating and enabling protection through diverse variations in software libraries |
CN103198240A (en) * | 2012-09-29 | 2013-07-10 | 网易(杭州)网络有限公司 | Method and device for protecting security of code |
CN105612527A (en) * | 2013-08-22 | 2016-05-25 | Inka安特沃客有限公司 | Method for providing security for common intermediate language-based program |
US20160203087A1 (en) * | 2013-08-22 | 2016-07-14 | Inka Entworks, Inc. | Method for providing security for common intermediate language-based program |
CN104503754A (en) * | 2014-12-16 | 2015-04-08 | 江南大学 | Programming and compiling design method in robot graphical programming system |
CN106708497A (en) * | 2015-11-18 | 2017-05-24 | 上海木鸡网络科技有限公司 | Code executing method and device |
CN106815002A (en) * | 2015-12-01 | 2017-06-09 | 北京触控科技有限公司 | A kind of implementation method of cross-platform development of games instrument |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108682047A (en) * | 2018-05-23 | 2018-10-19 | 北京唐吉诃德科技有限公司 | A kind of three-dimensional building model file conversion method and system |
CN108682047B (en) * | 2018-05-23 | 2022-04-12 | 北京唐吉诃德科技有限公司 | Three-dimensional building model file conversion method and system |
CN110069250A (en) * | 2019-04-30 | 2019-07-30 | 联陆智能交通科技(上海)有限公司 | LTE-V2X standard application layer data decoding method, system and medium |
CN111538490A (en) * | 2020-04-15 | 2020-08-14 | 北京宝兰德软件股份有限公司 | Freemarker-based data fusion method and device |
CN112434265A (en) * | 2020-11-27 | 2021-03-02 | 北京深思数盾科技股份有限公司 | Program code protection method, device and storage medium |
CN112800418A (en) * | 2020-12-31 | 2021-05-14 | 北京深思数盾科技股份有限公司 | File protection method and device for user-defined program set |
CN112800418B (en) * | 2020-12-31 | 2022-05-13 | 北京深思数盾科技股份有限公司 | File protection method and device for user-defined program set |
Also Published As
Publication number | Publication date |
---|---|
CN107657154B (en) | 2018-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107657154B (en) | A kind of guard method of target program, device, equipment and storage medium | |
CN106227668B (en) | Data processing method and device | |
US8452813B2 (en) | Test planning using attribute value properties | |
CN110534113A (en) | Audio data desensitization method, device, equipment and storage medium | |
CN107315779A (en) | Log analysis method and system | |
CN106778303A (en) | Delegated strategy optimization method and delegated strategy optimization device | |
CN110888720A (en) | Task processing method and device, computer equipment and storage medium | |
CN107577151A (en) | A kind of method, apparatus of speech recognition, equipment and storage medium | |
CN117375792B (en) | Method and device for detecting side channel | |
CN103226488A (en) | Method and device for efficiency control in formalized code generation | |
US8677149B2 (en) | Method and system for protecting intellectual property in software | |
CN107181879A (en) | Identification incoming call is intended to | |
CN103198240B (en) | A kind of method and apparatus for the protection of code security | |
CN105718765A (en) | Method for achieving code obfuscation through finite automaton | |
CN109344374A (en) | Report generation method and device, electronic equipment based on big data, storage medium | |
CN111552792B (en) | Information query method and device, electronic equipment and storage medium | |
US9405652B2 (en) | Regular expression support in instrumentation languages using kernel-mode executable code | |
CN107478243A (en) | Air navigation aid, device, equipment and computer-readable recording medium | |
CN112162995B (en) | Procedural language SQL sentence processing method, device, medium and electronic equipment | |
CN110457869A (en) | Program compiles encryption method, device, storage medium and electronic equipment | |
CN106598825A (en) | Electronic equipment, method and device for standardizing logging code output | |
CN104253790A (en) | Method and equipment for page flow standardization | |
US9747448B2 (en) | Cryptographic mechanisms to provide information privacy and integrity | |
WO2023103914A1 (en) | Text sentiment analysis method and device, and computer-readable storage medium | |
CN110727428B (en) | Method and device for converting service logic layer codes and electronic equipment |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100193 5th floor 510, No. 5 Building, East Yard, No. 10 Wangdong Road, Northwest Haidian District, Beijing Patentee after: Beijing Shendun Technology Co.,Ltd. Address before: 100193 5th floor 510, No. 5 Building, East Yard, No. 10 Wangdong Road, Northwest Haidian District, Beijing Patentee before: BEIJING SENSESHIELD TECHNOLOGY Co.,Ltd. |