CN110472425A - Unity plug-in unit encryption method based on Mono, storage medium - Google Patents

Unity plug-in unit encryption method based on Mono, storage medium Download PDF

Info

Publication number
CN110472425A
CN110472425A CN201910649077.4A CN201910649077A CN110472425A CN 110472425 A CN110472425 A CN 110472425A CN 201910649077 A CN201910649077 A CN 201910649077A CN 110472425 A CN110472425 A CN 110472425A
Authority
CN
China
Prior art keywords
file
mono
plug
data block
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910649077.4A
Other languages
Chinese (zh)
Inventor
刘德建
官泉
陈宏展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianqing Online Interactive Technology Co Ltd filed Critical Fujian Tianqing Online Interactive Technology Co Ltd
Priority to CN201910649077.4A priority Critical patent/CN110472425A/en
Publication of CN110472425A publication Critical patent/CN110472425A/en
Pending legal-status Critical Current

Links

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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

Landscapes

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

Abstract

The present invention provides a kind of Unity plug-in unit encryption method based on Mono, storage medium, and method includes: to encrypt to the director data block and constant string data block of plug-in unit Dll file;The calling increased in plug-in unit Dll documentation function to the decryption function of the encryption, the Mono file after being compiled are loaded into Mono file;Shell adding is carried out to the Mono file after the compiling;The Mono file after compiling after Mono file in Unity editing machine to be replaced with to shell adding, and shield the inspection file of Unity editing machine.The present invention can make reverse-engineering can not automatic reduction go out the source code of plug-in unit Dll file, so that it is guaranteed that the safety of shared plug-in unit Dll;And ensure that plug-in unit correctly can be loaded and be executed;Further, higher encryption efficiency and extensive operation strategies are also equipped with.

Description

Unity plug-in unit encryption method based on Mono, storage medium
Technical field
The present invention relates to the fields Unity, and in particular to the Unity plug-in unit encryption method based on Mono, storage medium.
Background technique
Currently, cooperating with other department in Unity secondary development personnel, as the fine arts, planning, task dispatching department cooperate When exploitation, developer needs to provide Unity plug-in unit and gives dependent coordination personnel.After collaborators get plug-in unit, compiled in Unity Plug-in unit is loaded into volume device, carry out using;And plug-in unit is generally write by C# language, is compiled into Dll by Mono .Net compiler File.Since Dll file is easy to be directly viewable source code by reverse-engineering, the risk with code leakage.
Although there is the scheme of Unity reinforcement application packet in the external world, it is not particularly suited for operating in Unity editing machine The encryption of Dll plug-in unit, is also not suitable for this concrete application scene in departmental cooperation.
The scheme that the prior art can refer to finds to have the disadvantage in that in actual items practice
1, it is encrypted using full text, when Unity editing machine can be made to load plug-in unit Dll file, Dll file is construed to non-managed Dll and the loading and resolving for skipping Mono, cause encipherment scheme to fail.
2, it using deleting or encrypting Dll characteristic value, then when Unity editing machine can be made to load plug-in unit Dll file, carries in advance Enter the Dll importing table that do not decrypt, leads to not be loaded into associated Dll, and then Unity program editor collapses.
Therefore, it is necessary to a kind of Unity plug-in unit encryption method based on Mono, storage medium be provided, to realize to Unity Plug-in unit is protected using packet.
In addition, application No. is CN201711260537.1, it is disclosed " a kind of reinforcement means and device of Android application ", It is related to the reinforcing applied to Android, it is similar with the cipher mode of the application, but at least there is following essential distinction: 1, it can only Suitable for Android platform, and the windows operating system platform of Unity can not be suitable for;2 also, its statement so file be libmono.so;And method provided by the present application is Mono.dll and supports the mono-2.0- of MonoBleedingEdge Bdwgc.dll and mono-2.0-sgen.dll;3, its cipher mode is to carry out instruction map to each function;And the application without It need to go to search each function, but directly find director data block and encrypted, speed is faster, more efficient;4, the dll file For Assembly-CSharp.dll file;The dll file of the application is the Dll file that C# compiling generates, the adaptation model of the application It encloses wider;5, the libmono.so of its replacement is be replaced when reinforcing operation after the completion of application packet is packaged;And this Shen What please be replaced is reinforced when being development status, before packing in unity editing machine;6, it, which has modified, is used for The APK packet being installed on mobile phone;And the application has modified the UNITY editing machine installed in the fine arts, planning in WINDOWS computer.
Summary of the invention
The technical problems to be solved by the present invention are: providing a kind of Unity plug-in unit based on Mono for windows platform Encryption method, storage medium, and encryption efficiency is high.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention are as follows:
A kind of Unity plug-in unit encryption method based on Mono, comprising:
Director data block and constant string data block to plug-in unit Dll file encrypt;
It is loaded into the calling increased in plug-in unit Dll documentation function to the decryption function of the encryption in Mono file, is obtained Mono file after to compiling;Shell adding is carried out to the Mono file after the compiling;
The Mono file after compiling after Mono file in Unity editing machine to be replaced with to shell adding, and shield Unity and compile Collect the inspection file of device.
Another technical solution provided by the invention are as follows:
A kind of computer readable storage medium is stored thereon with computer program, described program when being executed by processor, It can be realized the step of above-mentioned Unity plug-in unit encryption method based on Mono is included.
The beneficial effects of the present invention are: the present invention passes through the director data block and constant character string to plug-in unit Dll file Data block is encrypted, make reverse-engineering can not automatic reduction go out source code, to play the work of protective plug-in unit Dll file security With, and have the characteristics that encryption efficiency is higher;Meanwhile also Mono file is compiled, by increasing automatic decryption function, and Ensure that its safety, and replacement original Mono file and shielding check, it is ensured that plug-in unit correctly can be loaded and be executed.The present invention can be very In the good inter-sectional collaborative development being used in Unity project, in shared plug-in unit, effectively resist it is all kinds of inversely apply it is quiet State analysis and reduction source code, prevent code risk of leakage caused by change of personnel or other reasons, guarantee shared plug-in unit Dll file Safety.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the Unity plug-in unit encryption method based on Mono of the embodiment of the present invention;
Fig. 2 is the stream step by step of the Unity plug-in unit encryption method based on Mono of the embodiment of the present invention one and embodiment two Journey schematic diagram;
Fig. 3 is the modification schematic diagram in the embodiment of the present invention two during plug-in unit Dll file encryption;
Fig. 4 is the analysis comparative result figure in the embodiment of the present invention two before and after plug-in unit Dll file encryption in reverse application;
Fig. 5 is inter-sectional collaboration process schematic diagram in the embodiment of the present invention three.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached Figure is explained.
The most critical design of the present invention is: director data block and constant string data block to plug-in unit Dll file into Row encryption, make reverse-engineering can not automatic reduction go out source code;Mono file is compiled, it is ensured that plug-in unit correctly can be loaded and be held Row.
Explanation of technical terms of the present invention:
Fig. 1 and Fig. 2 is please referred to, the present invention provides a kind of Unity plug-in unit encryption method based on Mono, comprising:
Director data block and constant string data block to plug-in unit Dll file encrypt;
It is loaded into the calling increased in plug-in unit Dll documentation function to the decryption function of the encryption in Mono file, is obtained Mono file after to compiling;Shell adding is carried out to the Mono file after the compiling;
The Mono file after compiling after Mono file in Unity editing machine to be replaced with to shell adding, and shield Unity and compile Collect the inspection file of device.
Further, the director data block and constant string data block to plug-in unit Dll file encrypts, specifically Are as follows:
The end address for obtaining the .Net bibliographic structure body in plug-in unit Dll file, as the starting of director data block Position;
The initial address for obtaining the MetaData data block in plug-in unit Dll file, as the end of director data block Position;
The initial position of described instruction data block is encrypted to the data content between the end position of described instruction data block;
Obtain the position of constant string data block and data block length in plug-in unit Dll file;
The constant string data block is encrypted according to the position and data block length;
Encryption identification is placed in plug-in unit Dll file.
Seen from the above description, specified data block can be accurately and efficiently encrypted, the source code in encrypted back method will It can not normally show, to effectively prevent reverse tool direct-reduction source code;Meanwhile it also can be accurately and efficiently to constant word Symbol string data block is encrypted, to increase reverse difficulty, be will be unable to search for by key-strings and is found corresponding data block; Further, by increasing encryption identification, it can be used for identification when Mono is loaded into when plug-in component operation, can also prevent from repeating to encrypt.
Further, described to be loaded into the decryption increased in plug-in unit Dll documentation function to the encryption in Mono file The calling of function, specifically:
Increase the discriminant function that whether there is the encryption identification to the plug-in unit Dll file of loading in Mono file;
Increase the first decryption function of corresponding instruction data block in Mono file, first decryption function includes instruction The decryption function of director data block after the initial position of data block and the acquisition of end position, and corresponding encryption;
Increase the second decryption function of corresponding constant string data block, the second decryption function packet in Mono file The position of constant string data block and the acquisition of data block length are included, and corresponds to the solution of constant string data block after encryption Close function;
Setting calls the discriminant function, if the determination result is YES, then call when Mono is loaded into plug-in unit Dll documentation function First decryption function and the second decryption function.
Seen from the above description, by the calling of the first decryption function, Unity editing machine can be made when loading Dll file It can correctly analyze the instruction;By the calling of the second decryption function, Unity editing machine can be enable correctly to show when loading Dll file Show string data;And then guarantee correctly to be loaded into and run the plug-in unit Dll file encrypted.
Further, the original Mono file by Unity editing machine replaces with the Mono after the compiling after shell adding File, specifically:
By patch apply by EmbedRuntime catalogue in Unity editing machine Mono file and support The mono-2.0-bdwgc.dll file and mono-2.0-sgen.dll file of MonoBleedingEdge replaces with the shell adding The mono-2.0-bdwgc.dll file and mono-2.0- of the Mono file and support MonoBleedingEdge that generate afterwards Sgen.dll file.
Seen from the above description, patch is carried out to Unity editing machine by what patch was applied, enables Unity editing machine just Often it is loaded into and parses the Dll file of encryption.
Further, the inspection file of the shielding Unity editing machine, specifically:
Component in Unity editing machine is updated and checks that file carries out deletion or Rename file name.
Seen from the above description, Unity editing machine skip instruction number when being loaded into the plug-in unit Dll file encrypted can be made According to the inspection of block, it is decrypted so as to enter the loading procedure of Mono.
Another technical solution provided by the invention are as follows:
A kind of computer readable storage medium is stored thereon with computer program, described program when being executed by processor, It can be realized the step of a kind of Unity plug-in unit encryption method based on Mono described in above-mentioned any one is included.
As can be seen from the above description, corresponding those of ordinary skill in the art will appreciate that realizing the whole in above-mentioned technical proposal Or part process, relevant hardware can be instructed to realize by computer program, the program can be stored in one In computer-readable storage medium, the program is when being executed, it may include such as the process of above-mentioned each method.Described program is in quilt After execution, it is equally able to achieve the corresponding beneficial effect of each method.
Wherein, the storage medium can be disk, optical disc, read-only memory (Read-Only Memory, ) or random access memory (Random Access Memory, RAM) etc. ROM.
Embodiment one
The Unity plug-in unit encryption method based on Mono that the present embodiment provides a kind of can carry out plug-in unit Dll file effective Protection, makes reverse-engineering that can not correctly restore source code;And it can guarantee that Unity editing machine is properly loaded and executes plug-in unit;More Further, it is also equipped with the advantages that encryption is efficient and applied widely.
As shown in Fig. 2, the method for this implementation includes:
One, exploitation encryption application
Exploitation can compile the director data block of the plug-in unit Dll file generated to C# and constant string data block adds It is close, and it is implanted into the encryption application of Custom Encryption label.Preferably, it is encrypted using advanced symmetric encipherment algorithm.
The operation can make reverse application that can not restore the source code of plug-in unit Dll file, also can not correctly restore constant Character string;But this document can correctly be identified for Unity editing machine by still remaining key message.
Two, the Mono project of open source is transformed
Firstly, writing the solution that the above-metioned instruction data block and constant string data block of plug-in unit Dll file are decrypted Close function, and be arranged in the function of Mono project loading Dll and call the function.Secondly, be to the Mono project after compiling into Row shell adding.
The operation can enable Unity editing machine parse and restore the instruction and constant character string of the Dll file in memory, Other scripts in editing machine are enable correctly to call and run.
Three, Unity patch application is write
It is applied by patch and Mono file original in Unity editing machine is substituted for improved Mono file, and The inspection file of shielding Unity editing machine, which prevents from being loaded into, to fail.
The operation can enable Unity editing machine normally be loaded into and parse the Dll file encrypted.
It is further noted that the plug-in unit Dll file is the Dll file that C# compiling generates in the present embodiment, compare For prior art Dll file this kind of to Assembly-CSharp.dll file operates, the adaptation range of the present embodiment is more Extensively.Also, the operation of the replacement Mono file of the present embodiment is reinforced when development status, before packing, because This safety is higher.
The present embodiment is also needed especially suitable for needing to encrypt Dll plug-in unit under inter-sectional cooperation scene Guarantee the utilization scene of normal load and operation in editing machine.
Embodiment two
The present embodiment further limits the method for embodiment one.
Referring to Fig. 2, the method for the present embodiment includes:
One, plug-in unit Dll file encryption
Because the plug-in unit Dll for Unity is write by C#, it will be parsed and be loaded by Mono later.So can be with It modifies to plug-in unit Dll, needs to analyze the PE file structure of windows thus.Detailed process is as follows:
1.1, encrypted instruction data block
The .Net Directory in Dll file, the i.e. end address of .Net bibliographic structure body are found first, as The initial position of director data block;
Next finds the .Net Directory in Dll file, i.e. the MetaData RVA of .Net bibliographic structure body, i.e., Meta data-bias address field, the position after being redirected offset, the i.e. initial address of MetaData data block are used as and refer to Enable the end position of data block;
Data content of the encrypted instruction data block initial position to end position later.Simple exclusive or can be used, or It the customized Encryption Algorithm such as negates, also can be used the disclosed prior art, such as AES, DES, TDEA, RC5 etc. is advanced symmetrical Encryption Algorithm carries out encryption or repeatedly encryption.
The step can prevent reverse tool direct-reduction source code, and the source code in encrypted back method will be unable to normally aobvious Show.
1.2, constant string data block is encrypted
Find the #US data block in the MetaData Steams in the .Net Directory in Dll file, i.e. constant String data block obtains its position and data block length, encrypts accordingly to constant string data block.
The step will increase constant character string in Dll file will be unable to search for by key-strings by reverse difficulty Find corresponding data block.
1.3, it is implanted into encrypted indicia
Dll file after encryption is implanted into customized encrypted indicia, and by the key of symmetric cryptography or other The fills needed are in Dos Stub data block or other Blank data blocks for being used to be aligned.
It is identified when Mono is loaded into when the step is used for plug-in component operation, is also possible to prevent to repeat to encrypt.
As shown in Figure 3 to the modification of former plug-in unit Dll file.
Two, Mono is transformed
In order to correctly be loaded into the plug-in unit Dll file encrypted, therefore need to be transformed the Mono project of open source. It specifically includes:
2.1, increase judgement encrypted indicia
It is distinguished according to the Dll file of the label and those unencryptions that are implanted into before in Dll file, is marked for existing The Dll of note will be in subsequent execution decryption oprerations.
2.2, increase decryption instructions data block function
The decryption instructions data block function write in advance is placed in Mono file, and is arranged and is being loaded into plug-in unit Dll text It is called when part function.
Decryption instructions data block function will be executed successively:
.Net Directory is obtained first in the mono_image_load_cli_header function in Mono project That is the end address of .Net bibliographic structure body in memory, as the initial position of director data block;
Secondly with obtaining MetaData RVA, that is, Meta data-bias of .Net Directory, that is.Net bibliographic structure body End position of the location as director data block;
The initial position of corresponding instruction data block and end position are decrypted later.
The step can enable Unity editing machine correctly analyze the instruction when loading Dll file.
2.3, increase decryption constant character string function
Similarly, the decryption constant character string function write in advance is placed in Mono file, and is arranged and is being loaded into plug-in unit It is called when Dll documentation function.
Constant character string function is decrypted, will successively be executed:
#US data block, i.e. constant character string are obtained first in the load_metadata_ptrs function in Mono project Data block obtains its position and data block length.
Constant string data block is decrypted according to the position of constant string data block and data block length later.
The step can enable Unity editing machine correctly show string data when loading Dll file.
2.4, Mono shell adding
Using extraneous existing shell adding or Scheme of Strengthening, improved Mono is protected.
The step prevents decryption function by reverse applied analysis, and then cracks plug-in unit Dll file, restores source code.
Three, patch is carried out to Unity editing machine
Patch is applied after finding the Unity editing machine path for needing to load encryption plug-in unit Dll file, is needed to this The file of Unity editing machine is replaced and modifies, to achieve the purpose that normally to decrypt.
Specifically execution includes: for patch application
3.1, Mono is replaced
To recompilate Mono engineering generate it is completely new containing the Mono.dll that can parse the plug-in unit Dll file being encrypted with And support the mono-2.0-bdwgc.dll and mono-2.0-sgen.dll of MonoBleedingEdge.Being applied by patch will Unity compiler corresponds to the Mono.dll in the EmbedRuntime catalogue in version and supports MonoBleedingEdge's Mono-2.0-bdwgc.dll and mono-2.0-sgen.dll are replaced.
The step can enable Unity editing machine normally be loaded into and parse the Dll file encrypted.
3.2, shielding check file
It also needs to update the AssemblyUpdater.exe in Unity editing machine i.e. component and checks that file shields, It can be Rename file name or by way of deleting file.
The step can make the inspection of Unity editing machine meeting skip instruction data block when being loaded into the plug-in unit Dll file encrypted It looks into, is decrypted so as to enter the loading procedure of Mono.
The present embodiment has obtained fine practice test in actual items operation.Pass through the instruction number to plug-in unit Dll file Encrypted according to block and constant character string, make reverse-engineering can not automatic reduction go out source code.It is inversely being answered before and after Dll file encryption It is as shown in Figure 4 with inner parsing Contrast on effect, it is seen then that encrypted Dll file inversely fails, and can not correctly restore source generation Code.Patch is carried out to Unity editing machine in addition, applying by using patch, guarantees that plug-in unit can be correctly loaded in monitored mode and execute.
The method of the present embodiment is applied to the inter-sectional collaborative development in Unity project, encrypted plug-in unit is shared, has Effect resists all kinds of static analyses inversely applied and reduction source code, prevents code caused by change of personnel or other reasons and leaks wind Danger.
Embodiment three
The present embodiment corresponding embodiment one or embodiment two provide one specifically with scene:
Scheme is directed to the method that the Dll plug-in unit containing C# compiling run in Unity editing machine is encrypted:
Firstly, encryption application is write, it, should using reading specially using the path for allowing user to input plug-in unit Dll file The file in path, judges whether file is write by C#, if without encrypted indicia, if it is, executing encrypted instruction data block letter Number and encryption constant string data block function;To file increase encrypted indicia.
Secondly, the Mono engineering for each unity version generates a mono.dll file for having decryption function.Tool Body is the source code for first obtaining Mono open source projects, then judges whether the Dll being loaded into contains encryption mark to addition in Mono source code Note, if it is, executing the function of decryption instructions data block and constant string data block in subsequent analytical function;Finally make It is reinforced with the prior art.
Finally, patch application is write, it is literary using the mono.dll with decryption function for containing corresponding unity version Part.It is specifically compared using the unity version that meeting traverse user computer is installed with the version that can currently carry out patch, so Mono file is replaced to the Unity that can carry out patch afterwards, then shield assembly, which updates, checks file.
As shown in figure 5, in concrete application scene, the secondary development personnel of plug-in unit provider such as Unity editing machine are used Encryption application encrypts the plug-in unit Dll file of original unencryption, and encryption application can generate encrypted plug-in unit Dll text Part.
Encrypted plug-in unit Dll file and patch application are supplied to plug-in unit user by plug-in unit provider.
The plug-in unit user such as fine arts, planning, task dispatching departmental cooperation personnel, after receiving patch application, first in computer Unity editing machine carries out patch operation, can enable Unity editing machine normal load and run encrypted plug-in unit Dll file. Plug-in unit user opens Unity editing machine later, loads encrypted plug-in unit Dll file, can operate normally.
And plug-in unit user is subsequent because change of personnel or other reasons lead to plug-in unit Dll file and patch application outflow, Source code, effective protection plug-in unit provider and company's correlation equity can not be reduced directly with reverse application.
Example IV
The present embodiment corresponding embodiment one provides a kind of computer readable storage medium, is stored thereon with to embodiment three Computer program, described program can be realized above-described embodiment one to any one reality of embodiment three when being executed by processor Apply the step of a kind of Unity plug-in unit encryption method based on Mono described in example is included.Specific step content herein not into Row is repeated, and please refers to embodiment one in detail to embodiment three.
In conclusion a kind of Unity plug-in unit encryption method based on Mono provided by the invention, storage medium, can make Reverse-engineering can not automatic reduction go out the source code of plug-in unit Dll file, so that it is guaranteed that the safety of shared plug-in unit Dll;And ensure to insert Part correctly can be loaded and be executed;Further, higher encryption efficiency and extensive operation strategies are also equipped with.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include In scope of patent protection of the invention.

Claims (6)

1. a kind of Unity plug-in unit encryption method based on Mono characterized by comprising
Director data block and constant string data block to plug-in unit Dll file encrypt;
It is loaded into the calling increased in plug-in unit Dll documentation function to the decryption function of the encryption in Mono file, is compiled Mono file after translating;Shell adding is carried out to the Mono file after the compiling;
The Mono file after compiling after Mono file in Unity editing machine to be replaced with to shell adding, and shield Unity editing machine Inspection file.
2. a kind of Unity plug-in unit encryption method based on Mono as described in claim 1, which is characterized in that described to plug-in unit The director data block and constant string data block of Dll file are encrypted, specifically:
The end address for obtaining the .Net bibliographic structure body in plug-in unit Dll file, as the initial position of director data block;
The initial address for obtaining the MetaData data block in plug-in unit Dll file, as the end position of director data block;
The initial position of described instruction data block is encrypted to the data content between the end position of described instruction data block;
Obtain the position of constant string data block and data block length in plug-in unit Dll file;
The constant string data block is encrypted according to the position and data block length;
Encryption identification is placed in plug-in unit Dll file.
3. a kind of Unity plug-in unit encryption method based on Mono as claimed in claim 2, which is characterized in that described in Mono It is loaded into the calling increased in plug-in unit Dll documentation function to the decryption function of the encryption in file, specifically:
Increase the discriminant function that whether there is the encryption identification to the plug-in unit Dll file of loading in Mono file;
Increase the first decryption function of corresponding instruction data block in Mono file, first decryption function includes director data The decryption function of director data block after the initial position of block and the acquisition of end position, and corresponding encryption;
Increase the second decryption function of corresponding constant string data block in Mono file, second decryption function includes normal The position of string data block and the acquisition of data block length are measured, and corresponds to the decryption letter of constant string data block after encryption Number;
Setting calls the discriminant function when Mono is loaded into plug-in unit Dll documentation function, if the determination result is YES, then described in calling First decryption function and the second decryption function.
4. a kind of Unity plug-in unit encryption method based on Mono as described in claim 1, which is characterized in that described by Unity Original Mono file in editing machine replaces with the Mono file after the compiling after shell adding, specifically:
By patch apply by EmbedRuntime catalogue in Unity editing machine Mono file and support The mono-2.0-bdwgc.dll file and mono-2.0-sgen.dll file of MonoBleedingEdge replaces with the shell adding The mono-2.0-bdwgc.dll file and mono-2.0- of the Mono file and support MonoBleedingEdge that generate afterwards Sgen.dll file.
5. a kind of Unity plug-in unit encryption method based on Mono as described in claim 1, which is characterized in that the shielding The inspection file of Unity editing machine, specifically:
Component in Unity editing machine is updated and checks that file carries out deletion or Rename file name.
6. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed When device executes, a kind of Unity plug-in unit encryption method based on Mono described in the claims 1-5 any one can be realized The step of included.
CN201910649077.4A 2019-07-18 2019-07-18 Unity plug-in unit encryption method based on Mono, storage medium Pending CN110472425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910649077.4A CN110472425A (en) 2019-07-18 2019-07-18 Unity plug-in unit encryption method based on Mono, storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910649077.4A CN110472425A (en) 2019-07-18 2019-07-18 Unity plug-in unit encryption method based on Mono, storage medium

Publications (1)

Publication Number Publication Date
CN110472425A true CN110472425A (en) 2019-11-19

Family

ID=68509666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910649077.4A Pending CN110472425A (en) 2019-07-18 2019-07-18 Unity plug-in unit encryption method based on Mono, storage medium

Country Status (1)

Country Link
CN (1) CN110472425A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625278A (en) * 2020-05-26 2020-09-04 深圳云之家网络有限公司 A method for generating source code files and related equipment
CN112800418A (en) * 2020-12-31 2021-05-14 北京深思数盾科技股份有限公司 File protection method and device for user-defined program set
CN114528027A (en) * 2022-01-25 2022-05-24 深圳市优易控软件有限公司 Intelligent equipment response time improving method based on PC platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612527A (en) * 2013-08-22 2016-05-25 Inka安特沃客有限公司 Method for providing security for common intermediate language-based program
CN106295370A (en) * 2016-08-19 2017-01-04 北京奇虎科技有限公司 A kind of method and apparatus of the dynamic link library (DLL) file reinforcing installation kit
WO2017026738A1 (en) * 2015-08-10 2017-02-16 라인 가부시키가이샤 System and method for protecting codes for application
CN107423586A (en) * 2017-07-31 2017-12-01 北京深思数盾科技股份有限公司 Method for protecting software and software protecting equipment
CN109840400A (en) * 2017-11-24 2019-06-04 Inka 安特沃客有限公司 The device and method of safety are provided and execute the device and method of safety for common intermediate language

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105612527A (en) * 2013-08-22 2016-05-25 Inka安特沃客有限公司 Method for providing security for common intermediate language-based program
WO2017026738A1 (en) * 2015-08-10 2017-02-16 라인 가부시키가이샤 System and method for protecting codes for application
CN106295370A (en) * 2016-08-19 2017-01-04 北京奇虎科技有限公司 A kind of method and apparatus of the dynamic link library (DLL) file reinforcing installation kit
CN107423586A (en) * 2017-07-31 2017-12-01 北京深思数盾科技股份有限公司 Method for protecting software and software protecting equipment
CN109840400A (en) * 2017-11-24 2019-06-04 Inka 安特沃客有限公司 The device and method of safety are provided and execute the device and method of safety for common intermediate language

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625278A (en) * 2020-05-26 2020-09-04 深圳云之家网络有限公司 A method for generating source code files and related equipment
CN111625278B (en) * 2020-05-26 2023-12-19 深圳云之家网络有限公司 Source code file generation method and related equipment
CN112800418A (en) * 2020-12-31 2021-05-14 北京深思数盾科技股份有限公司 File protection method and device for user-defined program set
CN114528027A (en) * 2022-01-25 2022-05-24 深圳市优易控软件有限公司 Intelligent equipment response time improving method based on PC platform

Similar Documents

Publication Publication Date Title
CN104680039B (en) Data protection method and device for application installation package
US8090959B2 (en) Method and apparatus for protecting .net programs
US8286251B2 (en) Obfuscating computer program code
KR101545272B1 (en) Method for Binary Obfuscating of Dalvix Executable File in Android
CN106203006A (en) Android application reinforcement means based on dex Yu so file Dynamic Execution
KR101623096B1 (en) Apparatus and method for managing apk file in a android platform
CN105095771B (en) A kind of guard method of shared file destination and device
US20160203087A1 (en) Method for providing security for common intermediate language-based program
CN110929234B (en) Python program encryption protection system and method based on code virtualization
KR101861341B1 (en) Deobfuscation apparatus of application code and method of deobfuscating application code using the same
US20160239671A1 (en) Method and device for protecting an application and method and device for executing a protected application thus protected
CN104866734B (en) A kind of guard method of DEX file and device
US20150095653A1 (en) Method and apparatus of creating application package, method and apparatus of executing application package, and recording medium storing application package
CN106228041B (en) A kind of code protection method for Android precompile
CN104091100A (en) Software protection method based on intermediate result compiling
CN110096853A (en) Unity Android application reinforcement means, storage medium based on Mono
CN103177199A (en) Webpage application code protective method and system, and executive speed-up method and system
US12113899B2 (en) On demand code decryption
CN113282294A (en) Android platform-based Java character string confusion method and device
CN115756480A (en) Android application reinforcement method, system and equipment
US11256786B2 (en) Method to secure a software code
US10068069B1 (en) Denoting precise locations and arguments in binary program code
Kanani et al. Obfuscation: maze of code
KR101436741B1 (en) The method and system for applying security solution program
Cho et al. Using obfuscators to test compilers: A metamorphic experience

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191119

WD01 Invention patent application deemed withdrawn after publication