Page 1 of 1
executable protector in pb???
Posted: Sat Apr 10, 2004 2:55 pm
by thefool
Hi!
I dont want to make an exe protector, but would this be possible? The size of the pb exec isnt that big, so the size wont be a problem. A lot of asm is going to be needed, but can it be done? Playing with the memory of itself and stuff.
again, this question isnt "can i do that" its "can anyone do that".
a non-usable question, but interesting to know

Re: executable protector in pb???
Posted: Sun Apr 11, 2004 8:23 am
by Rings
thefool wrote:Hi!
I dont want to make an exe protector, but would this be possible? The size of the pb exec isnt that big, so the size wont be a problem. A lot of asm is going to be needed, but can it be done? Playing with the memory of itself and stuff.
again, this question isnt "can i do that" its "can anyone do that".
a non-usable question, but interesting to know

ItCanBeDone
Posted: Sun Apr 11, 2004 11:06 am
by Kris_a
A pretty simple way is to have a few other variables that should 'match' the one you want to prevent from being hacked. EG:
Code: Select all
Money = 5000
repeat
a = money * 12052 ; random number
b = money * 195
; Do money-related stuff
; If a trainer has changed the value of Money, this 'if' should trigger
if a <> money * 12052 or b <> money * 195
debug "Money has been hacked!"
endif
forever
I'm not sure if this works, but I would guess that it'd be more reliable if you put it inside a thread, since you don't know what part of execution your program will be at when the values are changed.
I think it's also possible to register certain security measures that tell Windows not to give any other programs access to the memory of yours. No idea how, though

Posted: Sun Apr 11, 2004 11:13 am
by Num3
The simplest way is to increase or decrease all internal values by 1.
So you display 256 to the user but in fact the value is 255

Posted: Sun Apr 11, 2004 3:49 pm
by thefool
@kris-a: Hmm like the program checks itself. Interesting!
@num3: i used that before! You could also xor the value.
@rings : ok

Posted: Sun Apr 11, 2004 4:02 pm
by Kris_a
num3, certain programs (I think TSearch is one of them) get around this by checking 'one more or one less', so maybe you should add 5/10/3/etc instead

Posted: Sun Apr 11, 2004 4:18 pm
by Dare2
How does that protect the code?
* Feeling Thick - natural state *
Posted: Mon Apr 12, 2004 4:18 am
by PB
> certain programs (I think TSearch is one of them) get around this by
> checking 'one more or one less', so maybe you should add 5/10/3/etc
> instead
I think TSearch also lets you check for "higher" or "lower" than the last
match, so it doesn't matter if you add 1, 5 or 50 -- it can still find it.
