[Question] Creating hacks with C++

Posts 1–15 of 15 · Page 1 of 1
[Question] Creating hacks with C++
Hello, im a programming with C++, and i'd like to create some hacks :P
first of all, how does it works?
if i'll get an example of hack code for a game i would be grateful.
Please read something about memory editing using C++ first. (Google)
Quote Originally Posted by YoavX View Post
Hello, im a programming with C++, and i'd like to create some hacks :P
first of all, how does it works?
if i'll get an example of hack code for a game i would be grateful.
Wouldn't we all xD. Well I can tell you how it works, but you need certain things to go about, and what you need depends on what type of hack you are making.

Depending on what you want to alter about the game there's different ways to get it done. A popular way is memory hacking.

For memory hacking you need:
1. Some way to find the memory addresses that you want to change.
2. Some way to change those values.

Well that's about it, but the first part might be harder then you would think depending on the countermeasures taken on by the game designers...

After that you would just make a program to change these values. You would need to use functions such as WriteProcessMemory... etc. Taking a good look at a Warrock hack may give you a basic idea of how memory hacks are designed.

Anyway after all that the only problem is deciding how to implement your hack. Almost everyone uses .DLL for memory hacks. because then your hack is part of the game and can read keystrokes and other things without to many complex calls and dealing with scope of windows, etc.
+1 for Why06

my prefered method for memhacking is:
Code:
//type *pPointer = (type*)0x123456;
unsigned long *cPed = (unsigned long*)0xB7CD98;
unsigned long *cCurVehicle = (unsigned long*)((*cPed)+0x58C);
code above was for one of my GTA san andreas projects which i never finished.
dont even remember if it worked or not ^^
also you'll need to inject or create a remote thread to use this method.
for external memhacking use why's method
Stare off with coding, using Codeblock - Better because it has the both Languges in the one, ie. C & C#
Quote Originally Posted by why06 View Post
Wouldn't we all xD. Well I can tell you how it works, but you need certain things to go about, and what you need depends on what type of hack you are making.

Depending on what you want to alter about the game there's different ways to get it done. A popular way is memory hacking.

For memory hacking you need:
1. Some way to find the memory addresses that you want to change.
2. Some way to change those values.

Well that's about it, but the first part might be harder then you would think depending on the countermeasures taken on by the game designers...

After that you would just make a program to change these values. You would need to use functions such as WriteProcessMemory... etc. Taking a good look at a Warrock hack may give you a basic idea of how memory hacks are designed.

Anyway after all that the only problem is deciding how to implement your hack. Almost everyone uses .DLL for memory hacks. because then your hack is part of the game and can read keystrokes and other things without to many complex calls and dealing with scope of windows, etc.
hmm where can i find a .dll project for warrock?
im thinking of starting with a game like GTA SA...
i already downloaded Cheat Engine 5.5 and Olly DBG
Quote Originally Posted by YoavX View Post
hmm where can i find a .dll project for warrock?
im thinking of starting with a game like GTA SA...
i already downloaded Cheat Engine 5.5 and Olly DBG
Our local coder Techtnoic wrote out a entire tutorial. Check it out:
http://www.mpgh.net/forum/161-tutori...-hack-tut.html
Quote Originally Posted by Micheltjuh View Post
That's not what I call a tutorial. That's copying and pasting and compiling. You don't learn anything from it.
Yeh, ur right, but he just asked for sample code of a .dll so I guess this will suffice. If you want to learn how it works you need a better written tut.
i think thats a bunch of useless code.

Code:
#define ADR_ENDOFTHEWORLDSPELL
*(DWORD*)ADR_ENDOFTHEWORLDSPELL = 0x1;
Quote Originally Posted by zhaoyun333 View Post
i think thats a bunch of useless code.

Code:
#define ADR_ENDOFTHEWORLDSPELL
*(DWORD*)ADR_ENDOFTHEWORLDSPELL = 0x1;
I would hardly say it's useless, two means to the same end. Both ways are valid methods of creating address pointers, except that HD's is a little more advanced since he also used an offset to an address.
Quote Originally Posted by zhaoyun333 View Post
i think thats a bunch of useless code.

Code:
#define ADR_ENDOFTHEWORLDSPELL
*(DWORD*)ADR_ENDOFTHEWORLDSPELL = 0x1;
I bet you learned that by copy pasting a lot didnt you?
Also in the end my code is still shorter if you need to edit it multiple times
*name = x
where yours would be
*(type*)name = x

therefor mine is more efficient and owns your copy pasteness
Quote Originally Posted by Hell_Demon View Post
I bet you learned that by copy pasting a lot didnt you?
Also in the end my code is still shorter if you need to edit it multiple times
*name = x
where yours would be
*(type*)name = x

therefor mine is more efficient and owns your copy pasteness
Errhm, Zhao can code >_<. He used to be in here a lot a while ago, then dissappeared.

Eitherway, i a mostly sure zhao's version is more efficient since you don't need to allocate memory for a variable. It's not about how much code you type. it's about how efficiently it runs.
Quote Originally Posted by zeco View Post
Errhm, Zhao can code >_<. He used to be in here a lot a while ago, then dissappeared.

Eitherway, i a mostly sure zhao's version is more efficient since you don't need to allocate memory for a variable. It's not about how much code you type. it's about how efficiently it runs.
if you feel like typing out the typecasts every time and keeping track of which typecast is used for which address be my guest ^^
the reason i said copy paster was that everyone from the 'warrock hacking scene' uses the #define method since a few of the 'original' coders used it.

and the define method would be a bitch to use with structs and classes(if possible at all)
Well if you already know how to code, but not how to make hacks, I would say you could learn a lot from it. It gives you an idea of how to do it, so you can remember the basics for next time.
Posts 1–15 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us