Can someone help me decrypt a Chinese game?

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
LeonNeol
Posts: 6
Joined: Fri Sep 22, 2017 3:35 pm

Can someone help me decrypt a Chinese game?

Post by LeonNeol »

I downloaded the apk and unpack it, all the assets are encrypted in someway. There's a bunch of so file in \lib\x86 but the one I think that is most likely to contain decryption method is libtpnsSecurity.so. I opened it in IDA and found some functions:
Capture.PNG

This is as far as I can go :(

The game may use TEA or XXTEA
I have no experience in the matter so I hope someone can help me. I attached a zip file which contains the so files, some lua files and pngs

Note: The game server actually leaked its Directory Listing and I was able to grab on some php files, one of them is xxtea.php which is just the source code for the algorithm, others are just functions with no clues, they are also added in zip files.

Thank you

files.zip https://www.dropbox.com/s/ohbrsbp2j7obrq0/files.zip?dl=0
LokiReborn
Posts: 190
Joined: Fri Aug 26, 2016 3:11 pm

Re: Can someone help me decrypt a Chinese game?

Post by LokiReborn »

LeonNeol wrote:I downloaded the apk and unpack it, all the assets are encrypted in someway. There's a bunch of so file in \lib\x86 but the one I think that is most likely to contain decryption method is libtpnsSecurity.so. I opened it in IDA and found some functions:Capture.PNG
This is as far as I can go :(

The game may use TEA or XXTEA
I have no experience in the matter so I hope someone can help me. I attached a zip file which contains the so files, some lua files and pngs

Note: The game server actually leaked its Directory Listing and I was able to grab on some php files, one of them is xxtea.php which is just the source code for the algorithm, others are just functions with no clues, they are also added in zip files.

Thank you

files.zip https://www.dropbox.com/s/ohbrsbp2j7obrq0/files.zip?dl=0


The SO files are just libraries, so while it may be used to decrypt the files it's also unlikely for the key to be in the library itself. that would come from the main executable calling the library w/ the key as a parameter.
LeonNeol
Posts: 6
Joined: Fri Sep 22, 2017 3:35 pm

Re: Can someone help me decrypt a Chinese game?

Post by LeonNeol »

LokiReborn wrote:
LeonNeol wrote:I downloaded the apk and unpack it, all the assets are encrypted in someway. There's a bunch of so file in \lib\x86 but the one I think that is most likely to contain decryption method is libtpnsSecurity.so. I opened it in IDA and found some functions:Capture.PNG
This is as far as I can go :(

The game may use TEA or XXTEA
I have no experience in the matter so I hope someone can help me. I attached a zip file which contains the so files, some lua files and pngs

Note: The game server actually leaked its Directory Listing and I was able to grab on some php files, one of them is xxtea.php which is just the source code for the algorithm, others are just functions with no clues, they are also added in zip files.

Thank you

files.zip https://www.dropbox.com/s/ohbrsbp2j7obrq0/files.zip?dl=0


The SO files are just libraries, so while it may be used to decrypt the files it's also unlikely for the key to be in the library itself. that would come from the main executable calling the library w/ the key as a parameter.


I dont think there are any executables in an android app. As far as my knowledge go, logics and stuff are all inside the so files.