Unlock instant, AI-driven research and patent intelligence for your innovation.

Descrambling operation method and scrambling forming method for Java class object as well as device thereof

An operation method and a java class technology, applied in the computer field, can solve the problems of inability to recognize key field values, insecure class files, low efficiency, etc., and achieve the effect of facilitating log location problems

Active Publication Date: 2013-06-12
HUAWEI TECH CO LTD
View PDF2 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

In the dynamic proxy software packages such as Spring used in the Java development process, many key contents are written in the Extensible Markup Language (eXtensible Markup Language, XML) configuration file. If the code is confused separately, the Spring project will fail because it cannot Recognize the key field value in XML and cannot be used normally
When using a custom class loader to encrypt and decrypt class files, although the encrypted class file cannot be decompiled, the custom class loader itself cannot prevent decompilation
Therefore, encrypted class files are still insecure
The technology of using a custom class loader for encryption has limitations. It is not applicable in the network and Open Service Gateway Initiative (OSGI) environment where the three-party component class loader cannot be defined, and it is not applicable to the entire class The file is encrypted, and the efficiency is relatively low when decrypting

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Descrambling operation method and scrambling forming method for Java class object as well as device thereof
  • Descrambling operation method and scrambling forming method for Java class object as well as device thereof
  • Descrambling operation method and scrambling forming method for Java class object as well as device thereof

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0064] figure 1 It is a flow chart of the descrambling and running method for Java objects provided by Embodiment 1 of the present invention. The method in this embodiment is applicable to the case of protecting the class files (ie, Java bytecodes) compiled from Java source codes through the Java development kit. The method is executed by the descrambling running device of the Java class object configured in the computer, and the device is usually implemented in the form of hardware and / or software. The method of the present embodiment comprises the steps:

[0065] Step 110, loading an agent instance (Instrument Agent) through the Java virtual machine;

[0066] In step 110, after the Java virtual machine is activated, the proxy instance will be loaded first, and then a class loader will be generated. Load the proxy instance to read the content of the original Java class object, and return it to the Java virtual machine in the form of byte array.

[0067] Step 120, initiali...

Embodiment 2

[0076] figure 2 It is a flow chart of the descrambling operation method of the Java class object provided by the second embodiment of the present invention. The embodiment of the present invention is based on the above-mentioned embodiment and further optimized. Refer to figure 2 , in this embodiment, the operation of loading the agent instance through the Java virtual machine specifically includes the following steps:

[0077] Step 210, read the proxy class object containing the function of the proxy instance through the Java virtual machine;

[0078] In step 210, the function of the proxy instance is used to read the content of the original Java class object when the Java virtual machine starts, and the Java class object includes a function. In this embodiment, the Java class object includes a A function named premain will be described, but the present invention is not limited thereto. This function is used to read the contents of a Java class object. And pack the proxy...

Embodiment 3

[0082] image 3 It is a flow chart of the Java class object scrambling formation method provided by Embodiment 3 of the present invention. The method in this embodiment is applicable to the case of protecting the class files (ie, Java bytecodes) compiled from Java source codes through the Java development kit. The method is executed by a scrambling forming device configured in a computer as a Java class object, and the device is usually implemented in the form of hardware and / or software. The method of the present embodiment comprises the steps:

[0083] Step 310, obtaining each byte in the Java class object in bytecode format;

[0084] In step 310, the contents of all Java class objects in the jar file are read out in the form of byte arrays to obtain each byte in the Java class objects in bytecode format,

[0085] Step 320, scrambling each byte of the Java class object in units of bytes;

[0086] In step 320, each byte of the Java class object is scrambled, preferably in...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a descrambling operation method and a scrambling forming method for a Java class object as well as a device of methods. The descrambling operation method for the Java class object comprises the steps as follows: an agency embodiment is loaded through a Java virtual machine; a class loader is initialized through the Java virtual machine; for a scrambled Java class object in a syllable code format, the agency embodiment is used for converting the format in byte unit for the scrambled Java class object to be executed according to scrambling information of a scrambling list of the scrambled Java class object, so that a descrambled Java class object is formed; and the descrambled Java class object is operated through the class loader. According to an embodiment of the invention, positioning can be achieved conveniently according to a log under the condition that the structure of the Java class object during operation is not changed, the usage of a third party component is not limited, and the design of the class loader of a system is not limited.

Description

technical field [0001] The embodiment of the present invention relates to computer technology, and in particular to a method for descrambling and running Java objects, a method for forming scrambles and a device thereof. Background technique [0002] Java is a cross-platform, interpreted language. The Java development kit provided by Oracle compiles the Java source code into a class (Class) file (that is, Java bytecode), and the Java virtual machine is responsible for interpreting and executing the class file. Different from the local object code, the method name and variable name are still reserved in the class file, and variables and methods are accessed through these names. These symbols often carry a lot of semantic information. Therefore, it is easier to decompile the class file. At present, there are many Java decompilation tools on the market, some are free, some are commercial, and some are open source. These tools are capable of generating high-quality source cod...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F21/14
Inventor 苏博
Owner HUAWEI TECH CO LTD