WO2021217980A1 - java代码的加壳方法与系统 - Google Patents

java代码的加壳方法与系统 Download PDF

Info

Publication number
WO2021217980A1
WO2021217980A1 PCT/CN2020/111626 CN2020111626W WO2021217980A1 WO 2021217980 A1 WO2021217980 A1 WO 2021217980A1 CN 2020111626 W CN2020111626 W CN 2020111626W WO 2021217980 A1 WO2021217980 A1 WO 2021217980A1
Authority
WO
WIPO (PCT)
Prior art keywords
code
obfuscated
source code
class loader
java
Prior art date
Application number
PCT/CN2020/111626
Other languages
English (en)
French (fr)
Inventor
杨哲
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021217980A1 publication Critical patent/WO2021217980A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation

Definitions

  • the embodiments of the present application relate to the field of communication encryption technology, and in particular, to a method and system for packing java code.
  • the purpose of the embodiments of the present application is to provide a method and system for packing java code, which enhances the security of the code.
  • an embodiment of the present application provides a method for shelling java code, including:
  • code layering of the source code to be processed according to the code type and preset rules to obtain the code to be obfuscated includes:
  • the code types are divided into main obfuscated source code types, minor obfuscated source code types, and non-obfuscated source code types;
  • the to-be-processed source code corresponding to the obfuscated source code type and the secondary obfuscated source code type is used as the to-be-obfuscated code for obfuscation, wherein the to-be-processed source code corresponding to the non-obfuscated source code type is not obfuscated.
  • the code to be obfuscated is java source code and the storage mode is in the first file format;
  • the compiled code is java byte code and the storage mode is in the second file format;
  • the compiling the to-be-obfuscated code through a compiling tool to obtain the compiled code includes:
  • the code to be obfuscated in the first file format is compiled with a compilation tool to obtain the compiled code in the second file format for loading by a class loader, and the class loader is a bytecode class Loader.
  • a class loader is customized in the loading container according to the type of the encrypted code, and the decryption rule for the class loader including the encrypted code includes:
  • a class loader is customized according to the decryption rule and the type of the encrypted code.
  • the class loader inherits the type of the encryption code by overwriting the loadClass method to load the encryption code;
  • the class loader obtains the key according to the configuration file, and decrypts the encrypted code according to the decryption rule and the key to obtain the compiled code.
  • the method includes:
  • the configuration file is stored in the loading container, so that the class loader obtains the key according to the configuration file to decrypt the encrypted code in the loading container.
  • an embodiment of the present application also provides a java code packing system, including:
  • the receiving module is configured to receive source code to be processed, and obtain the code type of the source code to be processed, where the source code to be processed is java source program code;
  • the layering module is used to layer the source code to be processed according to the code type and preset rules to obtain the code to be obfuscated;
  • a compilation module which is used to compile the to-be-obfuscated code through a compilation tool to obtain the compiled code
  • the obfuscation module is used to perform character substitution on the compiled code according to the obfuscation dictionary to generate an obfuscated code;
  • An encryption module configured to obtain a pre-generated key, encrypt the obfuscated code with the key, to obtain an encrypted code
  • a customization module configured to customize a class loader in a loading container according to the type of the encrypted code, the class loader including the decryption rule of the encrypted code;
  • the generating module is used to generate a jar package from the encryption rule and the encryption code to complete the encryption of the java source code.
  • the layered module is further used for:
  • the code types are divided into main obfuscated source code types, minor obfuscated source code types, and non-obfuscated source code types;
  • the to-be-processed source code corresponding to the obfuscated source code type and the secondary obfuscated source code type is used as the to-be-obfuscated code for obfuscation, wherein the to-be-processed source code corresponding to the non-obfuscated source code type is not obfuscated.
  • an embodiment of the present application also provides a computer device, the computer device includes a memory and a processor, the memory stores a computer program that can run on the processor, and the computer program is When the processor is executed, the steps of the above-mentioned method of shelling java code are implemented.
  • embodiments of the present invention also provide a computer-readable storage medium having a computer program stored in the computer-readable storage medium, and the computer program may be executed by at least one processor to enable the At least one processor executes the steps of the java code packing method as described above.
  • the method and system for shelling java code provided by the embodiments of the present application reduces the risk of source code being decompiled and cracked by obfuscation of the source code; and encrypts the obfuscated code to perform secondary encryption on the source code, which increases Packing mechanism. And when the encrypted code is run, the class loader ClassLoader is customized. Even if the attacker cracks the customized ClassLoader itself, the source code itself has been obfuscated, which increases the difficulty of cracking. This mechanism has very low code intrusion and can be widely used in scenarios where localized deployment and secondary development capabilities are output.
  • Fig. 1 is a flowchart of Embodiment 1 of a method for packing java code of this application.
  • FIG. 2 is a flowchart of step S102 in the first embodiment of the method for packing java code of this application.
  • FIG. 3 is a flowchart of step S109 in the first embodiment of the method for packing java code of this application.
  • FIG. 4 is a flowchart of step S110 in the first embodiment of the method for packing java code of this application.
  • FIG. 5 is a flowchart of step S113 in the first embodiment of the method for packing java code of this application.
  • Fig. 6 is a schematic diagram of the program modules of the second embodiment of the packaging system for java code of this application.
  • FIG. 7 is a schematic diagram of the hardware structure of the third embodiment of the computer equipment of this application.
  • Fig. 1 there is shown a step flow chart of the method for shelling java code in the first embodiment of the present application. It can be understood that the flowchart in this method embodiment is not used to limit the order of execution of the steps.
  • the following exemplarily describes the computer device 2 as the execution subject. details as follows.
  • Step S100 Receive source code to be processed, and obtain the code type of the source code to be processed, where the source code to be processed is java source program code.
  • the source code to be processed is the source code of a java program; the code types of the source code to be processed include interfaces, entity classes, and core code classes.
  • Step S102 Perform code layering on the source code to be processed according to the code type and preset rules to obtain the code to be obfuscated.
  • the preset rules are obfuscation rules. Users can customize obfuscation rules to determine which types of source code can be obfuscated, divide the source code to be processed into obfuscated source code and non-obfuscated source code, and extract the core code. Leave, keep source code output for interfaces and entity classes.
  • the code types include service implementation code types, interface types, spi types, and serialization types. Determine which is the core code, and then determine which can be confused through preset rules.
  • the step S102 further includes:
  • Step S1021 According to preset rules, the code types are divided into main obfuscated source code types, minor obfuscated source code types, and non-obfuscated source code types.
  • the proguard plug-in is introduced, the obfuscation strategy is configured, and the code to be obfuscated is obtained.
  • the obfuscation rule divides the code to be obfuscated into main obfuscated source code: obfuscate the names, attributes, and method names of the corresponding type of the main obfuscated source code; minor obfuscated source code: do not obfuscate the name of the corresponding type of the minor obfuscated source code , And the attribute and method name of the corresponding type are selectively obfuscated; non-obfuscated object: non-obfuscated source code, abnormalities may occur after obfuscation, and no obfuscation will be performed.
  • the obfuscation rules include but are not limited to: all local native methods are not obfuscated; the subclasses of certain classes cannot be obfuscated, because these subclasses may be called externally; enumeration classes cannot be obfuscated; serialized classes are not obfuscated Confusion; resource classes and their methods cannot be confused; callback methods cannot be confused; reserved classes and members cannot be confused; embedded classes cannot be confused; classes and methods related to reflection cannot be confused.
  • Step S1022 Obfuscate the to-be-processed source code corresponding to the obfuscated source code type and the secondary obfuscated source code type as the to-be-obfuscated code, wherein the to-be-processed source code corresponding to the non-obfuscated source code type is not processed Obfuscation.
  • code layering is to support secondary development while protecting the core code from being leaked.
  • the specific implementation method of code layering The implementation code of the service is separated from the separate modules of the layer to obfuscate, and the non-core code such as interface, spi, serialization, etc. is still output from the source code, which is convenient for secondary development and integration.
  • step S104 the code to be obfuscated is compiled by a compilation tool to obtain the compiled code.
  • the code to be obfuscated is java source code and the storage method is in the first file format;
  • the compiled code is java byte code and the storage method is in the second file format;
  • the step S104 further includes:
  • the code to be obfuscated in the first file format is compiled with a compilation tool to obtain the compiled code in the second file format for loading by the class loader, and the class loader is byte Code loading container.
  • the code to be obfuscated is the source program code of java
  • the first file format of the storage method of the obfuscated code is a .java file, which is converted into java byte code after being compiled by the java compiler.
  • the second storage method is The file format is a .class file, that is, compiled code. When the class loader loads the compiled code, it obtains the bytecode of the .class file and loads it.
  • Step S106 Perform character substitution on the compiled code according to the obfuscated dictionary to generate an obfuscated code.
  • the obfuscated code file at this time includes the obfuscated code that can be compiled and run.
  • the compiled code is replaced by characters according to the obfuscation dictionary to obtain the obfuscated code, and the obfuscated code is stored in the obfuscated code file.
  • the obfuscated code file is. class file.
  • Proguard is an obfuscation tool written in pure java. There are two ways to use it: client and jar package. The program can be packaged as a jar and then obfuscated with tools, or the proguard plug-in can be imported into the maven project object model to obtain obfuscated code files and obfuscate the source code.
  • character replacement is performed on the compiled code through a pre-configured obfuscation dictionary, even if it is decompiled, it is a special obfuscation character.
  • the obfuscation dictionary must be configured before obfuscation.
  • the obfuscation dictionary can be read when the compiled code is compiled, and the core code characters in the compiled code can be replaced.
  • the characters after replacement come from the obfuscation dictionary. Through the design of the confusion dictionary, the difficulty of readability after confusion is enhanced.
  • proguard uses the file with the suffix .pro as the configuration file, configure the jar file to be obfuscated (including the code to be obfuscated) in this file, the jar file output after obfuscation, the obfuscation needs Referenced java class libraries, etc.; when confused: download proguard, decompress and copy the proguard.jar file and pro configuration file in the lib directory to the bin of the java installation directory.
  • JAVA_HOME parent node
  • you don’t need to copy it to In this directory, use the following commands to obfuscate, assuming that the pro configuration file is named myconfig.pro; finally, verify: you can use the jd-gui decompiler tool to verify the obfuscation results, and drag the jars before and after obfuscation Go to the jd-gui tool, and then compare the source code, you can get a big difference between the decompiled and the source code after obfuscation.
  • Step S108 Obtain a pre-generated key, and encrypt the obfuscated code with the key to obtain an encrypted code.
  • the KeyGenerator provided by java provides the function of a symmetric key generator, supports various algorithms, and generates keys. After obtaining the key, there is also an independent encryption program that encrypts the compiled code. Through the independent encryption program, the key is encrypted to the obfuscated code for encryption to obtain the encrypted code. The obfuscated code is encrypted using the 3DES encryption algorithm. 3DES is also called Triple DES. It is a mode of the DES encryption algorithm. It uses three 56-bit keys to encrypt the obfuscated code three times. To put it simply, due to the enhancement of the computing power of the computer, the key of the original DES cipher is easy to be cracked by force. 3DES is used to provide a relatively simple method to avoid similar cracking by increasing the length of the DES key.
  • step S109 is further included after the step S108:
  • Step S109A Generate a key of the obfuscated code, and write the key into the configuration file.
  • the key is written into the configuration file, and when the class loader is loaded, it will find the key location according to the configuration file for decryption.
  • Step S109B storing the configuration file in the loading container, so that the class loader obtains the key according to the configuration file to decrypt the encrypted code in the loading container.
  • the configuration file is placed in the loading container.
  • the class loader is loaded, and the key is first obtained according to the configuration file, and the class loader then uses the key to decrypt the encrypted code.
  • Step S110 Customize a class loader in the loading container according to the type of the encrypted code, the class loader including the decryption rule of the encrypted code.
  • class loader For the Java virtual machine, you can create an instance of a custom ClassLoader class (class loader) for the web container (loading container), and then explicitly request it to load another type of encrypted code. This forces the JVM (Java Virtual Machine (Java Virtual Machine) associates the encryption code type to the customized ClassLoader. That is, the class loader is customized in the JVM, and the class loader includes all types of encrypted codes.
  • JVM Java Virtual Machine
  • the step S110 further includes:
  • Step S110A generating the decryption rule for decrypting the encrypted code, wherein the decryption rule is stored in the blockchain.
  • a corresponding encryption rule is set to decrypt the encrypted code through the decryption rule when the class loader loads the encrypted code.
  • the above-mentioned decryption rules may also be stored in a node of a blockchain.
  • Step S110B in the loading container, customize the class loader according to the decryption rule and the type of the encrypted code.
  • the decryption rule is loaded into the class loader in the loading container, and the class loader can perform decryption processing.
  • the class loader can perform decryption processing.
  • you get the decryption instruction start the decryption application, use the class loader to load the class file into the memory to generate a byte array.
  • the binary bytes are encrypted, and the decryption method is written according to the encryption rules to decrypt the byte array; and finally Convert the byte array into a class object instance and return it.
  • Step S112 Generate a jar package from the decryption rule and the encryption code to complete the encryption of the java source code.
  • the encryption rule and the encryption code are encapsulated to obtain a jar package, which completes the encryption processing of the running environment of the java source program code to prevent unlimited deployment of applications.
  • step S113 is further included after the step S112:
  • step S113A the class loader inherits the type of the encryption code by overwriting the loadClass method to load the encryption code.
  • the class loader when the class loader loads the encrypted code, it first obtains the key to decrypt the encrypted code, and then loads and analyzes the compiled code through the class loader ClassLoader.
  • the loadClass method to load the binary type of the name of the compiled code (that is, the package name of the jar package).
  • the loadClass method is implemented by the ClassLoader class (that is, the class loader).
  • the logic in the override loadClass method is the realization of the parent delegation mode . You can also manually call .loadClass so that ClassLoader can load classes with obfuscated codes.
  • Step S113B the class loader obtains the key according to the configuration file, and decrypts the encrypted code according to the decryption rule and the key to obtain the compiled code.
  • the decryption rule is to decrypt the bytecode of the encrypted code.
  • the class loader in the web container (loading container) in the JVM must be rewritten, and the encrypted class bytecode is loaded through a custom class loader to get the compilation Code.
  • FIG. 6 shows a schematic diagram of the program modules of the second embodiment of the java code packing system of the present application.
  • the java code packer system 20 may include or be divided into one or more program modules, one or more program modules are stored in a storage medium and executed by one or more processors,
  • the program module referred to in the embodiments of the present application refers to a series of computer-readable instructions that can complete specific functions, and is more suitable for describing the execution process of the java code packer system 20 in the storage medium than the program itself. The following description will specifically introduce the functions of each program module in this embodiment:
  • the receiving module 200 is configured to receive source code to be processed, and obtain the code type of the source code to be processed, and the source code to be processed is java source program code.
  • the source code to be processed is the source code of a java program; the code types of the source code to be processed include interfaces, entity classes, and core code classes.
  • the layering module 202 is configured to layer the source code to be processed according to the code type and preset rules to obtain the code to be obfuscated.
  • the preset rules are obfuscation rules. Users can customize obfuscation rules to determine which types of source code can be obfuscated, divide the source code to be processed into obfuscated source code and non-obfuscated source code, and extract the core code. Leave, keep source code output for interfaces and entity classes.
  • the code types include service implementation code types, interface types, spi types, and serialization types. Determine which is the core code, and then determine which can be confused through preset rules.
  • the layering module 202 is further used for:
  • the code types are divided into main obfuscated source code types, minor obfuscated source code types, and non-obfuscated source code types.
  • the proguard plug-in is introduced, the obfuscation strategy is configured, and the code to be obfuscated is obtained.
  • the obfuscation rule divides the code to be obfuscated into main obfuscated source code: obfuscate the names, attributes, and method names of the corresponding type of the main obfuscated source code; minor obfuscated source code: do not obfuscate the name of the corresponding type of the minor obfuscated source code , And the attribute and method name of the corresponding type are selectively obfuscated; non-obfuscated object: non-obfuscated source code, abnormalities may occur after obfuscation, and no obfuscation will be performed.
  • the obfuscation rules include but are not limited to: all local native methods are not obfuscated; the subclasses of certain classes cannot be obfuscated, because these subclasses may be called externally; enumeration classes cannot be obfuscated; serialized classes are not obfuscated Confusion; resource classes and their methods cannot be confused; callback methods cannot be confused; reserved classes and members cannot be confused; embedded classes cannot be confused; classes and methods related to reflection cannot be confused.
  • the source code to be processed corresponding to the obfuscated source code type and the minor obfuscated source code type is used as the code to be obfuscated for obfuscation, wherein the source code to be processed corresponding to the non-obfuscated source code type is not obfuscated.
  • code layering is to support secondary development while protecting the core code from being leaked.
  • the specific implementation method of code layering The implementation code of the service is separated from the separate modules of the layer to obfuscate, and the non-core code such as interface, spi, serialization, etc. is still output from the source code, which facilitates the integration of secondary development.
  • the compiling module 204 is configured to compile the to-be-obfuscated code through a compiling tool to obtain compiled code.
  • the code to be obfuscated is java source code and the storage method is in the first file format;
  • the compiled code is java byte code and the storage method is in the second file format;
  • the step S104 further includes:
  • the code to be obfuscated in the first file format is compiled with a compilation tool to obtain the compiled code in the second file format for loading by the class loader, and the class loader is byte Code loading container.
  • the code to be obfuscated is the source program code of java
  • the first file format of the storage method of the obfuscated code is a .java file, which is converted into java byte code after being compiled by the java compiler.
  • the second storage method is The file format is a .class file, that is, compiled code. When the class loader loads the compiled code, it obtains the bytecode of the .class file and loads it.
  • the obfuscation module 206 is configured to perform character substitution on the compiled code according to the obfuscation dictionary to generate an obfuscated code.
  • the obfuscated code file at this time includes the obfuscated code that can be compiled and run.
  • the compiled code is replaced by characters according to the obfuscation dictionary to obtain the obfuscated code, and the obfuscated code is stored in the obfuscated code file.
  • the obfuscated code file is. class file.
  • Proguard is an obfuscation tool written in pure java. There are two ways to use it: client and jar package. The program can be packaged as a jar and then obfuscated with tools, or the proguard plug-in can be imported into the maven project object model to obtain obfuscated code files and obfuscate the source code.
  • character replacement is performed on the compiled code through a pre-configured obfuscation dictionary, even if it is decompiled, it is a special obfuscation character.
  • the obfuscation dictionary must be configured before obfuscation.
  • the obfuscation dictionary can be read when the compiled code is compiled, and the core code characters in the compiled code can be replaced.
  • the characters after replacement come from the obfuscation dictionary. Through the design of the confusion dictionary, the difficulty of readability after confusion is enhanced.
  • proguard uses the file with the suffix of .pro as the configuration file, configure the jar file to be obfuscated (including the code to be obfuscated) in this file, the jar file output after obfuscation, the obfuscation needs Referenced java class library, etc.; when confused: download proguard, decompress and copy the proguard.jar file and pro configuration file in the lib directory to the bin of the java installation directory.
  • JAVA_HOME parent node
  • you don’t need to copy it to In this directory, use the following commands to obfuscate, assuming that the pro configuration file is named myconfig.pro; finally, verify: you can use the jd-gui decompiler tool to verify the obfuscation results, and drag the jars before and after obfuscation Go to the jd-gui tool, and then compare the source code, you can get a big difference between the decompiled and the source code after obfuscation.
  • the encryption module 208 is configured to obtain a pre-generated key, and encrypt the obfuscated code with the key to obtain an encrypted code.
  • the KeyGenerator provided by java provides the function of a symmetric key generator, supports various algorithms, and generates keys. After obtaining the key, there is also an independent encryption program that encrypts the compiled code. Through the independent encryption program, the key is encrypted to the obfuscated code for encryption to obtain the encrypted code. The obfuscated code is encrypted using the 3DES encryption algorithm. 3DES is also called Triple DES. It is a mode of the DES encryption algorithm. It uses three 56-bit keys to encrypt the obfuscated code three times. Simply put, due to the enhancement of the computing power of the computer, the key of the original DES cipher is easy to be cracked by force. 3DES is used to provide a relatively simple method to avoid similar cracking by increasing the length of the DES key.
  • the customization module 210 is configured to customize a class loader in a loading container according to the type of the encrypted code, and the class loader includes a decryption rule of the encrypted code.
  • class loader For the Java virtual machine, you can create an instance of a custom ClassLoader class (class loader) for the web container (loading container), and then explicitly request it to load another type of encrypted code. This forces the JVM (Java Virtual Machine (Java Virtual Machine) associates the encryption code type to the customized ClassLoader. That is, the class loader is customized in the JVM, and the class loader includes all types of encrypted codes.
  • JVM Java Virtual Machine
  • the customization module 210 is further used for:
  • a corresponding encryption rule is set to decrypt the encrypted code through the decryption rule when the class loader loads the encrypted code.
  • a class loader is customized according to the decryption rule and the type of the encrypted code.
  • the decryption rule is loaded into the class loader in the loading container, and the class loader can perform decryption processing.
  • the class loader can perform decryption processing.
  • you get the decryption instruction start the decryption application, use the class loader to load the class file into the memory to generate a byte array.
  • the binary bytes are encrypted, and the decryption method is written according to the encryption rules to decrypt the byte array; and finally Convert the byte array into a class object instance and return it.
  • the generating module 212 is configured to generate a jar package from the encryption rule and the encryption code to complete the encryption of the java source program code.
  • the encryption rule and the encryption code are encapsulated to obtain a jar package, which completes the encryption processing of the running environment of the java source program code to prevent unlimited deployment of applications.
  • the computer device 2 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions.
  • the computer device 2 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server or a server cluster composed of multiple servers).
  • the computer device 2 at least includes, but is not limited to, a memory 21, a processor 22, a network interface 23, and a packaging system 20 that can communicate with each other through a system bus. in:
  • the memory 21 includes at least one type of computer-readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory ( RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 21 may be an internal storage unit of the computer device 2, for example, a hard disk or a memory of the computer device 2.
  • the memory 21 may also be an external storage device of the computer device 2, for example, a plug-in hard disk equipped on the computer device 2, a smart memory card (Smart Media Card, SMC), Secure Digital (SD) card, Flash Card, etc.
  • the memory 21 may also include both the internal storage unit of the computer device 2 and its external storage device.
  • the memory 21 is generally used to store the operating system and various application software installed in the computer device 2, such as the program code of the java code packer system 20 in the second embodiment.
  • the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip.
  • the processor 22 is generally used to control the overall operation of the computer device 2.
  • the processor 22 is used to run the program code or process data stored in the memory 21, for example, the packer system 20 that runs java code, so as to implement the java code packer method of the first embodiment.
  • the network interface 23 may include a wireless network interface or a wired network interface, and the network interface 23 is generally used to establish a communication connection between the server 2 and other electronic devices.
  • the network interface 23 is used to connect the server 2 to an external terminal through a network, and to establish a data transmission channel and a communication connection between the server 2 and the external terminal.
  • the network may be an intranet (Intranet), the Internet (Internet), or a global system for mobile communications (Global System). of Mobile communication, GSM), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), 4G network, 5G network, Bluetooth (Bluetooth), Wi-Fi and other wireless or wired networks.
  • FIG. 7 only shows the computer device 2 with components 20-23, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
  • the java code packer system 20 stored in the memory 21 can also be divided into one or more program modules, and the one or more program modules are stored in the memory 21 and configured by One or more processors (the processor 22 in this embodiment) are executed to complete the application.
  • FIG. 6 shows a schematic diagram of the program modules of the second embodiment of the shelling system 20 that implements java code.
  • the shelling system 20 of the java code can be divided into a receiving module 200 and a layered module. 202, an obfuscation module 204, a compilation module 206, an encryption module 208, a customization module 210, and a generation module 212.
  • the program module referred to in the present application refers to a series of computer-readable instructions that can complete specific functions, and is more suitable than a program to describe the execution process of the java code packer system 20 in the computer device 2.
  • the specific functions of the program modules 200-212 have been described in detail in the second embodiment, and will not be repeated here.
  • the embodiment also provides a computer-readable storage medium.
  • the computer-readable storage medium may be nonvolatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX). Memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory , Magnetic disks, optical disks, servers, App application malls, etc., on which computer-readable instructions are stored, which realize corresponding functions when executed by the processor.
  • the computer-readable storage medium of this embodiment is used to store computer-readable instructions, and when executed by a processor, it implements the java code packing method of the first embodiment.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

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

Abstract

一种java代码的加壳方法,包括:将待处理源代码根据代码类型与预设规则进行代码分层,得到待混淆代码(S102);将所述待混淆代码通过编译工具进行编译,得到编译代码(S104);根据混淆字典对所述编译代码进行字符替换,生成混淆代码(S106);获取预先生成的密钥,通过加密规则用所述密钥加密所述混淆代码,得到加密代码(S108);根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则(S110);将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密(S112)。通过以上方式增加了代码的安全性。此外,解密规则可存储于区块链节点中。

Description

java代码的加壳方法与系统
本申请要求于2020年04月30日提交中国专利局、申请号为202010360272.8,发明名称为“java代码的加壳方法与系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信加密技术领域,尤其涉及一种java代码的加壳方法与系统。
背景技术
目前,在互联网技术高速发展的今天,知识产权保护问题日益突出。软件公司针对内部源码安全往往具有很强的把控力,通过诸如制度、监控、审计等手段规范员工源码安全意识。然而,发明人发现针对银行类本地化部署项目以及给到外包公司二次开发的项目,如何防止使用方通过反编译获取源码,进而侵犯知识产权成为日益严重的课题。不仅如此,源码泄露还会增加企业研发成本,降低市场竞争优势,创新能力发展受限。
鉴于java应用程序代码的跨平台性特点,许多公司都是通过java语言开发应用软件。业界对java应用程序源码保护的通用做法是代码混淆,然而混淆后的代码仅仅是对关键字符的替换,内部代码逻辑仍然可以通过分析获得,导致代码安全性不高。
发明内容
有鉴于此,本申请实施例的目的是提供一种java代码的加壳方法与系统,加强了代码的安全性。
为实现上述目的,本申请实施例提供了一种java代码的加壳方法,包括:
接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码;
将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码;
将所述待混淆代码通过编译工具进行编译,得到编译代码;
根据混淆字典对所述编译代码进行字符替换,生成混淆代码;
获取预先生成的密钥,通过加密规则将所述密钥加密所述混淆代码,得到加密代码;
根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则;
将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
进一步地,所述将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码包括:
根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型;
将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
进一步地,所述待混淆代码为java 源程序代码,存储方式为第一文件格式;所述编译代码为java字节代码,存储方式为第二文件格式;
所述将所述待混淆代码通过编译工具进行编译得到编译代码包括:
将所述第一文件格式的所述待混淆代码通过编译工具进行编译,得到所述第二文件格式的所述编译代码,以供类加载器进行加载,所述类加载器为字节码类加载器。
进一步地,根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则包括:
生成用于解密所述加密代码对应的所述解密规则,其中,所述解密规则存储在区块链中;
在所述加载容器中,根据所述解密规则以及所述加密代码的类型定制类加载器。
进一步地,所述将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密之后,包括:
所述类加载器通过覆写loadClass方法继承所述加密代码的类型,以加载所述加密代码;
所述类加载器根据配置文件获取所述密钥,并根据所述解密规则以及所述密钥解密所述加密代码,得到编译代码。
进一步地,所述获取预先生成的密钥,通过所述密钥加密所述混淆代码,得到加密代码之前,包括:
生成所述混淆代码的密钥,并将所述密钥写入至所述配置文件中;
将所述配置文件存储至所述加载容器中,以供所述类加载器在所述加载容器中,根据所述配置文件获取所述密钥对所述加密代码进行解密。
为实现上述目的,本申请实施例还提供了一种java代码的加壳系统,包括:
接收模块,用于接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码;
分层模块,用于将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码;
编译模块,用于将所述待混淆代码通过编译工具进行编译,得到编译代码;
混淆模块,用于根据混淆字典对所述编译代码进行字符替换,生成混淆代码;
加密模块,用于获取预先生成的密钥,通过所述密钥加密所述混淆代码,得到加密代码;
定制模块,用于根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则;
生成模块,用于将所述加密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
进一步地,所述分层模块进一步用于:
根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型;
将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
为实现上述目的,本申请实施例还提供了一种计算机设备,所述计算机设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的java代码的加壳方法的步骤。
为实现上述目的,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序可被至少一个处理器所执行,以使所述至少一个处理器执行如上所述的java代码的加壳方法的步骤。
本申请实施例提供的java代码的加壳方法与系统,通过对源代码进行混淆,降低了源代码被反编译破解的风险;且对混淆代码进行加密以对源代码进行二次加密,增加了加壳机制。并且运行加密代码时定制了类加载器ClassLoader,攻击者即使通过对定制ClassLoader本身进行破解,但是由于源代码本身已经做了混淆,增加了破解难度。该机制对代码侵入性极低,能够被广泛的应用到本地化部署和输出二次开发能力的场景中。
附图说明
图1为本申请java代码的加壳方法实施例一的流程图。
图2为本申请java代码的加壳方法实施例一的步骤S102的流程图。
图3为本申请java代码的加壳方法实施例一的步骤S109的流程图。
图4为本申请java代码的加壳方法实施例一的步骤S110的流程图。
图5为本申请java代码的加壳方法实施例一的步骤S113的流程图。
图6为本申请java代码的加壳系统实施例二的程序模块示意图。
图7为本申请计算机设备实施例三的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例一
参阅图1,示出了本申请实施例一之java代码的加壳方法的步骤流程图。可以理解,本方法实施例中的流程图不用于对执行步骤的顺序进行限定。下面以计算机设备2为执行主体进行示例性描述。具体如下。
步骤S100,接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码。
具体地,待处理源代码为java程序的源代码;待处理源代码的代码类型包括接口、实体类以及核心代码的类。
步骤S102,将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码。
具体地,预设规则为混淆规则,用户可自定义混淆规则,确定哪些源代码的类型可以进行混淆,将所述待处理源代码分成待混淆源代码和非混淆源代码,将核心代码进行抽离,针对接口、实体类保留源码输出。代码类型包括service的实现代码类型、接口类型、spi类型以及序列化类型,确定好哪些是核心代码,再通过预设规则确定哪些可以进行混淆。
示例性地,参阅图2,所述步骤S102进一步包括:
步骤S1021,根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型。
具体地,引入proguard插件,配置混淆策略,得到待混淆代码。混淆规则将待混淆代码分为主要混淆源代码:将该主要混淆源代码对应类型的名称、属性、方法名都进行混淆;次要混淆源代码:对次要混淆源代码对应类型的名称不混淆,其而对应类型的属性、方法名选择性混淆;非混淆对象:非混淆源代码,混淆后可能出现异常,不进行混淆。混淆规则包括但不限于:所有的本地native方法不被混淆;某些类的子类不能被混淆,因为这些子类,有可能被外部调用;枚举类不能被混淆;序列化的类不被混淆;资源类及其方法,都不能被混淆;回调方法不能被混淆;保留类和成员不被混淆;内嵌类不能被混淆;处理反射相关的类和方法不能被混淆。
步骤S1022,将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
具体地,代码分层的目的是为了支持二次开发,同时保护核心代码不被泄露。代码分层的具体实现方法:将service的实现代码剥离层单独模块进行混淆,而接口、spi、序列化等非核心代码仍然源码输出,方便二次开发集成。
步骤S104,将所述待混淆代码通过编译工具进行编译,得到编译代码。
示例性地,所述待混淆代码为java 源程序代码,存储方式为第一文件格式;所述编译代码为java字节代码,存储方式为第二文件格式;所述步骤S104进一步包括:
将所述第一文件格式的所述待混淆代码通过编译工具进行编译,得到所述第二文件格式的所述编译代码,以供所述类加载器进行加载,所述类加载器为字节码加载容器。
具体地,待混淆代码为java 的源程序代码,待混淆代码存储方式的第一文件格式为.java 文件,在经过java 编译器编译之后就被转换成java 字节代码,该存储方式的第二文件格式为.class 文件,即编译代码。类加载器进行加载编译代码时,获取.class 文件的字节码进行加载。
步骤S106,根据混淆字典对所述编译代码进行字符替换,生成混淆代码。
具体地,此时的混淆代码文件里包括可以进行编译运行的混淆代码,首先将编译代码根据混淆字典进行字符替换,得到混淆代码,将混淆代码存入至混淆代码文件中,混淆代码文件为.class文件。proguard是一个纯java编写的混淆工具,有客户端跟jar包两种使用方式。可以将程序打包为jar,然后用工具进行混淆,也可以在maven项目对象模型中导入proguard的插件,得到混淆代码文件,对源代码进行混淆。
示例性地,通过预先配置的混淆字典对编译代码做字符替换,即使反编译出来,也是混淆的特殊字符。混淆之前必须配置混淆字典,可在编译代码进行编译时读取混淆字典,对编译代码中的核心代码字符进行替换,替换后的字符来自于混淆字典。通过对混淆字典的设计,增强混淆后的可读性难度。
示例性地,混淆前,首先定义配置文件:proguard使用后缀为.pro的文件作为配置文件,在这个文件里配置需要混淆的jar文件(包括有待混淆代码),混淆后输出的jar文件,混淆需要引用的java类库等;混淆时:下载proguard,解压将lib目录里的proguard.jar文件和pro配置文件复制到java安装目录的bin下,如果设置了JAVA_HOME(父节点),也可以不用复制到该目录下,然后使用以下的命令来进行混淆,假设pro配置文件命名为myconfig.pro;最后进行验证:可以使用jd-gui反编译工具来验证一下混淆结果,把混淆前和混淆后的jar拖到jd-gui工具,然后再对比源代码,可以得到混淆后反编译得到的与源代码差别很大。
步骤S108,获取预先生成的密钥,通过所述密钥加密所述混淆代码,得到加密代码。
具体地,通过java提供的KeyGenerator提供对称密钥生成器的功能,支持各种算法,生成密钥。得到密钥之后,还要有一个加密编译代码的独立加密程序,通过该独立加密程序将密钥加密至混淆代码进行加密,得到加密代码。采用3DES加密算法对混淆代码进行加密,3DES也叫Triple DES,它是DES加密算法的一种模式,使用3条56位的密钥对混淆代码进行三次加密。简单来说,由于计算机的运算能力的增强,原版DES密码的密钥容易被暴力破解,3DES即是用来提供一种相对简单的方法,通过增加DES的密钥长度来避免类似的破解。
示例性地,参阅图3,所述步骤S108之后还包括步骤S109:
步骤S109A,生成所述混淆代码的密钥,并将所述密钥写入至所述配置文件中。
具体地,将密钥写入到配置文件中,类加载器进行加载时,会根据配置文件寻找密钥位置进行解密。
步骤S109B,将所述配置文件存储至所述加载容器中,以供所述类加载器在所述加载容器中,根据所述配置文件获取所述密钥对所述加密代码进行解密。
具体地,配置文件放置于加载容器中,当接收解密指令时,加载类加载器,先根据配置文件获取密钥,类加载器再利用密钥对加密代码进行解密。
步骤S110,根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则。
具体地,在解密前,为Java虚拟机,可以为web容器(加载容器)创建一个定制ClassLoader类(类加载器)的实例,然后显式地要求它装入另外加密代码的类型。这就强制JVM(Java Virtual Machine,Java虚拟机)把加密代码的型类关联到定制的ClassLoader。即,在JVM中定制类加载器,类加载器包括加密代码的所有类型。
示例性地,参阅图4,所述步骤S110进一步包括:
步骤S110A,生成用于解密所述加密代码对应的所述解密规则,其中,所述解密规则存储在区块链中。
具体地,在对加密代码进行加密时,设置对应的加密规则,用于当类加载器加载加密代码时,通过解密规则对加密代码进行解密。
需要强调的是,为进一步保证上述解密规则的私密和安全性,上述解密规则还可以存储于一区块链的节点中。
步骤S110B,在所述加载容器中,根据所述解密规则以及所述加密代码的类型定制类加载器。
具体地,将解密规则装载至加载容器中的类加载器中,该类加载器可以进行解密处理。得到解密指令时,启动解密应用,使用类加载器加载class文件到内存生成字节数组,此时的二进制字节是加密过的,根据加密规则编写解密方法,对该字节数组进行解密;最后将字节数组再转成class对象实例返回。
步骤S112,将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
具体地,将加密规则与加密代码进行封装得到jar包,完成对java源程序代码的运行环境加密处理,防止应用的无限部署。
示例性地,参阅图5,所述步骤S112之后还包括步骤S113:
步骤S113A,所述类加载器通过覆写loadClass方法继承所述加密代码的类型,以加载所述加密代码。
具体地,类加载器加载加密代码时,先获取密钥对加密代码进行解密,再通过类加载器ClassLoader加载并分析编译代码。
覆写loadClass方法加载编译代码的名称(即jar包的包名)的二进制类型,loadClass方法是ClassLoader类(即类加载器)自己实现的,该覆写loadClass方法中的逻辑就是双亲委派模式的实现。也可手动地将调用.loadClass,以便让ClassLoader去加载混淆代码的类。从loadClass实现也可以知道如果不想重新定义加载类的规则,也没有复杂的逻辑,只想在运行时加载自己指定的类(混淆代码的所有类型),那么可以直接使用代码进行加载,代码为:this.getClass().getClassLoder.loadClass("className"),这样就可以直接调用ClassLoader的loadClass方法获取到混淆代码中的class对象。
步骤S113B,所述类加载器根据配置文件获取所述密钥,并根据所述解密规则以及所述密钥解密所述加密代码,得到编译代码。
具体地,解密规则为对加密代码的字节码的解密,要改写JVM中web容器(加载容器)中的类加载器,通过自定义类加载器来加载加密后的class字节码,得到编译代码。
实施例二
请继续参阅图6,示出了本申请java代码的加壳系统实施例二的程序模块示意图。在本实施例中,java代码的加壳系统20可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请,并可实现上述java代码的加壳方法。本申请实施例所称的程序模块是指能够完成特定功能的一系列计算机可读指令,比程序本身更适合于描述java代码的加壳系统20在存储介质中的执行过程。以下描述将具体介绍本实施例各程序模块的功能:
接收模块200,用于接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码。
具体地,待处理源代码为java程序的源代码;待处理源代码的代码类型包括接口、实体类以及核心代码的类。
分层模块202,用于将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码。
具体地,预设规则为混淆规则,用户可自定义混淆规则,确定哪些源代码的类型可以进行混淆,将所述待处理源代码分成待混淆源代码和非混淆源代码,将核心代码进行抽离,针对接口、实体类保留源码输出。代码类型包括service的实现代码类型、接口类型、spi类型以及序列化类型,确定好哪些是核心代码,再通过预设规则确定哪些可以进行混淆。
示例性地,所述分层模块202进一步用于:
根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型。
具体地,引入proguard插件,配置混淆策略,得到待混淆代码。混淆规则将待混淆代码分为主要混淆源代码:将该主要混淆源代码对应类型的名称、属性、方法名都进行混淆;次要混淆源代码:对次要混淆源代码对应类型的名称不混淆,其而对应类型的属性、方法名选择性混淆;非混淆对象:非混淆源代码,混淆后可能出现异常,不进行混淆。混淆规则包括但不限于:所有的本地native方法不被混淆;某些类的子类不能被混淆,因为这些子类,有可能被外部调用;枚举类不能被混淆;序列化的类不被混淆;资源类及其方法,都不能被混淆;回调方法不能被混淆;保留类和成员不被混淆;内嵌类不能被混淆;处理反射相关的类和方法不能被混淆。
所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
具体地,代码分层的目的是为了支持二次开发,同时保护核心代码不被泄露。代码分层的具体实现方法:将service的实现代码剥离层单独模块进行混淆,而接口、spi、序列化等非核心代码仍然源码输出,方便二次开发集成。
编译模块204,用于将所述待混淆代码通过编译工具进行编译,得到编译代码。
示例性地,所述待混淆代码为java 源程序代码,存储方式为第一文件格式;所述编译代码为java字节代码,存储方式为第二文件格式;所述步骤S104进一步包括:
将所述第一文件格式的所述待混淆代码通过编译工具进行编译,得到所述第二文件格式的所述编译代码,以供所述类加载器进行加载,所述类加载器为字节码加载容器。
具体地,待混淆代码为java 的源程序代码,待混淆代码存储方式的第一文件格式为.java 文件,在经过java 编译器编译之后就被转换成java 字节代码,该存储方式的第二文件格式为.class 文件,即编译代码。类加载器进行加载编译代码时,获取.class 文件的字节码进行加载。
混淆模块206,用于根据混淆字典对所述编译代码进行字符替换,生成混淆代码。
具体地,此时的混淆代码文件里包括可以进行编译运行的混淆代码,首先将编译代码根据混淆字典进行字符替换,得到混淆代码,将混淆代码存入至混淆代码文件中,混淆代码文件为.class文件。proguard是一个纯java编写的混淆工具,有客户端跟jar包两种使用方式。可以将程序打包为jar,然后用工具进行混淆,也可以在maven项目对象模型中导入proguard的插件,得到混淆代码文件,对源代码进行混淆。
示例性地,通过预先配置的混淆字典对编译代码做字符替换,即使反编译出来,也是混淆的特殊字符。混淆之前必须配置混淆字典,可在编译代码进行编译时读取混淆字典,对编译代码中的核心代码字符进行替换,替换后的字符来自于混淆字典。通过对混淆字典的设计,增强混淆后的可读性难度。
示例性地,混淆前,首先定义配置文件:proguard使用后缀为.pro的文件作为配置文件,在这个文件里配置需要混淆的jar文件(包括有待混淆代码),混淆后输出的jar文件,混淆需要引用的java类库等;混淆时:下载proguard,解压将lib目录里的proguard.jar文件和pro配置文件复制到java安装目录的bin下,如果设置了JAVA_HOME(父节点),也可以不用复制到该目录下,然后使用以下的命令来进行混淆,假设pro配置文件命名为myconfig.pro;最后进行验证:可以使用jd-gui反编译工具来验证一下混淆结果,把混淆前和混淆后的jar拖到jd-gui工具,然后再对比源代码,可以得到混淆后反编译得到的与源代码差别很大。
加密模块208,用于获取预先生成的密钥,通过所述密钥加密所述混淆代码,得到加密代码。
具体地,通过java提供的KeyGenerator提供对称密钥生成器的功能,支持各种算法,生成密钥。得到密钥之后,还要有一个加密编译代码的独立加密程序,通过该独立加密程序将密钥加密至混淆代码进行加密,得到加密代码。采用3DES加密算法对混淆代码进行加密,3DES也叫Triple DES,它是DES加密算法的一种模式,使用3条56位的密钥对混淆代码进行三次加密。简单来说,由于计算机的运算能力的增强,原版DES密码的密钥容易被暴力破解,3DES即是用来提供一种相对简单的方法,通过增加DES的密钥长度来避免类似的破解。
定制模块210,用于根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则。
具体地,在解密前,为Java虚拟机,可以为web容器(加载容器)创建一个定制ClassLoader类(类加载器)的实例,然后显式地要求它装入另外加密代码的类型。这就强制JVM(Java Virtual Machine,Java虚拟机)把加密代码的型类关联到定制的ClassLoader。即,在JVM中定制类加载器,类加载器包括加密代码的所有类型。
示例性地,所述定制模块210进一步用于:
生成用于解密所述加密代码对应的所述解密规则,其中,所述解密规则存储在区块链中。
具体地,在对加密代码进行加密时,设置对应的加密规则,用于当类加载器加载加密代码时,通过解密规则对加密代码进行解密。
在所述加载容器中,根据所述解密规则以及所述加密代码的类型定制类加载器。
具体地,将解密规则装载至加载容器中的类加载器中,该类加载器可以进行解密处理。得到解密指令时,启动解密应用,使用类加载器加载class文件到内存生成字节数组,此时的二进制字节是加密过的,根据加密规则编写解密方法,对该字节数组进行解密;最后将字节数组再转成class对象实例返回。
生成模块212,用于将所述加密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
具体地,将加密规则与加密代码进行封装得到jar包,完成对java源程序代码的运行环境加密处理,防止应用的无限部署。
实施例三
参阅图7,是本申请实施例三之计算机设备的硬件架构示意图。本实施例中,所述计算机设备2是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。该计算机设备2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。如图7所示,所述计算机设备2至少包括,但不限于,可通过系统总线相互通信连接存储器21、处理器22、网络接口23、以及java代码的加壳系统20。其中:
本实施例中,存储器21至少包括一种类型的计算机可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器21可以是计算机设备2的内部存储单元,例如该计算机设备2的硬盘或内存。在另一些实施例中,存储器21也可以是计算机设备2的外部存储设备,例如该计算机设备2上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。当然,存储器21还可以既包括计算机设备2的内部存储单元也包括其外部存储设备。本实施例中,存储器21通常用于存储安装于计算机设备2的操作系统和各类应用软件,例如实施例二的java代码的加壳系统20的程序代码等。此外,存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制计算机设备2的总体操作。本实施例中,处理器22用于运行存储器21中存储的程序代码或者处理数据,例如运行java代码的加壳系统20,以实现实施例一的java代码的加壳方法。
所述网络接口23可包括无线网络接口或有线网络接口,该网络接口23通常用于在所述服务器2与其他电子装置之间建立通信连接。例如,所述网络接口23用于通过网络将所述服务器2与外部终端相连,在所述服务器2与外部终端之间的建立数据传输通道和通信连接等。所述网络可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi等无线或有线网络。
需要指出的是,图7仅示出了具有部件20-23的计算机设备2,但是应理解的是,并不要求实施所有示出的部件,可以替代的实施更多或者更少的部件。
在本实施例中,存储于存储器21中的所述java代码的加壳系统20还可以被分割为一个或者多个程序模块,所述一个或者多个程序模块被存储于存储器21中,并由一个或多个处理器(本实施例为处理器22)所执行,以完成本申请。
例如,图6示出了所述实现java代码的加壳系统20实施例二的程序模块示意图,该实施例中,所述java代码的加壳系统20可以被划分为接收模块200、分层模块202、混淆模块204、编译模块206、加密模块208、定制模块210以及生成模块212。其中,本申请所称的程序模块是指能够完成特定功能的一系列计算机可读指令,比程序更适合于描述所述java代码的加壳系统20在所述计算机设备2中的执行过程。所述程序模块200-212的具体功能在实施例二中已有详细描述,在此不再赘述。
实施例四
本实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机可读指令,被处理器执行时实现相应功能。本实施例的计算机可读存储介质用于存储计算机可读指令,被处理器执行时实现实施例一的java代码的加壳方法。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种java代码的加壳方法,其中,包括:
    接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码;
    将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码;
    将所述待混淆代码通过编译工具进行编译,得到编译代码;
    根据混淆字典对所述编译代码进行字符替换,生成混淆代码;
    获取预先生成的密钥,通过加密规则将所述密钥加密所述混淆代码,得到加密代码;
    根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则;
    将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
  2. 根据权利要求1所述的java代码的加壳方法,其中,所述将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码包括:
    根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型;
    将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
  3. 根据权利要求1所述的java代码的加壳方法,其中,所述待混淆代码为java 源程序代码,存储方式为第一文件格式;所述编译代码为java字节代码,存储方式为第二文件格式;
    所述将所述待混淆代码通过编译工具进行编译得到编译代码包括:
    将所述第一文件格式的所述待混淆代码通过编译工具进行编译,得到所述第二文件格式的所述编译代码,以供类加载器进行加载,所述类加载器为字节码类加载器。
  4. 根据权利要求2所述的java代码的加壳方法,其中,所述根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则包括:
    生成用于解密所述加密代码对应的所述解密规则,其中,所述解密规则存储在区块链中;
    在所述加载容器中,根据所述解密规则以及所述加密代码的类型定制类加载器。
  5. 根据权利要求4所述的java代码的加壳方法,其中,所述将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密之后,包括:
    所述类加载器通过覆写loadClass方法继承所述加密代码的类型,以加载所述加密代码;
    所述类加载器根据配置文件获取所述密钥,并根据所述解密规则以及所述密钥解密所述加密代码,得到编译代码。
  6. 根据权利要求5所述的java代码的加壳方法,其中,所述获取预先生成的密钥,通过所述密钥加密所述混淆代码,得到加密代码之前,包括:
    生成所述混淆代码的密钥,并将所述密钥写入至所述配置文件中;
    将所述配置文件存储至所述加载容器中,以供所述类加载器在所述加载容器中,根据所述配置文件获取所述密钥对所述加密代码进行解密。
  7. 一种java代码的加壳系统,其中,包括:
    接收模块,用于接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码;
    分层模块,用于将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码;
    编译模块,用于将所述待混淆代码通过编译工具进行编译,得到编译代码;
    混淆模块,用于根据混淆字典对所述编译代码进行字符替换,生成混淆代码;
    加密模块,用于获取预先生成的密钥,通过所述密钥加密所述混淆代码,得到加密代码;
    定制模块,用于根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则;
    生成模块,用于将所述加密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
  8. 根据权利要求7所述的java代码的加壳系统,其中,所述分层模块进一步用于:
    根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型;
    将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
  9. 一种计算机设备,其中,所述计算机设备包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时还执行以下步骤:
    接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码;
    将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码;
    将所述待混淆代码通过编译工具进行编译,得到编译代码;
    根据混淆字典对所述编译代码进行字符替换,生成混淆代码;
    获取预先生成的密钥,通过加密规则将所述密钥加密所述混淆代码,得到加密代码;
    根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则;
    将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
  10. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型;
    将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
  11. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    将第一文件格式的所述待混淆代码通过编译工具进行编译,得到第二文件格式的所述编译代码,以供类加载器进行加载,所述类加载器为字节码类加载器;其中,所述待混淆代码为java 源程序代码,存储方式为第一文件格式;所述编译代码为java字节代码,存储方式为第二文件格式。
  12. 根据权利要求11所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    生成用于解密所述加密代码对应的所述解密规则,其中,所述解密规则存储在区块链中;
    在所述加载容器中,根据所述解密规则以及所述加密代码的类型定制类加载器。
  13. 根据权利要求12所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    所述类加载器通过覆写loadClass方法继承所述加密代码的类型,以加载所述加密代码;
    所述类加载器根据配置文件获取所述密钥,并根据所述解密规则以及所述密钥解密所述加密代码,得到编译代码。
  14. 根据权利要求13所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    生成所述混淆代码的密钥,并将所述密钥写入至所述配置文件中;
    将所述配置文件存储至所述加载容器中,以供所述类加载器在所述加载容器中,根据所述配置文件获取所述密钥对所述加密代码进行解密。
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质内存储有计算机可读指令,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器执行以下步骤:
    接收待处理源代码,获取所述待处理源代码的代码类型,所述待处理源代码为java源程序代码;
    将所述待处理源代码根据所述代码类型与预设规则进行代码分层,得到待混淆代码;
    将所述待混淆代码通过编译工具进行编译,得到编译代码;
    根据混淆字典对所述编译代码进行字符替换,生成混淆代码;
    获取预先生成的密钥,通过加密规则将所述密钥加密所述混淆代码,得到加密代码;
    根据所述加密代码的类型在加载容器中定制类加载器,所述类加载器包括所述加密代码的解密规则;
    将所述解密规则与所述加密代码生成jar包,以完成对所述java源程序代码的加密。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器还执行以下步骤:
    根据预设规则将所述代码类型分为主要混淆源代码类型、次要混淆源代码类型以及非混淆源代码类型;
    将所述混淆源代码类型与次要混淆源代码类型对应的待处理源代码作为所述待混淆代码进行混淆处理,其中,所述非混淆源代码类型对应的待处理源代码不进行混淆处理。
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器还执行以下步骤:
    将第一文件格式的所述待混淆代码通过编译工具进行编译,得到第二文件格式的所述编译代码,以供类加载器进行加载,所述类加载器为字节码类加载器;其中,所述待混淆代码为java 源程序代码,存储方式为第一文件格式;所述编译代码为java字节代码,存储方式为第二文件格式。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器还执行以下步骤:
    生成用于解密所述加密代码对应的所述解密规则,其中,所述解密规则存储在区块链中;
    在所述加载容器中,根据所述解密规则以及所述加密代码的类型定制类加载器。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器还执行以下步骤:
    所述类加载器通过覆写loadClass方法继承所述加密代码的类型,以加载所述加密代码;
    所述类加载器根据配置文件获取所述密钥,并根据所述解密规则以及所述密钥解密所述加密代码,得到编译代码。
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述计算机可读指令可被至少一个处理器所执行,以使所述至少一个处理器还执行以下步骤:
    生成所述混淆代码的密钥,并将所述密钥写入至所述配置文件中;
    将所述配置文件存储至所述加载容器中,以供所述类加载器在所述加载容器中,根据所述配置文件获取所述密钥对所述加密代码进行解密。
PCT/CN2020/111626 2020-04-30 2020-08-27 java代码的加壳方法与系统 WO2021217980A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010360272.8A CN111552931A (zh) 2020-04-30 2020-04-30 java代码的加壳方法与系统
CN202010360272.8 2020-04-30

Publications (1)

Publication Number Publication Date
WO2021217980A1 true WO2021217980A1 (zh) 2021-11-04

Family

ID=71999361

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111626 WO2021217980A1 (zh) 2020-04-30 2020-08-27 java代码的加壳方法与系统

Country Status (2)

Country Link
CN (1) CN111552931A (zh)
WO (1) WO2021217980A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114444028A (zh) * 2022-01-05 2022-05-06 苏州浪潮智能科技有限公司 提升代码安全性的方法、装置、计算机设备和存储介质
CN114722359A (zh) * 2022-04-08 2022-07-08 北京航天长城卫星导航科技有限公司 一种基于自定义类加载器的Java源码保护方法
CN117574334A (zh) * 2023-08-17 2024-02-20 广东工业大学 一种结合md5与序列到序列模型的代码混淆方法及系统
WO2024207844A1 (zh) * 2023-12-12 2024-10-10 天翼云科技有限公司 一种jar包防反编译方法

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552931A (zh) * 2020-04-30 2020-08-18 平安科技(深圳)有限公司 java代码的加壳方法与系统
CN113094665B (zh) * 2021-04-09 2022-08-05 每日互动股份有限公司 一种防止java程序被反编译的系统
CN113238762B (zh) * 2021-05-10 2024-07-02 深圳前海微众银行股份有限公司 java应用远程部署方法、装置及设备
CN113282294B (zh) * 2021-05-19 2024-07-05 武汉极意网络科技有限公司 基于安卓平台Java字符串混淆的方法和装置
CN113221077B (zh) * 2021-05-31 2023-11-14 平安科技(深圳)有限公司 基于spring容器的class文件加密方法及设备
CN113411384B (zh) * 2021-06-10 2022-09-27 华中科技大学 针对物联网数据安全共享过程中隐私保护的系统及方法
CN113656765B (zh) * 2021-08-17 2024-07-05 平安国际智慧城市科技股份有限公司 java程序安全处理方法、装置、计算机设备及存储介质
CN113836498A (zh) * 2021-09-01 2021-12-24 浙江岩华文化科技有限公司 网页源代码混淆方法、装置、电子装置和存储介质
CN113591041B (zh) * 2021-09-28 2021-12-31 环球数科集团有限公司 一种防止代码注入或源码反编译的分布式编码系统
CN114035797A (zh) * 2021-10-26 2022-02-11 乐视新生代(北京)文化传媒有限公司 前端代码加密方法、运行方法、装置、设备和存储介质
CN114090965B (zh) * 2021-11-22 2024-05-17 全景智联(武汉)科技有限公司 java代码混淆方法、系统、计算机设备及存储介质
CN114282181A (zh) * 2021-12-01 2022-04-05 北京达佳互联信息技术有限公司 代码执行方法、装置、服务器及存储介质
CN114254373B (zh) * 2022-03-01 2022-07-08 中国电力科学研究院有限公司 一种加密传输方法、装置和系统
CN115473702A (zh) * 2022-08-23 2022-12-13 广西电网有限责任公司电力科学研究院 一种基于在线交互式web动态防御的内容混淆方法
CN115310115B (zh) * 2022-10-11 2023-01-24 东方合智数据科技(广东)有限责任公司 私有化部署加密方法、装置、设备及存储介质
CN118152866B (zh) * 2024-05-13 2024-07-23 国网江西省电力有限公司超高压分公司 基于多源数据融合的变压器故障诊断方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107430650A (zh) * 2015-03-02 2017-12-01 因温特奥股份公司 保护计算机程序以抵御逆向工程
CN108664773A (zh) * 2018-04-26 2018-10-16 北京三快在线科技有限公司 Java源代码的保护方法及装置
CN111552931A (zh) * 2020-04-30 2020-08-18 平安科技(深圳)有限公司 java代码的加壳方法与系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107430650A (zh) * 2015-03-02 2017-12-01 因温特奥股份公司 保护计算机程序以抵御逆向工程
CN108664773A (zh) * 2018-04-26 2018-10-16 北京三快在线科技有限公司 Java源代码的保护方法及装置
CN111552931A (zh) * 2020-04-30 2020-08-18 平安科技(深圳)有限公司 java代码的加壳方法与系统

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114444028A (zh) * 2022-01-05 2022-05-06 苏州浪潮智能科技有限公司 提升代码安全性的方法、装置、计算机设备和存储介质
CN114444028B (zh) * 2022-01-05 2024-01-12 苏州浪潮智能科技有限公司 提升代码安全性的方法、装置、计算机设备和存储介质
CN114722359A (zh) * 2022-04-08 2022-07-08 北京航天长城卫星导航科技有限公司 一种基于自定义类加载器的Java源码保护方法
CN114722359B (zh) * 2022-04-08 2024-05-10 北京航天长城卫星导航科技有限公司 一种基于自定义类加载器的Java源码保护方法
CN117574334A (zh) * 2023-08-17 2024-02-20 广东工业大学 一种结合md5与序列到序列模型的代码混淆方法及系统
CN117574334B (zh) * 2023-08-17 2024-05-28 广东工业大学 一种结合md5与序列到序列模型的代码混淆方法及系统
WO2024207844A1 (zh) * 2023-12-12 2024-10-10 天翼云科技有限公司 一种jar包防反编译方法

Also Published As

Publication number Publication date
CN111552931A (zh) 2020-08-18

Similar Documents

Publication Publication Date Title
WO2021217980A1 (zh) java代码的加壳方法与系统
WO2021218331A1 (zh) 离线软件授权方法、装置、设备及存储介质
US9443064B2 (en) Protecting method and system of java source code
US9396313B2 (en) Apparatus for tamper protection of application code and method thereof
CN109784007B (zh) 一种字节码加密的方法、字节码解密的方法及终端
CN111177749B (zh) 加密源代码文件处理方法、装置、计算机设备和存储介质
CN110826031B (zh) 加密方法、装置、计算机设备及存储介质
US7970133B2 (en) System and method for secure and flexible key schedule generation
CN109598107B (zh) 一种基于应用安装包文件的代码转换方法及装置
CN111159662A (zh) 一种数据的处理方法和装置
CN112115429B (zh) 一种Java类加密、解密方法及计算机可读存储介质
CN108399319B (zh) 源代码保护方法、应用服务器及计算机可读存储介质
KR102275827B1 (ko) 기밀 실행 소프트웨어 배포 방법 및 장치
EP3264265A1 (en) Application protection method, server and terminal
CN111159658B (zh) 字节码处理方法、系统、装置、计算机设备和存储介质
CN110309630B (zh) 一种Java代码加密方法及装置
US20150113506A1 (en) Method and system for adaptive loading of application
CN114547558A (zh) 授权方法、授权控制方法及装置、设备和介质
CN113032741B (zh) 类文件加密方法、类文件运行方法、装置、设备及介质
CN104951705A (zh) 一种基于操作系统接口重写的安卓应用数据加密封装方法
CN116235174A (zh) 用于执行加密算法的设备和方法
JP2008040853A (ja) アプリケーション実行方法およびアプリケーション実行装置
KR20180028666A (ko) 역공학 방지 방법 및 장치
Lim et al. Protecting Android Applications with Multiple DEX Files Against Static Reverse Engineering Attacks.
CN111460464B (zh) 数据加解密方法、装置、电子设备及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20933900

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 21/12/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20933900

Country of ref document: EP

Kind code of ref document: A1