1

i'm trying to mod a game named : DDTank Mobile, which is on both Android & IOS. This game runs on cocos2d engine, the thing is the lua files are encrypted. I read somewhere to look for 'sign' at the beginning of each lua files, but this is what i find

MEGameStartup.lua

enter image description here

The sign seems to be ��+ in utf-8. In hex it is : F8 8B 2B

I found that you can use IDA to look into the Binaries of the SO File and Find the encryption key in a function called ApplicationDidFinishLaunching, so I tried not knowing what to do. Here's the pseudo-code from IDA: https://pastebin.com/T0RxB6ML

In this function, there is a call to StartConfig::enter and inside it there is this function used XXTeaEncrypt::setXXTeaKeyAndSign, here's the pseudo-code from IDA: https://pastebin.com/SjdvsKya

Link to the APK : https://m.apkpure.com/ddtank-mobile/com.wan.ddten/ Some Lua files + lib (SO) files : https://mega.nz/file/LJ0EXKiQ#aRLpaed4LXV0fSg9AK9-5-kZYYvOoHo49ytbDV6dMuI

2
  • I tried looking at all .lua files, however i may have done it wrong but i couldn't find any useful comments that would link me up to original file version. I also tried getting the oldest version of the game available on apkpure, to see changes, unfortunately they are obfuscated+encrypted. As for for the link you've sent, it might be useful in the future but sadly i cant find the xxxtea decryption key. Im new to this domain Commented Dec 22, 2022 at 10:41
  • my bad for using wrong words Commented Dec 22, 2022 at 12:29

1 Answer 1

1

Update on this :

I managed to get through the obfuscated lua files by hooking the luaL_loadbuffer exported function from libengine.so using frida, and managed to dump the game code.

After that i built a lua wrapper around the game, which would execute my lua code. Short after this, I realized that this game has plenty of stuff server side, so I couldnt do anything 'edgy' like changing my fightpower, diamonds, tickets, even if I was to send some hacky net message, server would check, i mean fair enough.

I tried bypassing the payment request, that i saw while looking through lua files (PayCallBackModelEntity.lua)

Anyways, I think i'm dropping this, can't do much, was a great opportunity for me to learn though :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.