Anti-encryption of Java programs

Source: Internet
Author: User
Tags constant

First we look at the crack of the Java program, which is usually called the process of the procedure, only understand the process, we can effectively encrypt our program.

Usually we get the Java program crack package has two kinds, one belongs to the Keygen (registration code generator), one belongs to the substitution modification;

We first look at the first, when we find an application of the keygen when we always admire the man who made keygen, think he is very powerful, but you carefully analyze, why he can make keygen? Only

He knows the cryptographic algorithms of this Java program very well; One is the person inside that company, that is impossible, unless infighting, still, is conjecture, reverse push, this possibility? Oh, more impossible, then where does this algorithm come from? Oh, it is the secret that often leaks the secret itself ... Looking back, how does a Java application know that the registration code you entered is correct? Oh, then you should start from the application ...

Obtained its encryption algorithm, the natural keygen will be a cinch ... (But this is also a column, if it is used by the public key secret key to the encryption, there is no way, can only use the second method.) )

This approach only suits to deal with just one registration number, nothing else, classic Representative Borland JBuilder & Optimizeit Suite

Look at the second, why replace the change? Did we change that part? Do not think, certainly is the license verification of the part, why we do not like the above method to find encryption algorithm? There are two reasons: (1) Use the above method to make uncertain; (2) Java program not only to key, there are other license configuration; In this case, we just find the class for license validation, modify the replacement on the line.

This approach is used in any case where the classic represents Bea WebLogic

Through the above analysis, our problem is concentrated, the key is how to find parts of the license validation or encryption algorithms, we need 3 tools: One is the standard JVM provided by Sun: One is your patience and carefulness: one is jad (Classic Java decompile tool).

The first step is positioning, which is also the most critical step, we take together for JBuilder edition as an example, start together, first look what looks like? Oh, come up and ask me to License;ok,

every relationship, exit; Find together boot bat file, find its startup command: Java ..., OK, give a parameter when Java starts: "-xrunhprof:cpu=times", save, in boot, or to

License, exit, this time, we can find that in this directory more than a "java.hprof.txt" file, open a look, is I want the JVM dump file, a lot of content ah, it doesn't matter, slowly.

We can see that this document has a lot of familiar things AH: java.*/com.sun.*/javax.* and so on, but this is not our concern, we want to com.togethersoft.* or some do not have a package name zd.d and so on. (In this case, almost all Java applications will be confused, the principle of confusion is also very simple, we say later.) First find out if there is license related, Serach, hehe, sure enough, 474 lines: Com.togethersoft.together.impl.ide.license.LicenseSetup.execute ([ Dashopro-v2-050200]:unknown line), OK on that heap of classpath in the jar bag inside find it (recommended with WinRAR), found after the jad with the decompile, a look, this is not confusing, but with a zae class, This look at the name to know the confusion, first ignore it, and then look at the following sentence Idelicenseaccess.setlicense (ZAE1), OK then find idelicenseaccess, haha, on this, all license verification is to go this class , object-oriented thinking is good, hehe:

Positioning is finished, the next thing is to guess the way to modify these two classes, shielding out licensesetup the actual content of the Execute method, modify the idelicenseaccess, so that many of the verification returns true, and then compile, replace; don't be so happy. This is not finished, to have a sense of responsibility!! Start together, sure enough, this do not license, there is a splash screen, went in, but a gray, how the matter, a look at the console, a bunch of wrong, it does not matter, do not worry about error, find the root cause, there is a idelicenseutil class out of the problem, and then decompile, modify, replace ; it's done. Start again, test it, OK.

In this way, a Java application is done. Look, it's really simple.

Again, confusion, you may all know that there is no confusing Java class decompile back to the method and the variable name will not change, what is the reason? This will go back to the structure of the class file, in simple terms, class file contains another constant pool (constant pool) which holds the names of variables and methods, and so on, and class-related things, Our usual confusion is to use a tool to make a bit of the inside of this constant pool, so that you can cheat the counter compiler and you, OH: This is why sometimes decompile back things compile not past reason.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.