[xplorer˛] — That kid smashed my software protection!
home » blog » 30 July 2011 [programming]

"Vanitas vanitatum et omnia vanitas" — Ecclesiastes 1:2

There's no point wasting your time or energy to 100% secure your software project against cracking or reverse engineering. No matter what sooner or later somebody will break into the fortress. Machine language is as clear as plain english to some types, and given the right tools even amateur level crackers/hackers can do it. You may have heard of SoftICE or OllyDbg; the other day I came across something even easier to use called API Monitor which uses API hooking like you were debugging your own source code. Absolutely disheartening for a mISV...

All it takes is to find the place in the code where you check the validity of the license key, then patch the executable so that the original if(is_code_valid()) {...} is turned into something like if(1) {...}. Then the patch is made available for downloading and announced in specialist warez forums, and from then on whoever doesn't want to pay for your software can get it for free. Or even worse, your key generation algorithm itself can be discovered and compiled into a keygen, issuing unlock keys indistinguishable from your own legitimate ones.

I am not saying that it is pointless adding DRM or licensing to your software; just don't lose too much sleep over it. If the program is useful and popular it will get cracked. C'est la vie.

What about the kiddie hackers?
Not everybody is gifted with the powers of the dark side, but you get many cheeky little monkeys playing petty tricks. The point of this article is that you can and should do something about them — it's easy. Most people cannot use softICE kernel debugger but almost everybody can change the system clock on their PC. How will that affect your 30 day trial? Will it turn it into an unlimited trial?

There are many easy to use tools that can affect your software licensing without any specialist knowledge. Have you thought what tools like these will do to your code?

  • Resource Hacker. Some people use this tool to change icons in programs, but it can edit all the resources. What if someone just deletes your nag dialog? Is your code resilient to detect a whole dialog missing?
  • Windows Enabler. This tool can make any disabled dialog button or menu item available for clicking. Is your nag dialog only relying on the disabled state of some button? Beef up its security so your code internally matches the disabled state with a state variable (which obviously cannot be changed using simple external tools).
  • Clock spoofing. If you rely on the system clock to figure out when to end the free 30 day trial, you are up against tools that modify the system clock so your time limited trial can be turned into eternal free trial. There are simple tools like Date Cracker 2000 or more sophisticated like Nirsoft's RunAsDate that take a rootkit approach changing the system clock only for your program! How do you deal with this? Tip: don't rely on the system clock only, double check with something else, e.g. the modification date/time of the system pagefile.

Anti-cracking summary
I cannot divulge all the tricks I personally use for copy protection, but here are a few rock solid ideas to build upon:

  • Use asymmetric encryption for your unlock keys. This is uncrackable and you solve the problem of keygens once and for all. I have blogged about this extensively in an earlier article
  • Watch your successive releases. If your DRM is compromised and you release a fix for it, don't make it easy for crackers to discover your changes. If they merely windiff the old and latest version they will get to know quickly where you made the changes. Use your linker flags to make the generated code look completely different.
  • Update frequently. Once you tighten your protection and there are no keygens, crackers can only patch your program. Make their life harder with frequent releases. Drive them to exhaustion!
  • Use common sense and deceit. It all has been said before, check out the Anti Cracking FAQ
  • Remove cracked versions. There are tools to remove unauthorized and copyright infringing versions of your software from the major download sites like Crack Tracker. The less cracks in circulation the more paying customers for you.

Finally — although I don't use them personally — for completion I must mention the many ready-made software protection solutions like Armadillo and WinLicense — which can get you in trouble as AV false positives. Or the idea of using separate trial (permanently crippled) and full download versions — that only paying customers have access to.

Keep your honest users honest, don't worry too much about the big pirates; concentrate on building great useful software. You can have a rewarding and fulfilling mISV career!

Post a comment on this topic



What would you like to do next?

Reclaim control of your files!
  • browse
  • preview
  • manage
  • locate
  • organize
Download xplorer2 free trial
"This powerhouse file manager beats the pants off Microsoft's built-in utility..."

© 2002—2011 Nikos Bozinis, all rights reserved