CN109460640A - A kind of java applet guard method, device, equipment and readable storage medium storing program for executing - Google Patents
A kind of java applet guard method, device, equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109460640A CN109460640A CN201811349503.4A CN201811349503A CN109460640A CN 109460640 A CN109460640 A CN 109460640A CN 201811349503 A CN201811349503 A CN 201811349503A CN 109460640 A CN109460640 A CN 109460640A
- Authority
- CN
- China
- Prior art keywords
- file
- class file
- target class
- meta
- encrypted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 230000004224 protection Effects 0.000 claims abstract description 18
- 230000001681 protective effect Effects 0.000 claims abstract description 7
- 230000006870 function Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000000151 deposition Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/12—Protecting executable software
- G06F21/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
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2107—File encryption
Abstract
The invention discloses a kind of java applet guard methods, this method comprises: parsing Class file to be encrypted, and determine the operation part in Code attribute;The operation part of Class file is encrypted, target Class file is obtained;Meta file is created, and meta file is written in corresponding location information in target Class file by operation part;Establish the corresponding relationship of target Class file and meta file;Using in operational objective Class file processes, when loading target Class file, using the location information of meta file record, the operation part in target Class file is decrypted, obtains Class file.In this way, the purpose of protection java applet can be realized.The invention also discloses a kind of java applet protective device, equipment and readable storage medium storing program for executing, have corresponding technical effect.
Description
Technical field
The present invention relates to software technology field, more particularly to a kind of java applet guard method, device, equipment and readable
Storage medium.
Background technique
Java is a kind of cross-platform, explanation type language.Java source code is compiled into Java by Java compilation tool
Class file is responsible for explaining execution to Java Class file by Java Virtual Machine.It is different from local object code, it is right
The progress decompiling of Java Class file, which just seems, to be easier.There are many decompiling instruments of Java can be from Java
The source code of Class file generated high quality.
To prevent the entire Class text for the progress decompiling of Java Class file, mainly compiling out to Java at present
Part is encrypted, and a kind of agent (dynamic link library) of native is write using jvmti (JVM tool interface),
When the Class file that ClassLoader load is encrypted, real time decrypting is carried out.This dynamic link library is carried out at reinforcing simultaneously
Reason.
Although this encrypts entire Class file and can prevent to carry out decompiling to Class file, this scheme has seriously
Compatibility issue.Specifically, because many frames and container can be swept before Class file is loaded by ClassLoader now
Content therein is retouched, to realize some specific functions (such as safety investigation), these frames or container scanning are overstocked to adding
It when Class file, will report an error, and then Class file can not be loaded, destroy the compatibility of java applet.
In conclusion being current ability how effectively in the case where ensureing compatibility the problems such as protection java applet
Field technique personnel technical problem urgently to be solved.
Summary of the invention
The object of the present invention is to provide a kind of java applet guard method, device, equipment and readable storage medium storing program for executing, are not damaging
It consumes under the premise of the compatibility of java applet, protects java applet.
In order to solve the above technical problems, the invention provides the following technical scheme:
A kind of java applet guard method, comprising:
Class file to be encrypted is parsed, and determines the operation part in Code attribute;
The described instruction part of the Class file is encrypted, target Class file is obtained;
Meta file is created, and corresponding location information is written in the target Class file by described instruction part
The meta file;
Establish the corresponding relationship of the target Class file and the meta file;
Using running in the target Class file processes, when loading the target Class file, read with it is described
Target Class file has the meta file of corresponding relationship;
Using the location information of the meta file record, to the described instruction portion in the target Class file
Divide and be decrypted, obtains the Class file.
Preferably, the target Class file is loaded, comprising:
Using the Agent of the C/C++ native write, and Class file loading function is called to load the target Class
File.
Preferably, the reading has the meta file of corresponding relationship with the target Class file, comprising:
It is called and is loaded described in the ClassLoader real-time searching of the target Class file using Java local interface
Meta file;
When finding the meta file, the meta file is read.
Preferably, the creation meta file, and by described instruction part in the target Class file corresponding position
The meta file is written in confidence breath, comprising:
Initial position of the encrypted described instruction part in the target Class file and length are determined as described
Location information;
The meta file is created, and records the location information in the meta file.
Preferably, the corresponding relationship for establishing the target Class file and the meta file, comprising:
The meta file is stored under path identical with the target Class file.
Preferably, the described instruction part of the Class file is encrypted, obtains target Class file, comprising:
Described instruction part is encrypted, encrypted instruction is obtained;
It is the encrypted instruction by the described instruction partial replacement in the Class file, obtains the target Class text
Part.
A kind of java applet protective device, comprising:
Document analysis module for parsing Class file to be encrypted, and determines the operation part in Code attribute;
Encrypting module is instructed, is encrypted for the described instruction part to the Class file, target Class is obtained
File;
Meta file recording module, for creating meta file, and by described instruction part in the target Class file
In corresponding location information the meta file is written;
Corresponding relation building module, for establishing the corresponding relationship of the target Class file and the meta file;
Deciphering module is loaded, for loading the target Class using running in the target Class file processes
When file, the meta file that there is corresponding relationship with the target Class file is read;Utilize the meta file record
The location information, the described instruction part in the target Class file is decrypted, the Class file is obtained.
Preferably, the load deciphering module specifically for the Agent of the native write using C/C++, and is called
Class file loading function loads the target Class file.
A kind of java applet protection equipment, comprising:
Memory, for storing computer program;
Processor, the step of above-mentioned java applet guard method is realized when for executing the computer program.
A kind of readable storage medium storing program for executing is stored with computer program, the computer program quilt on the readable storage medium storing program for executing
The step of processor realizes above-mentioned java applet guard method when executing.
Using method provided by the embodiment of the present invention, Class file to be encrypted is parsed, and is determined in Code attribute
Operation part;The operation part of Class file is encrypted, target Class file is obtained;Meta file is created, and will be referred to
Enable part corresponding location information in target Class file that meta file is written;Establish target Class file and meta file
Corresponding relationship;Using in operational objective Class file processes, when loading target Class file, read and target Class
File has the meta file of corresponding relationship;Using the location information of meta file record, to the instruction in target Class file
Part is decrypted, and obtains Class file.
Since frame or container scan Class file, specific scanning is usually free of to operation part, so only encryption refers to
Enable part, so that it may compatible major part scene.It include Class file using it in the stage of designing and developing or announcement based on this
Before, after being compiled to java applet, that is, when obtaining Class file, Class file can be parsed, and determine Code attribute
In operation part encrypted, obtain target Class file.Target Class file and the difference of Class file are only that
Whether the operation part presence in Code attribute in file is encrypted, i.e. instruction department in Code attribute in Class file
Divide and be not encrypted, the operation part of the Code attribute in target Class file has encrypted.Wherein, the instruction department in Code attribute
The intracorporal code conversion of Java method point i.e. in java applet and obtain, after which is encrypted, can prevent non-
Method personnel carry out decompiling to target Class file, and then obtain java applet.To in the Code attribute in Class file
Operation part is encrypted, and after obtaining target Class file, creates meta file, and by operation part in target Class text
In part then corresponding location information write-in meta file establishes the corresponding relationship of target Class file and meta file.It can
When using operational objective Class file, by location information documented by meta file, to being encrypted in target Class file
Operation part afterwards is decrypted, so as to by normal load.In this way, can be in the situation for the compatibility for not influencing Class file
Under, it effectively prevents Class file by decompiling, realizes the purpose of protection java applet.
Correspondingly, the embodiment of the invention also provides java applet corresponding with above-mentioned java applet guard method protections
Device, equipment and readable storage medium storing program for executing, have above-mentioned technique effect, and details are not described herein.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of implementation flow chart of java applet guard method in the embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram of java applet protective device in the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of java applet protection equipment in the embodiment of the present invention;
Fig. 4 is a kind of concrete structure schematic diagram of java applet protection equipment in the embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Embodiment one:
Referring to FIG. 1, Fig. 1 is a kind of flow chart of java applet guard method in the embodiment of the present invention, this method includes
Following steps:
S101, parsing Class file to be encrypted, and determine the operation part in Code attribute.
In the stage of designing and developing, or announce include Class file application before, after being compiled to java applet, that is, obtain
When obtaining Class file, Class file can be parsed.That is, Class file to be encrypted is the Java that need to be protected
Program obtains after being compiled.When parsing to Class file, the standard that can refer to Class file format is carried out,
The resolving that this is no longer going to repeat them.When parsing to Class file, main purpose is in determining Class file
Operation part in Code attribute.The operation part represents in the code logic of Java source program, that is, Java source program
Method body.
S102, the operation part of Class file is encrypted, obtains target Class file.
Operation part in Class file is encrypted, the target Class text for only having encrypted operation part can be obtained
Part.Since the operation part represents the code logic of Java source program, even carrying out decompiling to target Class file,
Java source program corresponding with Class file will not be obtained.In this way, the purpose of protection java applet can be realized.It needs
Illustrate, the difference of Class file herein and target Class file be only that method body in Java original program or
Whether it is encrypted for the corresponding operation part in code logic part, specifically, the operation part i.e. in Class file is not added
It is close, and the operation part in target Class file is then encrypted.
Wherein, operation part is encrypted, the process for obtaining target Class file includes:
Step 1: encrypting to operation part, encrypted instruction is obtained;
Step 2: the operation part in Class file is replaced with encrypted instruction, target Class file is obtained.
For ease of description, above-mentioned two step is combined below and is illustrated.
Operation part is encrypted using common Encryption Algorithm, can so obtain encrypted instruction.Encrypted instruction is
For content corresponding to encrypted operation part.It is encrypted instruction that Class document, which is enabled partial replacement, retains other portions
Divide constant, acquisition target Class file.In addition, since the specific cipher mode on operation part does not influence implementation of the present invention
Example realizes protection java applet and takes into account the problem of compatibility, therefore, as long as the cipher mode can add operation part
It is close, it is not easy the interface that is cracked.I.e. in the embodiment of the present invention to Encryption Algorithm used in encryption and without limitation.
S103, creation meta file, and meta is written in corresponding location information in target Class file by operation part
File.
Wherein, meta file is the file for recording meta (element), specifically, being then in embodiments of the present invention record
File of the operation part in the corresponding location information of target Class file.
Specifically, creation meta file, and corresponding location information is written in target Class file by operation part
Meta file, specifically includes:
Step 1: initial position of the encrypted operation part in target Class file and length are determined as position
Information;
Step 2: creation meta file, and the record position information in meta file.
For ease of description, above-mentioned two step is combined below and is illustrated.
Initial position of the encrypted operation part in target Class file and length are determined as location information, and
A meta file, and the record position information in the meta file are created, afterwards to use operation or analysis target Class
When file, it can will be referred to by specific position of the encrypted operation part of meta file record in target Class file
Part is enabled to be decrypted, to obtain original Class file.
S104, the corresponding relationship for establishing target Class file and meta file.
After location information is stored in meta file, the corresponding relationship of target Class file Yu meta file can be established,
So that when target Class file is decrypted, the location information that can be recorded from meta file, rapidly and accurately learning is needed
The part of decryption.
Preferably, when establishing the corresponding relationship of target Class file and meta file, directly meta file can be stored
Under path identical with target Class file.In this way, can be obtained by access and target Class file same paths
Meta file.
S105, using in operational objective Class file processes, when loading target Class file, read and target
Class file has the meta file of corresponding relationship.
For the target Class file obtained after encryption, (JVM Tool Interface is Java Virtual Machine institute to JVMTI
The native programming interface of offer is local code interface) or abbreviation JVM, determining target Class file, there are format mistakes
Accidentally, it can not load, it is therefore necessary to can be just loaded after decrypted.That is, therefore in the process of load target Class file
In, it also needs for target class to be decrypted, such JVM could load target Class file.
Wherein, the meta file that there is corresponding relationship with target Class file is read, can be specially locally to be connect using Java
Mouth calls the ClassLoader real-time searching meta file of load target Class file;When finding meta file, read
Meta file.If it exists when multiple target Class files, when searching meta file, meta file all can be looked at the very start
It arrives, then the content of the inside is all remembered in memory, when target Class file loads, then can directly go in memory to look for corresponding
Data.
Preferably, it when loading target Class file, using the Agent of the C/C++ native write, and calls
Class file loading function loads target Class file.Since JVMTI is that the programming of native provided by Java Virtual Machine connects
Mouthful, it is a set of local code interface.Therefore JVMTI is used, can be come into contacts with by C/C++ and JNI.In fact, one when exploitation
As by the way of establishing an Agent come using JVMTI, it uses JVMTI function, some call back functions are set, and from
Current run mode information is obtained in Java Virtual Machine, and is judged, and the run mode of operation virtual machine is finally also possible to.?
Agent is compiled into after a dynamic link library, can load its (start-up loading mould when java applet starts
Formula), (live loaded mode) can also be loaded when after Java 5 using operation.
Wherein, native refers to local code, and local code is the code that can directly execute on specific machine, right
Than in the bytecode of Java, bytecode cannot directly execute on specific machine, need to be compiled into correspondence by JVM
The machine language of platform could execute.Native code is generally write using C/C++, and is compiled into one and can be loaded by JVM
Dynamic link library.
S106, using the location information of meta file record, the operation part in target Class file is decrypted,
Obtain Class file.
Specifically, call back function is arranged during providing to Class load in JVMTI, it is that JVM exists such as Hook function
During loading Class, if having registered this Hook function of ClassFileLoadHook, JVM is just called to this letter
Number, in this way, operation can be decrypted in Hook function.Used Encryption Algorithm when algorithm used in decrypting and encryption
Matching, the specific decrypting process of details are not described herein specific decipherment algorithm.
Using method provided by the embodiment of the present invention, Class file to be encrypted is parsed, and is determined in Code attribute
Operation part;The operation part of Class file is encrypted, target Class file is obtained;Meta file is created, and will be referred to
Enable part corresponding location information in target Class file that meta file is written;Establish target Class file and meta file
Corresponding relationship;Using in operational objective Class file processes, when loading target Class file, read and target Class
File has the meta file of corresponding relationship;Using the location information of meta file record, to the instruction in target Class file
Part is decrypted, and obtains Class file.
Since frame or container scan Class file, specific scanning is usually free of to operation part, so only encryption refers to
Enable part, so that it may compatible major part scene.It include Class file using it in the stage of designing and developing or announcement based on this
Before, after being compiled to java applet, that is, when obtaining Class file, Class file can be parsed, and determine Code attribute
In operation part encrypted, obtain target Class file.Target Class file and the difference of Class file are only that
Whether the operation part presence in Code attribute in file is encrypted, i.e. instruction department in Code attribute in Class file
Divide and be not encrypted, the operation part of the Code attribute in target Class file has encrypted.Wherein, the instruction department in Code attribute
The intracorporal code conversion of Java method point i.e. in java applet and obtain, after which is encrypted, can prevent non-
Method personnel carry out decompiling to target Class file, and then obtain java applet.To in the Code attribute in Class file
Operation part is encrypted, and after obtaining target Class file, creates meta file, and by operation part in target Class text
In part then corresponding location information write-in meta file establishes the corresponding relationship of target Class file and meta file.It can
When using operational objective Class file, by location information documented by meta file, to being encrypted in target Class file
Operation part afterwards is decrypted, so as to by normal load.In this way, can be in the situation for the compatibility for not influencing Class file
Under, it effectively prevents Class file by decompiling, realizes the purpose of protection java applet.
Embodiment two:
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of java applet protective devices, hereafter
The java applet protective device of description can correspond to each other reference with above-described java applet guard method.
Shown in Figure 2, which comprises the following modules:
Document analysis module 101 for parsing Class file to be encrypted, and determines the operation part in Code attribute;
Encrypting module 102 is instructed, is encrypted for the operation part to Class file, target Class file is obtained;
Meta file recording module 103, for creating meta file, and operation part is right in target Class file
The location information write-in meta file answered;
Corresponding relation building module 104, for establishing the corresponding relationship of target Class file and meta file;
Deciphering module 105 is loaded, for making after the corresponding relationship for establishing target Class file and meta file
With in operational objective Class file processes, when loading target Class file, reading has corresponding relationship with target Class file
Meta file;Using the location information of meta file record, the operation part in target Class file is decrypted, is obtained
Obtain Class file.
Using device provided by the embodiment of the present invention, Class file to be encrypted is parsed, and is determined in Code attribute
Operation part;The operation part of Class file is encrypted, target Class file is obtained;Meta file is created, and will be referred to
Enable part corresponding location information in target Class file that meta file is written;Establish target Class file and meta file
Corresponding relationship;Using in operational objective Class file processes, when loading target Class file, read and target Class
File has the meta file of corresponding relationship;Using the location information of meta file record, to the instruction in target Class file
Part is decrypted, and obtains Class file.
Since frame or container scan Class file, specific scanning is usually free of to operation part, so only encryption refers to
Enable part, so that it may compatible major part scene.It include Class file using it in the stage of designing and developing or announcement based on this
Before, after being compiled to java applet, that is, when obtaining Class file, Class file can be parsed, and determine Code attribute
In operation part encrypted, obtain target Class file.Target Class file and the difference of Class file are only that
Whether the operation part presence in Code attribute in file is encrypted, i.e. instruction department in Code attribute in Class file
Divide and be not encrypted, the operation part of the Code attribute in target Class file has encrypted.Wherein, the instruction department in Code attribute
The intracorporal code conversion of Java method point i.e. in java applet and obtain, after which is encrypted, can prevent non-
Method personnel carry out decompiling to target Class file, and then obtain java applet.To in the Code attribute in Class file
Operation part is encrypted, and after obtaining target Class file, creates meta file, and by operation part in target Class text
In part then corresponding location information write-in meta file establishes the corresponding relationship of target Class file and meta file.It can
When using operational objective Class file, by location information documented by meta file, to being encrypted in target Class file
Operation part afterwards is decrypted, so as to by normal load.In this way, can be in the situation for the compatibility for not influencing Class file
Under, it effectively prevents Class file by decompiling, realizes the purpose of protection java applet.
In a kind of specific embodiment of the invention, deciphering module 105 is loaded, specifically for what is write using C/C++
The Agent of native, and Class file loading function is called to load target Class file.
In a kind of specific embodiment of the invention, deciphering module 105 is loaded, is specifically used for utilizing Java local interface
Call the ClassLoader real-time searching meta file of load target Class file;When finding meta file, meta is read
File.
In a kind of specific embodiment of the invention, meta file recording module 103 is specifically used for encrypted finger
Initial position and length of the part in target Class file is enabled to be determined as location information;Meta file is created, and in meta text
Record position information in part.
In a kind of specific embodiment of the invention, corresponding relation building module 104, specifically for depositing meta file
It is placed under path identical with target Class file.
In a kind of specific embodiment of the invention, encrypting module 102 is instructed, specifically for adding to operation part
It is close, obtain encrypted instruction;Operation part in Class file is replaced with into encrypted instruction, obtains target Class file.
Embodiment three:
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of java applets to protect equipment, hereafter
A kind of java applet protection equipment of description can correspond to each other reference with a kind of above-described java applet guard method.
Shown in Figure 3, java applet protection equipment includes:
Memory D1, for storing computer program;
Processor D2 realizes the step of the java applet guard method of above method embodiment when for executing computer program
Suddenly.
Specifically, referring to FIG. 4, for a kind of specific structure signal of java applet protection equipment provided in this embodiment
Figure, java applet protection equipment can generate bigger difference because configuration or performance are different, may include one or one
The above processor (central processing units, CPU) 322 (for example, one or more processors) and storage
Device 332, one or more storage application programs 342 or data 344 storage medium 330 (such as one or more
Mass memory unit).Wherein, memory 332 and storage medium 330 can be of short duration storage or persistent storage.It is stored in storage
The program of medium 330 may include one or more modules (diagram does not mark), and each module may include at data
Manage the series of instructions operation in equipment.Further, central processing unit 322 can be set to communicate with storage medium 330,
The series of instructions operation in storage medium 330 is executed in java applet protection equipment 301.
Java applet, which protects equipment 301, to include one or more power supplys 326, one or more are wired
Or radio network interface 350, one or more input/output interfaces 358, and/or, one or more operating systems
341。
Step in java applet guard method as described above can be protected the structure of equipment to realize by java applet.
Example IV:
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of readable storage medium storing program for executing, are described below
A kind of readable storage medium storing program for executing can correspond to each other reference with a kind of above-described java applet guard method.
A kind of readable storage medium storing program for executing is stored with computer program on readable storage medium storing program for executing, and computer program is held by processor
The step of java applet guard method of above method embodiment is realized when row.
The readable storage medium storing program for executing be specifically as follows USB flash disk, mobile hard disk, read-only memory (Read-OnlyMemory, ROM),
The various program storage codes such as random access memory (Random Access Memory, RAM), magnetic or disk can
Read storage medium.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
Claims (10)
1. a kind of java applet guard method characterized by comprising
Class file to be encrypted is parsed, and determines the operation part in Code attribute;
The described instruction part of the Class file is encrypted, target Class file is obtained;
Meta file is created, and by described instruction part in the target Class file described in the write-in of corresponding location information
Meta file;
Establish the corresponding relationship of the target Class file and the meta file;
Using running in the target Class file processes, when loading the target Class file, read and the target
Class file has the meta file of corresponding relationship;
Using the location information of the meta file record, to the described instruction part in the target Class file into
Row decryption, obtains the Class file.
2. java applet guard method according to claim 1, which is characterized in that load the target Class file, wrap
It includes:
Using the Agent of the C/C++ native write, and Class file loading function is called to load the target Class text
Part.
3. java applet guard method according to claim 1, which is characterized in that the reading and the target Class
File has the meta file of corresponding relationship, comprising:
It is called using Java local interface and loads the text of meta described in the ClassLoader real-time searching of the target Class file
Part;
When finding the meta file, the meta file is read.
4. java applet guard method according to claim 1, which is characterized in that the creation meta file, and by institute
It states operation part corresponding location information in the target Class file and the meta file is written, comprising:
Initial position of the encrypted described instruction part in the target Class file and length are determined as the position
Information;
The meta file is created, and records the location information in the meta file.
5. java applet guard method according to claim 1, which is characterized in that described to establish the target Class text
The corresponding relationship of part and the meta file, comprising:
The meta file is stored under path identical with the target Class file.
6. java applet guard method according to any one of claims 1 to 5, which is characterized in that the Class file
Described instruction part encrypted, obtain target Class file, comprising:
Described instruction part is encrypted, encrypted instruction is obtained;
It is the encrypted instruction by the described instruction partial replacement in the Class file, obtains the target Class file.
7. a kind of java applet protective device characterized by comprising
Document analysis module for parsing Class file to be encrypted, and determines the operation part in Code attribute;
Encrypting module is instructed, is encrypted for the described instruction part to the Class file, target Class file is obtained;
Meta file recording module, for creating meta file, and described instruction part is right in the target Class file
The meta file is written in the location information answered;
Corresponding relation building module, for establishing the corresponding relationship of the target Class file and the meta file;
Deciphering module is loaded, for loading the target Class file using running in the target Class file processes
When, read the meta file that there is corresponding relationship with the target Class file;Utilize the institute of the meta file record
Location information is stated, the described instruction part in the target Class file is decrypted, obtains the Class file.
8. java applet protective device according to claim 7, which is characterized in that the load deciphering module, it is specific to use
In the Agent of the native write using C/C++, and Class file loading function is called to load the target Class file.
9. a kind of java applet protects equipment characterized by comprising
Memory, for storing computer program;
Processor realizes the java applet protection side as described in any one of claim 1 to 6 when for executing the computer program
The step of method.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the meter on the readable storage medium storing program for executing
It is realized when calculation machine program is executed by processor as described in any one of claim 1 to 6 the step of java applet guard method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811349503.4A CN109460640A (en) | 2018-11-13 | 2018-11-13 | A kind of java applet guard method, device, equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811349503.4A CN109460640A (en) | 2018-11-13 | 2018-11-13 | A kind of java applet guard method, device, equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109460640A true CN109460640A (en) | 2019-03-12 |
Family
ID=65610228
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811349503.4A Pending CN109460640A (en) | 2018-11-13 | 2018-11-13 | A kind of java applet guard method, device, equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109460640A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110309630A (en) * | 2019-06-28 | 2019-10-08 | 南京冰鉴信息科技有限公司 | A kind of Java code encryption method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043932A (en) * | 2010-12-31 | 2011-05-04 | 中国航空工业集团公司第六三一研究所 | Method for preventing Java program from being decompiled |
CN103077332A (en) * | 2012-12-28 | 2013-05-01 | 飞天诚信科技股份有限公司 | Method and device for running packer application with self-checking |
CN103970563A (en) * | 2014-04-15 | 2014-08-06 | 四川长虹电器股份有限公司 | Dynamic Android class loading method |
CN106203006A (en) * | 2016-08-31 | 2016-12-07 | 北京鼎源科技有限公司 | Android application reinforcement means based on dex Yu so file Dynamic Execution |
CN107220528A (en) * | 2017-07-21 | 2017-09-29 | 北京深思数盾科技股份有限公司 | The protection of java applet and operation method, device and terminal |
CN108133147A (en) * | 2017-12-20 | 2018-06-08 | 中兴通讯股份有限公司 | Guard method, equipment and the readable storage medium storing program for executing of executable code |
CN108399319A (en) * | 2017-09-30 | 2018-08-14 | 平安科技(深圳)有限公司 | Source code guard method, application server and computer readable storage medium |
-
2018
- 2018-11-13 CN CN201811349503.4A patent/CN109460640A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102043932A (en) * | 2010-12-31 | 2011-05-04 | 中国航空工业集团公司第六三一研究所 | Method for preventing Java program from being decompiled |
CN103077332A (en) * | 2012-12-28 | 2013-05-01 | 飞天诚信科技股份有限公司 | Method and device for running packer application with self-checking |
CN103970563A (en) * | 2014-04-15 | 2014-08-06 | 四川长虹电器股份有限公司 | Dynamic Android class loading method |
CN106203006A (en) * | 2016-08-31 | 2016-12-07 | 北京鼎源科技有限公司 | Android application reinforcement means based on dex Yu so file Dynamic Execution |
CN107220528A (en) * | 2017-07-21 | 2017-09-29 | 北京深思数盾科技股份有限公司 | The protection of java applet and operation method, device and terminal |
CN108399319A (en) * | 2017-09-30 | 2018-08-14 | 平安科技(深圳)有限公司 | Source code guard method, application server and computer readable storage medium |
CN108133147A (en) * | 2017-12-20 | 2018-06-08 | 中兴通讯股份有限公司 | Guard method, equipment and the readable storage medium storing program for executing of executable code |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110309630A (en) * | 2019-06-28 | 2019-10-08 | 南京冰鉴信息科技有限公司 | A kind of Java code encryption method and device |
CN110309630B (en) * | 2019-06-28 | 2023-05-30 | 南京冰鉴信息科技有限公司 | Java code encryption method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2549380B1 (en) | Information processing device, virtual machine generation method, and application software distribution system | |
US9027075B2 (en) | Enforcing security rules at runtime | |
CN104573416B (en) | A kind of method and device for generating application installation package, executing application | |
CN106203006A (en) | Android application reinforcement means based on dex Yu so file Dynamic Execution | |
US20080270806A1 (en) | Execution Device | |
US20160203087A1 (en) | Method for providing security for common intermediate language-based program | |
CN105095771B (en) | A kind of guard method of shared file destination and device | |
US7707631B2 (en) | Device and method for processing a program code | |
KR102028091B1 (en) | Apparatus and method for loading up dex file into memory | |
CN110059456B (en) | Code protection method, code protection device, storage medium and electronic equipment | |
CN109598107B (en) | Code conversion method and device based on application installation package file | |
CN108229112A (en) | A kind of operation method and device for protecting application program, application program | |
CN105022936A (en) | Class file encryption and decryption method and class file encryption and decryption device | |
CN110309630B (en) | Java code encryption method and device | |
WO2011134207A1 (en) | Method for protecting software | |
JP4727366B2 (en) | Information processing apparatus, information processing system, program, and recording medium | |
CN112434266A (en) | Shell code control flow flattening confusion method | |
JP4664055B2 (en) | Program dividing device, program executing device, program dividing method, and program executing method | |
US20030179883A1 (en) | Self-restoration type program, program producing method and apparatus, information processing apparatus and program | |
US8838996B2 (en) | Non-transitory computer readable medium, program protection apparatus, and program protection method | |
CN108170433A (en) | A kind of Java code obscures method, restoration methods and its device | |
CN109460640A (en) | A kind of java applet guard method, device, equipment and readable storage medium storing program for executing | |
CN110472425A (en) | Unity plug-in unit encryption method based on Mono, storage medium | |
CN111475152B (en) | Code processing method and device | |
CN109840396B (en) | Apparatus and method for providing security and apparatus and method for executing security to protect code of shared object |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190312 |