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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNTYPED (.exe) FILE

Status
Not open for further replies.

hbez

Instructor
Mar 25, 2003
49
ZA
I'm playing around with copy-protection and want to try the following: Assuming I have an application MyApp.exe with a variable assigned the value of "ABCDE' somewhere inside the executable. How can I locate where this value is written in the file? Then, how can I write a new (same size) value in its place?
I've tried using BlockRead but keep getting an IO error 998.

Hannes
 
I think he wants to write a secutity code into the exe!

Look at pointer and Address routines or Inline assembler.
or just make a constant

[blue]const[/blue] code = 'ADCDE'; that will be in the exe somewhere.

But either way you have a problem, because of the way windows handles absolute addresses.

The other problem is that this (if it worked) would be fine for a very limited number of copies of an application, but if you want to ship an economic quantity then you have to recompile every time. (if I understand what you are trying to do), thats why no one does it that way.

Its also very easy to hack.
Just do a 'compare' on two copies of the exe!



Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
 
Many thanks for the replies. Steve, that's exactly what I'm playing with, something I did once way back with QuickBasic (so how old am I) where it was easy as pie, not that I'm capable of baking one. Haven't thought of cracking it by using compare, tho I suppose one could involve the registry or hardware ID somewhere.
Reason is that commercial protection programs are hellishly expensive. I did fine TmxProtector, freeware that I still need to figure out how it works.

Hannes
 
This is just general stuff
My own system generates a code using the users name (they have to email to get one) and a date driven demo mode they have to upgrade the demo (downloaded) within the activation period.
That's not foolproof by any means!!

Next step up is getting serial numbers (or the user name) from the hardware and thus tying it to a computer.

Then there are the systems that use an algorithm to generate long 'keys' pseudo randomly (OK I don't know the correct term), there will be lots of 'Good' Keys, but only a tiny percentage of the total combinations of say 20 alpha numeric characters.
So the chance of getting a good one randomly is infinitesimally small, the algorithms to do this are kept a close secret of course, this is what you are paying for when getting a commercial protection package.
(As used my M$ etc)

Even this isnt foolproof, it only take one employee to leak the 'seed' and the Hackers out there will tune thier Keygens to generate good keys for an application.


I just had a look at the Innosetup web site and I think that Inno has a built in encryption algorithm (and InnoSetup is free), this will protect your installer. Of course it doesn't protect the exe once its installed.

There might be a Free Delphi component that will generate Encryption keys for you, worth a look.

Or someone ere might know how to write one? (I don't).
I would say the maths involved is going to be quite harsh.



Steve: N.M.N.F.
If something is popular, it must be wrong: Mark Twain
 
I use Ice License from IonWorx. Unfortunately it doesn't work with D2009 yet so I have to do my copy protection applications in D2006 still. The developer has said that they would be working on making it compatible this year.

Support is very slow to respond but the product seems to work well. It can issue demo licenses (# of days, # of uses, expire on a specific date) and then I can send a fully working license or a new demo license to extend the demo period. It can be tied to a machine if you like.

 
turbopower lockbox, a little bit outdated, but Free ;)

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
You are going to get in trouble when using certificates to sign the exe. You can't change the contents of the exe after the certificate has 'done it's job', as it is partly based on checksums of the original code.
Possibly you could add these settings to the VersionInfo resource? but that might also be covered by the certificate, never tried that.
 
Thank you all, I'm not going to redesign the wheel. Will look out for an affordable commercial solution.

Hannes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top