Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Hacking Protection

Author
Message
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 8th Aug 2011 00:40
Hey guys, so my game is like 98% and i like to speed up things a little bit and i tryed to hack my own game..

Unfortunely it took me 2 minutes to hack all my game variables...
I found all the addresses and i hacked them all without any error or problem.

I dont blame DarkGDK or C++ because it's not their fault but how can i protect it from Addresses Loggers like Cheat Engine?

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 8th Aug 2011 01:12
one way i've found to deter memory editor hacking is to shuffle variables around every game loop.

So, for every critical variable, replace "int" with a custom "Integer" class, float with Float, or whatever. The "MyInteger" class would store a pointer to an integer, instead of an integer, then you could write all the necessary operator functions (operator+, operator-, operator+=, MyInteger()), and all the necessary constructors/copy constructors/destructor, so that it behaves like an integer without memory leaks. Then you can add a function called "shuffle", which deallocates the internal pointer, and allocated a new variable. the class would look something like this:



Hopefully that would cause the variable to change position in memory a bunch. You could get fancier to make sure that the variables change position in memory, but this would probably suffice.


Why does blue text appear every time you are near?
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 8th Aug 2011 01:13
There's one simple method and that's to keep some of your vars within a structure / class and during an idle moment assign a new class, copy everything over and delete the old class. That way one pointer will still point to the same data but it moves around from time to time.

Warning! May contain Nuts!
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Aug 2011 04:30
People that cheat at games will find themselves bored with them more quickly than those that use the game's challenges as challanges to themselves. I don't worry about someome cheating any of my games.

The only exception to that is if you make a multiplayer game. That's people cheating other people and not just themselves!

The fastest code is the code never written.
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 8th Aug 2011 05:07 Edited at: 8th Aug 2011 05:08
Add a wrapper around your get/set commands for these important variables. Inside, before you store it, use a bitwise XOR or some other bitshift.

http://en.wikipedia.org/wiki/Bitwise_operation#XOR

That way they won't have anything recognizable to search for.

vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 8th Aug 2011 11:15
@Neuro Fuzzy

So when you have int val, its the var i want to hide right?


@HawkBlood

You're right.. but im starting learning more and more and i dont know the tomorrow day so i can start making a MP game and i wont give the look of a weak game..

@Mistrel

I didnt get XOR idea..

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 8th Aug 2011 19:54
^What he means is this:

http://en.wikipedia.org/wiki/XOR_cipher

so if you have an int A, you could generate a random number key B, then store A^B, and whenever you need to get() this value, decrypt it by calculating (A^B)^B (IE the value stored XOR b)


Why does blue text appear every time you are near?
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 8th Aug 2011 20:12
NeuroFuzzy explains it well, but maybe you need to see an actual code example:



It is a simple cypher, but until you decide you *need* something else, it should get you by and it's rather fast too...

Regards,
JTK
vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 9th Aug 2011 11:52
So making a var that contains the real var value right?

Ok thanks
Just one more question: Cant i detect (in-game) if Cheat Engine is Open and just close the game?

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 9th Aug 2011 14:00
check this out, you will basically enumerate all processes on the system, and check if it's name is the name of that cheat engine or whatever, though, this doesn't seem to be the proper solution, i don't know anything about that cheat engine or whatever, but i believe there are other tools that they can use - though, this way might annoy them, especially if you add more processes to your blacklist, and one more thing - i'm not sure if this is fast enough for a game, try it, but dont enumerate every frame, instead, once a second or once every 10 seconds, or whatever value you want

vitinho444
14
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 9th Aug 2011 15:40
well cheat engine is a program that helps to change values in games, you can use on .exe or flash games, its pretty cool, and it also helps looking for Addresses...

C++ Medium 3.5/5
VB6 Advanced: 4/5
VB.NET Advanced: 4/5

Login to post a reply

Server time is: 2024-11-19 08:31:51
Your offset time is: 2024-11-19 08:31:51