Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy protection for .exe files

Status
Not open for further replies.

Actor

Programmer
Nov 19, 2003
20
0
0
US
Suppose I write a program and sell copies of the .exe file. How can I keep one customer from making a copy of the .exe file and giving it away? (or selling it? I don't want to use a dongle.

I have bought software that required a code to install but I have no idea how to implement such a thing. Is it possible to detect some attribute of the computer the program runs on and make it inoperative on any other computer?

Does anyone have any other ideas along this line?
 
You need to create a trial mode (so people can copy it freely but get restricted features) and then have an unlock function.

The unlock can be done by detecting the computers attributes such as hard drive label, MAC address, computer name etc. Making a hardware code for the latter, then combining this with the users details to create a key. This is a pain to do and is not very secure.

Personally, I think you would be better off with a 3rd party licensing system which allows you to cut keys etc. I have used exeshield ( for this purpose in the past.
 
A simple copy protection program is relativly easy to write.
First you need to lock off certain features of a program (I personally perfer a boolean tag) that will only be available when the key is purchased.
Then you need to set up two fields for the user to enter for registration the username and password. The username can be just about anything(i perfer strings because they are versitile and easy to work with) and the username is used to generate a test password. This can be done in a variety of ways, use your immagination and have fun xoring anding ect. the username. You could even throw some system info into the equation for extra security (just make sure you can obtain it for the keygen later). Once the test code is generated check it against the password the user entered and if they match then simply unlock all the locked features.
After that it is a simple matter of writing a key generator which will output the test code with the user information for your own use.

A word of advice. It is generally a bad idea to use any 3rd party licensing system. Since they all are the same, once the program is cracked then all the software that uses it is compromized, so your best security lies in your own creativity as a programmer, not some commercial gig. Check out if you need some more ideas.
 
It is generally a bad idea to use any 3rd party licensing system. Since they all are the same, once the program is cracked then all the software that uses it is compromized

Very true (although exeshield has never been cracked incidentally). But I would counter that by saying there is a much higher risk if you generate your own code unless you implement some form of code obfuscation.

It is very easy to reverse engineer an executable (there is freeware that does this!). Someone can easily 'open' your executable, see a representation of your code which in turn exposes your licensing mechanism. So a 'crack' would appear on a website very quickly.

You could use for obfuscation which makes reverse engineering a lot harder.

I would still promote a 3rd party system since they incorporate the licensing, license extensions, fixed time or fixed run licenses, the code obfuscation and usually a standalone key generator for software sales outlets (plus various other anti-crack mechanisms).

Ultimately however, it all depends how much your software is worth to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top