Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,
Im developing a program which will be highly targeted to be cracked, currently Im making HW fingerprint comparison inside my code twice, once when running and once when executing the same function which will be like this

if(Encrypt(GetCPUSerial())!=XXXXX)
PostQuitMessage(0);


Where XXXXX is encrypted value of the Client CPU Serial Number,
Is that safe to use or maybe someone be able to change the XXXXX and rebuild the EXE?
im using MFC

I know that all programs can be cracked, but I'm trying to make it as hard as possible, since my clients are limited.

I can merge the license validation inside the code so no calculation or keygen can crack it since the user dont enter anything and im not doing any calculation other than encrypting the hardware serial numbers and compare it with what I fetched from the client PC, this would be a good point to protect and im wondering if what im doing is right,

Regarding to skipping the validation code can the cracker release a program to force my application to skip validation? any hints guys??

Thanks.
Posted
Updated 18-Aug-11 0:01am
v2
Comments
Dylan Morley 18-Aug-11 6:02am    
Moved comment from OP into question
Dylan Morley 18-Aug-11 6:05am    
Yes, a cracker can simply debug your program using something like Softice (http://en.wikipedia.org/wiki/SoftICE) or one of the many other debuggers,

You have some logic like this...

if(Encrypt(GetCPUSerial())!=XXXXX)
PostQuitMessage(0);

They just find that in your compiled source and use an editor to remove the whole logic branch. They save the results, your EXE is now cracked and has no protection.
AbuS3ood 18-Aug-11 6:42am    
I know that all programs can be cracked, but I'm trying to make it as hard as possible, since my clients are limited,I can merge the license validation inside the code so no calculation or keygen can crack it since the user dont enter anything and im not doing any calculation other than encrypting the hardware serial numbers and compare it with what I fetched from the client PC, this would be a good point to protect and im wondering if what im doing is right,
Regarding to skipping the validation code can the cracker release a program to force my application to skip validation? any hints guys?? :)
Dylan Morley 18-Aug-11 7:56am    
Yeah, just do that then, that'll work

Think of all the software houses out there trying to protect software and failing. Companies like Steinberg who have implemented complex dongle based authentication processes, with part of the software held physically on an external device!

Still these are cracked.

If a serious cracker want's to break your program, it's going to happen. They're just use a debugger to skip over the entire if branch so that the check and result doesn't even happen, your program will just continue running.

If it really was as simple as that to protect a program, don't you think they'd be a lot less software piracy!
 
Share this answer
 
Comments
JackDingler 1-Oct-12 11:27am    
Steinberg is a good example.

They have a complex and error prone licensing scheme. It costs them money and alienates paying customers like myself. For this, they get no benefit, as they get cracked anyway.

It's a waste of money and goodwill for nothing.
There is no absolute way to prevent your code being hacked: Go to any warez site and look at the software available. Microsoft, Photoshop, all the big names are there - and the more expensive it is the more likely it is to be hacked.

The best ways to do it are expensive to implement, and annoying to the user - because they generally fail after the user has done something that they did not realize would cause your program to fail.

You can easily spend a lot more on developing protection for your software than you will save in lost revenue: ask yourself "how many copies of this will I sell?" "How much will I lose to piracy" and then work out how much effort you have to spend before it becomes uneconomic. Think about it: why do you think MS has a installation key and an occasional online check, but otherwise doesn't particularly bother about securing the software itself?
 
Share this answer
 
You know, for small software companies or single programmers the logic behind the software protection nowadays is quite simple:
- you either give it away for free, with an option to ask for donation;
- or you create some sort of protection/registration procedure.
Think of it this way, good people who want your program are probably also would pay for it, but may be will not do it if you ask for donation, because they can simply forget about donation fee, or (as in many cases) they don't have a way to pay via credit card in Internet. In many countries around the world, including such behemoths as China or Russia, it is still very difficult to do. Your program must be a very-very attractive and popular one to rely on donation. Something like a good media player (kind of Winamp), or a powerful image editor (like Paint.Net). Otherwise you can create some sort of protection thinking that people who need your program rather will pay a reasonable money than would search for warez version. Others will never pay, so forget about them. Thus, your protection scheme must correspond to estimated price of your software and time spent on developing. Do some research first, implement your protection, make it easy enough for a customer. And if you find your program on warez sites among many other famous programs, consider it as some kind of recognition.
The best protection that i know about is done by Microsoft for Visual Studio. They finally recognize that companies will always pay (well, almost always) for legitimate copies and support. And for others there are very good light versions of Express edition.
 
Share this answer
 
v2
Many great suggestions here.

I do note a glaring omission of any mention of an EXE-encryptor. First you put your own security checks in the program, and compile it. Next you encrypt it with an exe packer/crypter.

The best types actually create virtual machines that they use to execute a 'translated' version of your exe file. These virtual machines are truly horrid things to debug. Often hooking all kinds of function calls to make your life as a debugger harder. VirtualProtect or VMProtect comes to mind, as does ASProtect and Armadillo.


As it stands, I'd be hopelessly depressed if I couldn't bust wide open your protection scheme in less than the time it took me to finish a cup of coffee. I'd be suicidal should it take me an hour!!

Also, a point worthy of mention is that you may find you're pushing up a hill to use the CPU serial number as an identification method. My understanding is that this is NOT implemented as intended when the feature was devised. Different manufacturers handle the functionality differently. (I believe AMD does not store a unique number) Try CPUID on wikipedia for more info.
Furthermore, the user needs to enable this feature in the BIOS. I understand that you may be in a position to dictate hardware and BIOS settings. Though if this wasn't understood you may get quite a rude shock.


Have a look at tuts4you.com, there's a series of 40+ cracking tutes. They make for good education when it comes time to keep your investment safe. Many techniques of obfuscation and making life hell for the pirate are shown - albeit from the perspective of the hacker.

Also, take a look at IDAPro debugger - this can re-assign MFC function names to dissassembled code. I mention all of these techniques as a way of impressing upon you just how large a task it is to effectively protect software. OriginalGriff has provided some wise information with regards to calculating an effective trade-off point
 
Share this answer
 
As a user I will never accept software that -once I payed to use- doesn't allow ME to change MY cpu, MY network card, MY bios settings, everything I already payed to get use be ME the way I want.

May be this look a bit egocentric, but I'm a stronger believer in the sentence of the US court against Sony: "It is your software, but that's not your computer".

Nerveless there are countries in the world whose legal system explicitly prohibit any intrusive mechanism of software protection, and explicitly allow the user to run all the copies he wants on the machines he owns. Such laws (I' referring in particular about the European directive about software copyrights) explicitly say that whatever software license denying those rights have to be considered illegal and hence without any value. A user in those countries can legitimately take you into a court to ask to disable such a protection if it make him unable to change its own machine.

Moral of the story: If you want to make money with software forget to make them by "selling copy" (copy is a basic operation that makes every machine working, you cannot pretend an exclusive): sell "support" instead, granting evolution and bug fixing only to who subscribed a license.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900