How to manage a usage counter integrated in an app exec

Share your advanced PureBasic knowledge/code with the community.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Last time I remember this being discussed here someone posted this link, which I found quite an interesting read if nothing else :)

http://inner-smile.com/nocrack.phtml
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: How to manage a usage counter integrated in an app exec

Post by freepurebasic »

i know this is an 2000's post but ..

yes you can write over an executable in the time is running.
there is a method very simple :


1.get the path of user's Temp folder(only if you try in Windows this)
2.run your executable
a1) create a copy of .exe in Temp
a2) put the timer over x position in .exe (write it over using seek ,low level buffer)
a3) on exit: create a .bat and run it with this commands:
line 1 : copy from Temp to over my original .exe
line 2: delete the Temp .exe because you don't need anymore
line 3: not a fantasy it's work - delete the .bat himself (in windows works)


well done ,now you know how to write over a .exe is running

to make sure that a hacker will not attack your Temp's exe with a patch or a crack make sure after the step a1 there another step a1a :"open the .exe Temp and keep it in read only for modify it from other programs" (an alternative to do this is to create a read only windows service that protect your .exe 's Temp sending commands using a server on localhost:port to allow you from original .exe to make modifies on the clone)

that all folks! ;)
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: How to manage a usage counter integrated in an app exec

Post by Thorium »

I beat it in about 1 minute.

There is one big flaw in all that protection ideas: a cracker dont cares about all the files he will go for the check(s) and simply patch them, no matter how many checksums you have.

If you want to give them a hard time you dont actualy check anything. For example you use a serial to calculate a value thats later used for some actual needed calculations in your app. No way to easiely patch that, in that case a cracker would need to understand your serial calculation and make a keygen or do some complex code
patches.
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: How to manage a usage counter integrated in an app exec

Post by freepurebasic »

yeah but if you include 3 checksum :

1.file checksum
2."serial checksum"
and
3. the file part where you store the checksum 1 and 2 so the hacker will be slowed down and will think how about is not possible brake it,
so if your exe doesn't pass all 3 checks or x checks so will exit and will show a window like : you know the .exe was danaged so try tu uninstall it and install it again.

;)
Post Reply