How to MOD using Strings in IDA Pro

In games or applications, strings refer to a data type used to represent and manipulate text or sequences of characters. They’re essentially a series of characters, such as letters, numbers, symbols, or spaces, strung together in a specific order.

Many games obfuscate methods and classes in the game to prevent us from reading or understanding the code, that is where strings can be useful.

Hacking using strings can be challenging sometimes since it can be really time-consuming, however sometimes it can take you less than 10 minutes to mod a game, so it really depends. Do not try to hack strings if you have no knowledge about IDA or ARM Assembly, you will get confused and will not get anywhere. Learn the basics of IDA pro and ARM Assembly to make things a bit easier for yourself.

Requirements for this tutorial:

1) IDA PRO

2) War Heroes APK (We will be modding that)

3) Basic Knowledge of how to MOD games using IDA Pro

4) Basic Knowledge of modding games in general

Let’s Begin

Once you have all the requirements ready.

In the game, every time you want to spawn a troop, it will cost you MANA, so in this tutorial we will MOD the game so that we do not require MANA to spawn troops, meaning we will make the MANA cost for spawning troops ZERO

1) Extract the libboomforce.so from the lib folder and load it in IDA PRO

2) Wait for it to fully LOAD

3) Once Loaded, click on View > Open subviews > Strings

Wait for it to generate strings

4) Once done, you will have a new window of strings with all the strings that are being used in the game.

5) Right Click on Strings Window and Click QUICK FILTER

6) Since we want to modify the cost of the MANA used in spawning troops. We will search for the term “cost” and see what we get

Wow, we have many results here, but we can see the first one is manaCost which looks like an interesting string. For other games it won’t be so straightforward, they may also be called something else like energy cost, or anything.

So let’s take a look at manaCost and see if we find anything useful. Click on manaCost and it should bring you here.

Press X on aManacost to xrefs and see how many times it is being used in the game.

Hmm, so it’s just once in sub_59BCA0.  Go to the function by click on it.

So let’s see the SUB functions that are being called near the ManaCost string. XREFS them and see how many times they are called inside the game, if it is more than 50 just ignore them since they are useless.

This one is called 317 times, which is completely useless, AND so are the other sub function near them.

Now, how i normally MOD is if I find the string inside a function that looks promising, I will MOD it first before trying to check the other Sub functions that are being called within the function.

So let’s scroll up to where this function begins.

Hmm, there is no harm in trying to see what this function does. So since we want the cost to be ZERO for spawning our troops, why not return 0 for this function.

7) Load the libboomforce.so in HEX editor, and copy the offset of the sub_59BCA0 which is 59BCA0

Since we are working with a code segment that’s encoded in Thumb instructions, we will return a thumb value here for 0 which is 00 20 70 47

Press CTRL + SHIFT + V to paste the code

Save the file and return it to the APK file. Sign the APK and test it.

As you can see, we modded the correct function, the cost of spawning troops became 0, so that’s why it’s important to first try and hack the function in which the string is.

You can experiment and try modding different functions to see what works. Strings can be very useful in finding useful methods.

Remember to not hack any sub function that starts with 7, like sub_789219 they are useless. Also, any sub function that has many calls.

Some games may have many strings of the same keyword, you have to go one by one and see which one can be useful, try hacking them to see if it works or not.

Another easy way to hack using strings is to find an older version of the game that maybe was not obfuscated and then look for strings near the method we want to hack and then use it as reference and compare it to the newest version of the game.

Leave a Comment