How to prevent software from being cracked

Source: Internet
Author: User

How to prevent software from being cracked

Visual CHM has been launched for three months. I have seen several cracked versions since version 2.0, but none of them have been successfully cracked yet. Many friends asked me how to encrypt them, I have decided to announce the methods used in 2.x( each version has the same encryption method) to prevent cracking. It's a little contribution to sharing software in China!

First of all, you should avoid writing a registration machine. Once the registration machine of your software is published, you have reason to make it a free software. The easiest way to prevent registration servers from being written is to protect your validation algorithms. The specific approach is never to use the verification function. It is safer to embed your verification algorithm into the function code, in this way, the attacker should spend at least a lot of energy studying the validation algorithm. Of course, this is not enough. You can also distribute the test algorithm to two places. Of course, the effect will be better in more places, but it will be very troublesome to maintain the code in the future. I think if it is not a big-name software such as WinZip and ACDSee, few people will find the algorithm (too headache ). After doing this, you can use ASPack, UPX, and other compressed execution file tools for further protection. Are you finished? No. I have something more useful here. There are too many shell removal tools. It can be said that there is no shell that can't be detached. What should we do? I have a piece of delphi5 code to further protect your software:
Procedure tform1.formcreate (Sender: tobject );
VaR
Exefile: file of byte;
Conststr: byte;
Begin
Assignfile (exefile, application. exename );
Reset (exefile );
Filemode: = 0; // set the read/write attribute to read-only so that no error occurs!
Seek (exefile, 5); // 5th + 1 Location of the EXE file (set the location to be searched by yourself)
Read (exefile, conststr );
// Showmessage (inttostr (ord (constmi); // check the actual number (assuming 56)
Closefile (exefile );

If conststr <> CHR (56) Then exit; // if the value of 5th + 1 is not 56, exit (your software has been changed)

End;

This code can be added anytime, anywhere, which is really convenient. However, you must note what to do if your machine is infected with a virus. What do we need to protect against the inspection algorithm? The verification algorithm only makes it difficult for the cracker to write the registration machine, but it cannot prevent the software from being cracked (that is, it is often said to be cracked ). The principle of brute-force cracking is simple: after your software is written, it is compiled into an executable file. When the cracker gets the software, it can be decompiled to get the assembly code. Your section "If test fails then..." becomes cmp xx, XX, jp xx, XX. Change it to cmp xx, XX, drop, and drop. The entire validation algorithm is voided. I think there should be no good method, but never compare it with plain text. If you want to further protect your code, add some redundant code to make cracker dizzy in this pile of code, and your goal will be achieved.
Finally, I don't want to speak fast. 1. (Reference others :) encryption cannot save the sharing software industry! Someone can solve this problem with good encryption technology! It is better to enhance the functions of your software than to spend time encrypting it! In this way, more people may support you !! (It's annoying to jump out of the window all day )! 2. I think cracker is really cute.
 

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.