CN101944042A - Operation method of Java program and electronic terminal - Google Patents

Operation method of Java program and electronic terminal Download PDF

Info

Publication number
CN101944042A
CN101944042A CN 201010270548 CN201010270548A CN101944042A CN 101944042 A CN101944042 A CN 101944042A CN 201010270548 CN201010270548 CN 201010270548 CN 201010270548 A CN201010270548 A CN 201010270548A CN 101944042 A CN101944042 A CN 101944042A
Authority
CN
China
Prior art keywords
virtual machine
java virtual
java
dynamic link
link library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 201010270548
Other languages
Chinese (zh)
Inventor
桂艳军
王远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN BYTTER TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN BYTTER TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN BYTTER TECHNOLOGY Co Ltd filed Critical SHENZHEN BYTTER TECHNOLOGY Co Ltd
Priority to CN 201010270548 priority Critical patent/CN101944042A/en
Publication of CN101944042A publication Critical patent/CN101944042A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses an operation method of a Java program, which comprises the following steps of: starting a current Java virtual machine, and loading a Java virtual machine tool interface-based dynamic link base file; identifying whether the current Java virtual machine contains preset identification information according to the dynamic link base file; when an identification result is yes, normally starting the Java virtual machine to run the Java program; and when the identification result is no, exiting from a startup program. Correspondingly, the invention also discloses an electronic terminal. When the operation method of the Java program and the electronic terminal are used, the security of Java byte codes is guaranteed in a binary system grade and an attacker cannot acquire the byte codes, so that a source code of business software is radically protected against stealing and the core algorithm and trade secrets of the business software are more securely protected; and when the technical scheme of the invention is adopted, the characteristics of any Java do not lose, the protection of cross-platform Java byte codes is realized, deployment is simple and cost is low.

Description

A kind of operation method of java applet and electric terminal
Technical field
The present invention relates to electronic communication field, relate in particular to a kind of operation method and electric terminal of java applet.
Background technology
Along with popularizing and application of Java language, increasing software uses Java to realize.Because the dynamic and the dirigibility of Java language, the protection of its source code is become very difficult.
In the prior art; can at an easy rate source code be extracted from its binary class file by means of decompiling; therefore; any one malicious user can utilize the decompiling instrument; as Jad instruments such as (application development joint meetings) software is carried out reverse-engineering and attack, can crack and authorize the program segment of protection in the business software and then arbitrarily distribute unwarranted copy.And for veteran assailant, even directly do not revise binary bytecode to attack with decompiling, obtain source code.
How to protect the intellecture property of software better, the source code of protection software is not revealed by attack and is become a problem of needing solution badly.
Summary of the invention
Embodiment of the invention technical matters to be solved is, a kind of operation method and electric terminal of java applet is provided.Guarantee the safety of Java bytecode to have realized protecting better software kernels algorithm and trade secret not to be stolen from the scale-of-two rank.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of operation method of java applet, comprising:
Start current Java Virtual Machine (JavaVM, Java Virtual Machine), load dynamic link library file based on the Java Virtual Machine tool interface;
Discern current Java Virtual Machine according to described dynamic link library file and whether contain default identification information;
When recognition result when being, normally start described Java Virtual Machine operation java applet; When recognition result for not the time, withdraw from start-up routine.
Wherein, also comprise the initialization Java Virtual Machine before the step of the current Java Virtual Machine of described startup;
The step of described initialization Java Virtual Machine comprises the Java starter that startup is default, and the identification information of Java Virtual Machine is set.
Wherein, also comprise before the step of the current Java Virtual Machine of described startup:
Based on Advanced Encryption Standard AES (AES, Advanced Encryption Standard) cryptographic algorithm, the class file of java applet is encrypted.
Wherein, the step of the described Java Virtual Machine operation of described normal startup java applet comprises:
Described Java Virtual Machine detects described dynamic link library file and whether contains default identification characteristics information;
When the test results is yes, handle the class file according to described dynamic link library file; When testing result for not the time, program out of service.
Wherein, the dynamic link library file that contains default identification characteristics information is provided with the decruption key that described class file is decrypted;
The step that described Java Virtual Machine is handled the class file according to described dynamic link library file comprises:
Described Java Virtual Machine calls aes algorithm described class file is decrypted according to the decruption key of described dynamic link library file, and according to the execution command of the class file after the deciphering.
Accordingly, the embodiment of the invention also provides a kind of electric terminal, comprising:
Java Virtual Machine starts module, is used to start current Java Virtual Machine;
Load-on module is used to load the dynamic link library file based on the Java Virtual Machine tool interface;
The sign identification module is used for discerning current Java Virtual Machine according to described dynamic link library file and whether contains default identification information;
Recognition processing module, be used for when the recognition result of described sign identification module when being, normally start described Java Virtual Machine operation java applet; When the recognition result of described sign identification module for not the time, withdraw from start-up routine.
Wherein, described electric terminal also comprises:
The virtual machine initialization module is used for the initialization Java Virtual Machine;
Described virtual machine initialization module starts the default Java starter of electric terminal, and the identification information of Java Virtual Machine is set.
Wherein, described electric terminal also comprises:
Encrypting module is used for the cryptographic algorithm based on Advanced Encryption Standard AES, and the class file of java applet is encrypted.
Wherein, described recognition processing module comprises:
The detection trigger unit, be used for when the recognition result of described sign identification module when being, trigger described Java Virtual Machine and detect described dynamic link library file and whether contain default identification characteristics information;
When described testing result when being, described Java Virtual Machine is handled the class file according to described dynamic link library file; When described testing result for not the time, described Java Virtual Machine program out of service.
Wherein, the dynamic link library file that contains default identification characteristics information is provided with the decruption key that described class file is decrypted;
When described testing result when being, described Java Virtual Machine calls aes algorithm described class file is decrypted according to the decruption key of described dynamic link library file, and according to the execution command of the class file after the deciphering.
Implement the embodiment of the invention, have following beneficial effect:
Whether contain default identification information by discerning current Java Virtual Machine, when identifying current Java Virtual Machine and contain default identification information, just normally start described Java Virtual Machine operation java applet, and this Java Virtual Machine also detects described dynamic link library file and whether contains default identification characteristics information, when detecting this dynamic link library file and contain default identification characteristics information, just handle the class file according to described dynamic link library file, otherwise program out of service, realized guaranteeing the safety of Java bytecode from the scale-of-two rank, allow the assailant can't obtain bytecode, thereby fundamentally protect the source code of business software not to be stolen, safer protection the core algorithm and the trade secret of business software; Adopt technical scheme of the present invention can not lose the characteristic of any Java, can realize the protection of cross-platform Java bytecode; Adopt the runtime to load towards the plug-in mode of tangent plane programming (AOP, Aspect Oriented Programming), to existing Java software systems without any intrusion effect; Owing to be controlled on the Java Virtual Machine rank, all be general to java platform standard version (JavaSE) with java platform, enterprise edition (JavaEE) environment, and dispose simply that cost is low.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the first embodiment schematic flow sheet of the operation method of java applet of the present invention;
Fig. 2 is the second embodiment schematic flow sheet of the operation method of java applet of the present invention;
Fig. 3 is the structural representation of first embodiment of electric terminal of the present invention;
Fig. 4 is the structural representation of second embodiment of electric terminal of the present invention;
Fig. 5 is the structural representation of the 3rd embodiment of electric terminal of the present invention;
Fig. 6 is the structural representation of the 4th embodiment of electric terminal of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The first embodiment schematic flow sheet of the operation method of java applet of the present invention as shown in Figure 1 comprises:
Step S101: start current Java Virtual Machine, load dynamic link library file based on the Java Virtual Machine tool interface;
Particularly, the user need move java applet, send the instruction of operation java applet to electric terminal, after electric terminal receives this instruction, start current Java Virtual Machine, and loading is based on the dynamic link library file of Java Virtual Machine tool interface (JVMTI, Java Virtual Machine Tool Interface); This Java Virtual Machine can be the Java Virtual Machine of user installation, the Java Virtual Machine that also can electric terminal itself carries; This dynamic link library file can be the DLL assembly (as Agent.dll) based on the windows platform, also can be for based on SO assembly of Linux platform or the like.
Step S102: discern current Java Virtual Machine according to described dynamic link library file and whether contain default identification information;
Particularly, when recognition result when being, execution in step S103 then; When recognition result for not the time, then withdraw from start-up routine, process ends.
Step S103: normally start described Java Virtual Machine operation java applet.
Need to prove, the embodiment of the invention also comprises, after the technician writes the java applet that finishes, initialization Java Virtual Machine at first, set in advance the identification information of Java Virtual Machine, particularly: the technician customizes the Java starter, adopt the C language to revise the Java.c source file, with Java starter by this customization of startup, in the process of initialization Java Virtual Machine first, set in advance identification information to Java Virtual Machine, enumerate an initialization Java Virtual Machine below, the example of the identification information of Java Virtual Machine be set, but be not limited to following form:
/*
*Initializes?the?Java?Virtual?Machine.Also?frees?options?array?when
*finished.
*/
static?jboolean?InitializeJVM(JavaVM**pvm,JNIEnv**penv,
InvocationFunctions*ifn){
JavaVMInitArgs?args;
jint?r;
memset(&args,0,sizeof(args));
args.version=JNI_VERSION_1_2;
args.nOptions=numOptions;
args.options=options;
args.ignoreUnrecognized=JNI_FALSE;
if(_launcher_debug){
int?i=0;
printf(″JavaVM?args:\n ″);
printf(″version?0x%08lx,″,(long)args.version);
printf(″ignoreUnrecognized?is%s,″,
args.ignoreUnrecognized?″JNI_TRUE″:″JNI_FALSE″);
printf(″nOptions?is%ld\n″,(long)args.nOptions);
for(i=0;i<numOptions;i++)
printf(″option[%2d]=′%s′\n″,i,args.options[i].optionString);
}
// identification information of JavaVM is set, this identification information includes but not limited to that one is the sequence number of " 123456 " or the like:
pvm->reserved0=″123456″;
r=ifn->CreateJavaVM(pvm,(void**)penv,&args);
JLI_MemFree(options);
return?r==JNI_OK;
}
So in step S102, electric terminal is discerned current Java Virtual Machine according to described dynamic link library file and whether is contained default identification information (123456 sequence numbers), do not contain this sequence number if identify current Java Virtual Machine, show that current Java Virtual Machine does not have right operation java applet, be illegal operation, withdraw from start-up routine, process ends; If identifying current Java Virtual Machine contains this sequence number, show that current Java Virtual Machine is the Java Virtual Machine of subscriber authorisation, have the right to move java applet, then execution in step S103 normally starts described Java Virtual Machine operation java applet.Particularly, the technician customizes described dynamic link library file (as Agent.dll) in advance, the dll file that adopts the C language to write by the JVMTI standard, whether contain default identification information to discern current Java Virtual Machine, enumerate the current Java Virtual Machine of dll file identification that a basis writes by the JVMTI standard below and whether contain the example of default identification information, but be not limited to following form:
/*Agent_OnLoad:This?is?called?immediately?after?the?shared?library?is
* loaded.This?is?the?first?code?executed.
*/
JNIEXPORT?jint?JNICALL
Agent_OnLoad(JavaVM*vm,char*options,void*reserved){
// detect the sequence number of JavaVM, if inconsistently just directly return
if(strcmp((*vm)->reserved0,″123456″)!=0)
{
return?JNI_OK;
}
If // consistent, then the described Java Virtual Machine of the normal startup of execution in step S103 moves java applet
In the prior art, because the always identical instruction that presents of Java Virtual Machine on any platform, and the order set of Java just has been doomed the feasibility and the easiness of decompiling.The source code of current popular is attacked and the bytecode attack technology, and these attack meanses all have a common prerequisite: at first can get access to bytecode by Java Virtual Machine, decompile into then that source code is attacked or the directtissima bytecode.Adopt technical scheme provided by the invention; whether has default identification information by detecting Java Virtual Machine; allow the assailant can't touch bytecode; thereby destroyed the prerequisite that the assailant obtains bytecode; fundamentally solve the safe weak point that can obtain and attack bytecode in the prior art by Java Virtual Machine, reach the purpose of protection core java applet code.
Further, the embodiment of the invention also comprises: after the technician writes the java applet that finishes, before the execution in step S101, will the class file of java applet be encrypted based on Advanced Encryption Standard AES cryptographic algorithm, obtain the ciphertext of class file.
The second embodiment schematic flow sheet below in conjunction with the operation method of the java applet of the present invention shown in Fig. 2 comprises:
Step S201: start current Java Virtual Machine, load dynamic link library file based on the Java Virtual Machine tool interface;
Particularly, the step S101 as above-mentioned first embodiment repeats no more here.
Step S202: discern current Java Virtual Machine according to described dynamic link library file and whether contain default identification information;
Particularly, as the step S202 of above-mentioned first embodiment,, when recognition result when being, execution in step S203 then; When recognition result for not the time, then withdraw from start-up routine, process ends.
Step S203: described Java Virtual Machine detects described dynamic link library file and whether contains default identification characteristics information;
Particularly, enumerate Java Virtual Machine below and detect the example whether described dynamic link library file contains default identification characteristics information, but be not limited to following example code:
/*
*JVM?would?like?to?know?if?it′s?created?by?a?standard?Sun?launcher,or?by
*user?native?application,the?following?property?indicates?the?former.
*/
void?SetJavaLauncherProp(){
AddOption(″-Dsun.java.launcher=SUN_STANDARD″,NULL);
//TODO enforced opening JVMTI agency
//-agentpath:E:/jdbcTracker.dll=bootJar=E:/jdbcTracker.jar
//AddOption(″-agentpath:E:/jdbcTracker.dll=bootJar=E:/jdbcTracker.jar″,NULL
);
AddOption(″-agentlib:Agent″,NULL);
}
As, default dynamic link library file is Agent.dll, in the start-up code of Java Virtual Machine (JVM), bind the Agent that we preset so and followed startup, title (being equivalent to identification characteristics information) by Agent has specified us will load Agent.dll in start-up course, if successfully load Agent.dll, the testing result that is step S203 is for being, if successfully do not load Agent.dll, promptly the testing result of step S203 is for denying.
Particularly, when the test results is yes, execution in step S204 then; When testing result for not the time, program out of service; The assailant can use the JVMTI technology in the prior art, by monitoring the Class bytecode after the ClassFileLoadHook incident is truncated to deciphering; The technician sets in advance dynamic link library file and contains identification characteristics information (as condition code information etc.) in the embodiment of the invention; have only when Java Virtual Machine detects this dynamic link library file and contain this identification characteristics information and just carry out follow-up operation and handle; show when Java Virtual Machine detects dynamic link library file that the assailant uses and do not contain default identification characteristics information; working procedure then; thereby stopped any plug-in code that the assailant injects, can protect the java applet code better.
Step S204: handle the class file according to described dynamic link library file.
Particularly, the dynamic link library file that contains default identification characteristics information is provided with the decruption key that described class file is decrypted, described Java Virtual Machine is according to the decruption key of described dynamic link library file, call aes algorithm described class file is decrypted, and according to the execution command of the class file after the deciphering.Therefore, the assailant is if the dynamic link library file that contains identification characteristics information that does not have the technician to preset can't be decrypted described class file.As enumerate below after containing default identification information according to the current Java Virtual Machine of dll file identification write by the JVMTI standard, decruption key according to described dynamic link library file, call aes algorithm described class file be decrypted example,, but be not limited to following form:
/*Agent_OnLoad:This?is?called?immediately?after?the?shared?library?is
* loaded.This?is?the?first?code?executed.
*/
JNIEXPORT?jint?JNICALL
Agent_OnLoad(JavaVM*vm,char*options,void*reserved){
// detect the sequence number of JavaVM, if inconsistently just directly return
if(strcmp((*vm)->reserved0,″123456″)!=0)
{
return?JNI_OK;
}
static?GlobalAgentData?data;
jvmtiEnv*jvmti;
jvmtiError?error;
jint?res;
TraceFlavor?flavor;
jvmtiCapabilities?capabilities;
jvmtiEventCallbacks?callbacks;
static?Trace?empty;
// internal memory initialization
(void)memset((void*)&data,0,sizeof(data));
gdata=&data;
/ * obtain JVMTI environment */
res=(*vm)->GetEnv(vm,(void**)&jvmti,JVMTI_VERSION_1);
if(res!=JNI_OK){
fatal_error(″ERROR:Unable?to?access?JVMTI?Version?1(0x%x),″
″is?your?JDK?a?5.0or?newer?version?″
″JNIEnv′s?GetEnv()returned%d\n″,JVMTI_VERSION_1,res);
}
// ... call standard A ES algorithm decrypting process to omit //
return?JNI_OK;
}
Need to prove, carry out the deciphering of class file in the embodiment of the invention with Agent.dll, this deciphering has only influenced the class file of those encrypted protections, also can move in the Java Virtual Machine environment for the class file of those encryptions useless in the same old way; Be that protection environment provided by the invention is not special-purpose privately environment; for some programs of in java platform, enterprise edition (JavaEE) server, moving; often need a Java Virtual Machine to start; and the embodiment of the invention adopts the runtime towards tangent plane programming (AOP; Aspect Oriented Programming) plug-in mode is loaded; add that Agent.dll just can handle the class file of encryption; we remove the words of Agent.dll; also do not weaken and handle the common ability that the class that does not encrypt, therefore existing Java software systems are without any intrusion effect.
Pass through the foregoing description, electric terminal is discerned current Java Virtual Machine and whether is contained default identification information, when identifying current Java Virtual Machine and contain default identification information, just normally start described Java Virtual Machine operation java applet, and this Java Virtual Machine also detects described dynamic link library file and whether contains default identification characteristics information, when detecting this dynamic link library file and contain default identification characteristics information, just handle the class file according to described dynamic link library file, otherwise program out of service, realized guaranteeing the safety of Java bytecode from the scale-of-two rank, allow the assailant can't obtain bytecode, thereby fundamentally protect the source code of business software not to be stolen, safer protection the core algorithm and the trade secret of business software; Adopt technical scheme of the present invention can not lose the characteristic of any Java, can realize the protection of cross-platform Java bytecode; Adopt the runtime to load towards the plug-in mode of tangent plane programming (AOP, Aspect Oriented Programming), to existing Java software systems without any intrusion effect; Owing to be controlled on the Java Virtual Machine rank, all be general to java platform standard version (JavaSE) with java platform, enterprise edition (JavaEE) environment, and dispose simply that cost is low.
Describe the operation method of the java applet of the embodiment of the invention above in detail, below accordingly, describe the electric terminal of the embodiment of the invention in detail.
The structural representation of first embodiment of electric terminal of the present invention as shown in Figure 3, electric terminal 3 comprise that Java Virtual Machine starts module 31, load-on module 32, sign identification module 33 and recognition processing module 34, wherein
Java Virtual Machine starts module 31 and is used to start current Java Virtual Machine;
Load-on module 32 is used to load the dynamic link library file based on the Java Virtual Machine tool interface;
Particularly, the user need move java applet, send the instruction of operation java applet to electric terminal 3, after electric terminal 3 receives this instruction, Java Virtual Machine starts module 31 and starts current Java Virtual Machine, the dynamic link library file that load-on module 32 loads based on Java Virtual Machine tool interface (JVMTI, Java Virtual Machine Tool Interface); This Java Virtual Machine can be the Java Virtual Machine of user installation, the Java Virtual Machine that also can electric terminal itself carries; This dynamic link library file can be the DLL assembly (as Agent.dll) based on the windows platform, also can be for based on SO assembly of Linux platform or the like.
Sign identification module 33 is used for discerning current Java Virtual Machine according to described dynamic link library file and whether contains default identification information;
Recognition processing module 34 is used for recognition result when sign identification module 33 when being, normally starts described Java Virtual Machine and moves java applet; When the recognition result of sign identification module 33 for not the time, withdraw from start-up routine.
Further, the structural representation of second embodiment of electric terminal of the present invention as shown in Figure 4, electric terminal 3 comprises that Java Virtual Machine starts outside module 31, load-on module 32, sign identification module 33 and the recognition processing module 34, also comprise virtual machine initialization module 35, virtual machine initialization module 35 is used for the initialization Java Virtual Machine; Particularly,
After the technician writes the java applet that finishes, at first by virtual machine initialization module 35 initialization Java Virtual Machines, set in advance the identification information of Java Virtual Machine, particularly: the technician customizes a Java starter, adopt the C language to revise the Java.c source file, virtual machine initialization module 35 is by starting the Java starter of this customization, set in advance identification information to Java Virtual Machine in the process of initialization Java Virtual Machine first, subsequent identification identification module 33 will be discerned current Java Virtual Machine according to described dynamic link library file and whether contain the default identification information of virtual machine initialization module 35 so.
In the prior art, because the always identical instruction that presents of Java Virtual Machine on any platform, and the order set of Java just has been doomed the feasibility and the easiness of decompiling.The source code of current popular is attacked and the bytecode attack technology, and these attack meanses all have a common prerequisite: at first can get access to bytecode by Java Virtual Machine, decompile into then that source code is attacked or the directtissima bytecode.Adopt technical scheme provided by the invention; whether has default identification information by detecting Java Virtual Machine; allow the assailant can't touch bytecode; thereby destroyed the prerequisite that the assailant obtains bytecode; fundamentally solve the safe weak point that can obtain and attack bytecode in the prior art by Java Virtual Machine, reach the purpose of protection core java applet code.
Again further, the structural representation of the 3rd embodiment of electric terminal of the present invention as shown in Figure 5, electric terminal 3 comprises that Java Virtual Machine starts outside module 31, load-on module 32, sign identification module 33, recognition processing module 34 and the virtual machine initialization module 35, also comprise encrypting module 36, be used for cryptographic algorithm, the class file of java applet is encrypted based on AES.Particularly, after the technician write the java applet that finishes, Java Virtual Machine started module 31 and starts before the current Java Virtual Machine, will the class file of java applet be encrypted based on Advanced Encryption Standard AES cryptographic algorithm, obtains the ciphertext of class file.
Again further, the structural representation of the 4th embodiment of electric terminal of the present invention as shown in Figure 6, recognition processing module 34 in the electric terminal 3 also comprises detection trigger unit 341, be used for recognition result when sign identification module 33 when being, triggering described Java Virtual Machine detects described dynamic link library file and whether contains default identification characteristics information, when described testing result when being, described Java Virtual Machine is handled the class file according to described dynamic link library file; When described testing result for not the time, described Java Virtual Machine program out of service.The assailant can use the JVMTI technology in the prior art, by monitoring the Class bytecode after the ClassFileLoadHook incident is truncated to deciphering; The technician sets in advance dynamic link library file and contains identification characteristics information (as condition code information etc.) in the embodiment of the invention; have only when Java Virtual Machine detects this dynamic link library file and contain this identification characteristics information and just carry out follow-up operation and handle; show when Java Virtual Machine detects dynamic link library file that the assailant uses and do not contain default identification characteristics information; working procedure then; thereby stopped any plug-in code that the assailant injects, can protect the java applet code better.
Need to prove that the dynamic link library file that contains default identification characteristics information is provided with the decruption key that described class file is decrypted; When the testing result of described Java Virtual Machine when being, described Java Virtual Machine calls aes algorithm described class file is decrypted according to the decruption key of described dynamic link library file, and according to the execution command of the class file after the deciphering.Therefore, the assailant is if the dynamic link library file that contains identification characteristics information that does not have the technician to preset can't be decrypted described class file.
In sum, whether contain default identification information by discerning current Java Virtual Machine, when identifying current Java Virtual Machine and contain default identification information, just normally start described Java Virtual Machine operation java applet, and this Java Virtual Machine also detects described dynamic link library file and whether contains default identification characteristics information, when detecting this dynamic link library file and contain default identification characteristics information, just handle the class file according to described dynamic link library file, otherwise program out of service, realized guaranteeing the safety of Java bytecode from the scale-of-two rank, allow the assailant can't obtain bytecode, thereby fundamentally protect the source code of business software not to be stolen, safer protection the core algorithm and the trade secret of business software; Adopt technical scheme of the present invention can not lose the characteristic of any Java, can realize the protection of cross-platform Java bytecode; Adopt the runtime to load towards the plug-in mode of tangent plane programming (AOP, Aspect Oriented Programming), to existing Java software systems without any intrusion effect; Owing to be controlled on the Java Virtual Machine rank, all be general to java platform standard version (JavaSE) with java platform, enterprise edition (JavaEE) environment, and dispose simply that cost is low.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosed is a kind of preferred embodiment of the present invention only, can not limit the present invention's interest field certainly with this, and therefore the equivalent variations of doing according to claim of the present invention still belongs to the scope that the present invention is contained.

Claims (10)

1. the operation method of a java applet is characterized in that, comprising:
Start current Java Virtual Machine, load dynamic link library file based on the Java Virtual Machine tool interface;
Discern current Java Virtual Machine according to described dynamic link library file and whether contain default identification information;
When recognition result when being, normally start described Java Virtual Machine operation java applet; When recognition result for not the time, withdraw from start-up routine.
2. the method for claim 1 is characterized in that, also comprises the initialization Java Virtual Machine before the step of the current Java Virtual Machine of described startup;
The step of described initialization Java Virtual Machine comprises the Java starter that startup is default, and the identification information of Java Virtual Machine is set.
3. the method for claim 1 is characterized in that, also comprises before the step of the current Java Virtual Machine of described startup:
Based on Advanced Encryption Standard AES cryptographic algorithm, the class file of java applet is encrypted.
4. as claim 1,2 or 3 described methods, it is characterized in that the step of the described Java Virtual Machine operation of described normal startup java applet comprises:
Described Java Virtual Machine detects described dynamic link library file and whether contains default identification characteristics information;
When the test results is yes, handle the class file according to described dynamic link library file; When testing result for not the time, program out of service.
5. method as claimed in claim 4 is characterized in that, the dynamic link library file that contains default identification characteristics information is provided with the decruption key that described class file is decrypted;
The step that described Java Virtual Machine is handled the class file according to described dynamic link library file comprises:
Described Java Virtual Machine calls aes algorithm described class file is decrypted according to the decruption key of described dynamic link library file, and according to the execution command of the class file after the deciphering.
6. an electric terminal is characterized in that, comprising:
Java Virtual Machine starts module, is used to start current Java Virtual Machine;
Load-on module is used to load the dynamic link library file based on the Java Virtual Machine tool interface;
The sign identification module is used for discerning current Java Virtual Machine according to described dynamic link library file and whether contains default identification information;
Recognition processing module, be used for when the recognition result of described sign identification module when being, normally start described Java Virtual Machine operation java applet; When the recognition result of described sign identification module for not the time, withdraw from start-up routine.
7. electric terminal as claimed in claim 6 is characterized in that, also comprises:
The virtual machine initialization module is used for the initialization Java Virtual Machine;
Described virtual machine initialization module starts the default Java starter of electric terminal, and the identification information of Java Virtual Machine is set.
8. electric terminal as claimed in claim 6 is characterized in that, also comprises:
Encrypting module is used for the cryptographic algorithm based on AES, and the class file of java applet is encrypted.
9. as claim 6,7 or 8 described electric terminals, it is characterized in that described recognition processing module comprises:
The detection trigger unit, be used for when the recognition result of described sign identification module when being, trigger described Java Virtual Machine and detect described dynamic link library file and whether contain default identification characteristics information;
When described testing result when being, described Java Virtual Machine is handled the class file according to described dynamic link library file; When described testing result for not the time, described Java Virtual Machine program out of service.
10. electric terminal as claimed in claim 9 is characterized in that, the dynamic link library file that contains default identification characteristics information is provided with the decruption key that described class file is decrypted;
When described testing result when being, described Java Virtual Machine calls aes algorithm described class file is decrypted according to the decruption key of described dynamic link library file, and according to the execution command of the class file after the deciphering.
CN 201010270548 2010-09-01 2010-09-01 Operation method of Java program and electronic terminal Pending CN101944042A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010270548 CN101944042A (en) 2010-09-01 2010-09-01 Operation method of Java program and electronic terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010270548 CN101944042A (en) 2010-09-01 2010-09-01 Operation method of Java program and electronic terminal

Publications (1)

Publication Number Publication Date
CN101944042A true CN101944042A (en) 2011-01-12

Family

ID=43436042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010270548 Pending CN101944042A (en) 2010-09-01 2010-09-01 Operation method of Java program and electronic terminal

Country Status (1)

Country Link
CN (1) CN101944042A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049696A (en) * 2012-11-21 2013-04-17 北京神州绿盟信息安全科技股份有限公司 Virtual machine identification dodging method and device
CN105022936A (en) * 2014-04-30 2015-11-04 北京畅游天下网络技术有限公司 Class file encryption and decryption method and class file encryption and decryption device
CN106250124A (en) * 2016-07-25 2016-12-21 百富计算机技术(深圳)有限公司 The implementation method of the cross-platform operation of functional module and device
CN107480983A (en) * 2017-08-29 2017-12-15 马建山 A kind of antitheft mobile phone payment system
CN109325343A (en) * 2018-09-17 2019-02-12 北京深思数盾科技股份有限公司 Java applet executes method and device
CN109995526A (en) * 2019-04-10 2019-07-09 睿驰达新能源汽车科技(北京)有限公司 A kind of storage method of key and the call method and device of device, key
CN111143787A (en) * 2019-12-31 2020-05-12 方正国际软件(北京)有限公司 Method and device for improving Java software cracking difficulty, verification method and verification device
CN111240766A (en) * 2020-01-22 2020-06-05 北京字节跳动网络技术有限公司 Application starting method and device, electronic equipment and computer readable storage medium
CN111832014A (en) * 2020-07-02 2020-10-27 北京智游网安科技有限公司 Dynamic loading-based Java SDK code encryption and decryption method and terminal
CN112395564A (en) * 2020-11-17 2021-02-23 平安普惠企业管理有限公司 Protection and operation method, device, equipment and storage medium of class file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862557A (en) * 2006-04-26 2006-11-15 何波 Method for protecting program information of program executive device
CN1877595A (en) * 2006-07-19 2006-12-13 北京飞天诚信科技有限公司 Software copyright protection method
CN101529436A (en) * 2006-10-27 2009-09-09 微软公司 Virtualization for diversified tamper resistance
CN101814124A (en) * 2010-04-20 2010-08-25 浪潮电子信息产业股份有限公司 Java-based method for enhancing software security

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862557A (en) * 2006-04-26 2006-11-15 何波 Method for protecting program information of program executive device
CN1877595A (en) * 2006-07-19 2006-12-13 北京飞天诚信科技有限公司 Software copyright protection method
CN101529436A (en) * 2006-10-27 2009-09-09 微软公司 Virtualization for diversified tamper resistance
CN101814124A (en) * 2010-04-20 2010-08-25 浪潮电子信息产业股份有限公司 Java-based method for enhancing software security

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049696A (en) * 2012-11-21 2013-04-17 北京神州绿盟信息安全科技股份有限公司 Virtual machine identification dodging method and device
CN105022936A (en) * 2014-04-30 2015-11-04 北京畅游天下网络技术有限公司 Class file encryption and decryption method and class file encryption and decryption device
CN106250124B (en) * 2016-07-25 2020-01-21 百富计算机技术(深圳)有限公司 Method and device for realizing cross-platform operation of functional modules
CN106250124A (en) * 2016-07-25 2016-12-21 百富计算机技术(深圳)有限公司 The implementation method of the cross-platform operation of functional module and device
WO2018018797A1 (en) * 2016-07-25 2018-02-01 百富计算机技术(深圳)有限公司 Method and device for implementing cross-platform operation of functional module
CN107480983A (en) * 2017-08-29 2017-12-15 马建山 A kind of antitheft mobile phone payment system
CN109325343B (en) * 2018-09-17 2021-08-10 北京深思数盾科技股份有限公司 Java program execution method and device
CN109325343A (en) * 2018-09-17 2019-02-12 北京深思数盾科技股份有限公司 Java applet executes method and device
CN109995526A (en) * 2019-04-10 2019-07-09 睿驰达新能源汽车科技(北京)有限公司 A kind of storage method of key and the call method and device of device, key
CN111143787A (en) * 2019-12-31 2020-05-12 方正国际软件(北京)有限公司 Method and device for improving Java software cracking difficulty, verification method and verification device
CN111143787B (en) * 2019-12-31 2022-02-18 方正国际软件(北京)有限公司 Method and device for improving Java software cracking difficulty, verification method and verification device
CN111240766A (en) * 2020-01-22 2020-06-05 北京字节跳动网络技术有限公司 Application starting method and device, electronic equipment and computer readable storage medium
CN111240766B (en) * 2020-01-22 2023-12-29 抖音视界有限公司 Application starting method and device, electronic equipment and computer readable storage medium
CN111832014A (en) * 2020-07-02 2020-10-27 北京智游网安科技有限公司 Dynamic loading-based Java SDK code encryption and decryption method and terminal
CN111832014B (en) * 2020-07-02 2024-02-13 北京智游网安科技有限公司 Java SDK code encryption and decryption method and terminal based on dynamic loading
CN112395564A (en) * 2020-11-17 2021-02-23 平安普惠企业管理有限公司 Protection and operation method, device, equipment and storage medium of class file

Similar Documents

Publication Publication Date Title
CN101944042A (en) Operation method of Java program and electronic terminal
US8892876B1 (en) Secured application package files for mobile computing devices
KR101054318B1 (en) Computer-readable media recording information processing systems and programs
KR101503785B1 (en) Method And Apparatus For Protecting Dynamic Library
KR101471589B1 (en) Method for Providing Security for Common Intermediate Language Program
CN109784007B (en) Byte code encryption method, byte code decryption method and terminal
WO2015192637A1 (en) Method and apparatus for reinforced protection of software installation package
US8225290B2 (en) Systems and methods for regulating execution of computer software
CN107430650B (en) Securing computer programs against reverse engineering
KR20140077188A (en) Method for the dynamic creation of an application execution environment for securing said application, and associated computer program product and computing device
EP2519908A1 (en) Jcvm bytecode execution protection against fault attacks
US9256756B2 (en) Method of encryption and decryption for shared library in open operating system
CN112613037A (en) Code checking method and device
CN114692134A (en) System and method for protecting codes and data based on linux kernel process monitoring
US20150026483A1 (en) Systems and Methods for Mobile Application Protection
JP5575950B2 (en) Wireless terminal device and system protection method
CN112134905B (en) Android system based signature method, device and equipment
El-Harake et al. Blocking advertisements on android devices using monitoring techniques
CN112733094A (en) Safety protection method for Java application program
CN114816549B (en) Method and system for protecting bootloader and environment variable thereof
CN106203002B (en) Software product guard method
CN107180170A (en) A kind of Android APP are without shell reinforcement means
CN112395563A (en) Method and device for encrypting software product, storage medium and processor
JP4120702B2 (en) Information processing system and program
CN114600102A (en) Apparatus and method for protecting shared objects

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20110112