11. december 2015

How to mod obfuscated DLL file (Unity3D games)

[​IMG]

The Unity3D engine now have an ability to remove the function names, encrypt the code and put the encrypted function in the A section, and make the DLL into a obfuscated DLL file. This is similar to IDA string hacking, but now we try DLL string hacking

The DLL i'm modding was ReRave. Coins is visual, and not possible to hack, but it is useful to learn modding obfuscated DLL file


1. Open the APK file with Winrar, and extract the Managed file from the APK file.

[​IMG]


3. Open the Reflector. Click "Tools" -> "Add-Ins..."

[​IMG]

4. Click "+" button

[​IMG]

5. Go to the path where you had downloaded the "Reflector.CodeSearch.dll" file, and click "Open"

[​IMG]

6. Click "Close", close the Reflector, and open it again

[​IMG]

7. You will see the Code Search icon on the toolbar. Click in it, or click "Tools" -> "Code Search"

[​IMG]

8. Open the "Assembly-Csharp.dll" file

[​IMG]

9. IMPORTANT! Make sure the "Assembly-Csharp.dll" file is selected. Select the DLL else where will give you the wrong search results

[​IMG]

10. Now search the string you want to find. Instead, "coin", search what you want

[​IMG]
[​IMG]

11. After searching, you will see the result. Ignore the void functions, and find the useful function (in Int32, Int64, double, float, etc.) you want to mod.

I was looking for coins function in UInt32 (Same as Int32)

[​IMG]

12. When you open it, you will see the code above.

In this screenshot, I found a "coins" string

[​IMG]

13. Click the Reflexil icon on the toolbar, or click "Tools" -> "Reflexil 2.0"

[​IMG]
[​IMG]

14. Right click and select "Delete all"

[​IMG]

15. Right click and select "Create new"

[​IMG]

16. Do the following:

OpCode: ldc.i4
Operand type: Int32
Operand: 999999

and click "Append"

[​IMG]

17. Right click and select "Create new"

18. In OpCode, select "ret" and click "Insert after selection"

[​IMG]

19. Your instruction should look like this

[​IMG]

20. Save your DLL

[​IMG]

21. Replace the DLL file in the APK file, run it, and enjoy

[​IMG]

I repeat, coins is visual and not possible to hack in ReRave game

Note: Some function does not have the strings in it. If you can't find the function you are looking for, try search another keywords. You can search for Player or SaveData classes, and try mod the function (in Int32, Int64, double, float, etc.) one by one.

Credit: iAndroHacker

0 kommentarer:

Send en kommentar