Change game settings in binary

(I asked this question in Gaming, but it was closed, and ppl suggested I ask about Stackoverflow. If this does not fit, please suggest a better place before closing it. Thank you.)

One common way to cheat in a game is to use a memory scan tool to track the value you want to change. However, another common way to cheat is to modify the binary.

For example, in the game you get +5 exp when you kill the enemy, and by changing 5-50 stored in binary format, you can get +50 exp. As far as I know, many cheats for iPhone work in a way that requires fixing the binary or using the HEX editor.

I am wondering how these hackers determine settings. What is a common method / tool to find out in which binary a particular value is located, and the corresponding offset? If it's a very unique ascii number or string, like 3219 or google.com , you can just find the HEX value, but what if it's a common value like 1?

+4
source share
2 answers

You can parse the executable file of the game, so you could, in principle, find out what each memory cell does. This is probably not suitable for most games.

Two other approaches that are more directly targeted at specific values:

  • Pause the game with the debugger right before you gain experience and go through the code to see which memory locations are affected.
  • Despite the fact that there are many places containing the same amount as your experience, you can quickly narrow them down: let's say you have 50 EXP, dump the list of all memory locations * containing 50, then get a few EXP (say , 20) now you can exclude all locations that have not changed to 70.

* You are probably looking for a 32/64-bit integer, not a single byte location.

+4
source

Try to determine the file format using trial and error. Programmers usually don't make things intentionally difficult unless the game is an MMO or a huge blockbuster prone to cheating. If you are playing a game that gives you Exp to kill a bullet, follow these basic steps:

  • Locate the Monster file or database table. It contains information about all monsters.
  • Find known information. In this case, the name of the monster is "Slug".
  • Use the hex editor to check for bytes next to the monster name. Find a DWORD, WORD, or BYTE that contains the value "50".
  • Change 50 to 51 and save the changes. Kill "Slug" and see if exp has changed.
  • If you still get 50 exp, try a different value next to "Slug" and try again.

With enough time and patience, you will eventually figure out the whole file format and be able to change anything as you see fit.

0
source

All Articles