Help me decrypting an XXTEA encrypted file

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Fibble
Posts: 4
Joined: Wed Oct 16, 2019 3:27 pm

Help me decrypting an XXTEA encrypted file

Post by Fibble »

So I got a little problem with decryption a XXTEA encrypted zip file (cocos2d-lua).
I do know the key and the sign but i cant get ANY XXTEA decryption to work for me.

Decryption key (used by the game) is:

Code: Select all

wW4Dm]fu%kGK}2nG

The Sign is:

Code: Select all

MB-.Z'F*fNJz[9Rr 


I simply cant decrypt the file :c (and encrypt it back!)
Last edited by Fibble on Wed Oct 16, 2019 3:49 pm, edited 1 time in total.
Fibble
Posts: 4
Joined: Wed Oct 16, 2019 3:27 pm

Re: Help he decrypting an XXTEA encrypted file

Post by Fibble »

The game name itself is
Trials of Heroes
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: Help me decrypting an XXTEA encrypted file

Post by atom0s »

Where are you pulling the decryption key from? It's not stored in the .so files from the look of it and not in the .dex either.
Fibble
Posts: 4
Joined: Wed Oct 16, 2019 3:27 pm

Re: Help me decrypting an XXTEA encrypted file

Post by Fibble »

I decompiled and debugged the game in IDA (+- Breakpoints to get the key).
I do also have the decrypted *.zip file. Just need to acutally overwrite the encrypted one :/
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: Help me decrypting an XXTEA encrypted file

Post by atom0s »

Fibble wrote:I decompiled and debugged the game in IDA (+- Breakpoints to get the key).
I do also have the decrypted *.zip file. Just need to acutally overwrite the encrypted one :/


New to Android debugging personally, do you have a specific guide/site you used to get things setup and working for this? Everything I've tried so far doesn't seem to work, and refuses to let me debug.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Help me decrypting an XXTEA encrypted file

Post by Ekey »

atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: Help me decrypting an XXTEA encrypted file

Post by atom0s »



Yea, I can't even install apps to the emulator. Just fails/errors every time. Also, I can't install IDA's server on my actual phone either since it's not rooted.
atom0s
Posts: 250
Joined: Sat Dec 27, 2014 8:49 pm

Re: Help me decrypting an XXTEA encrypted file

Post by atom0s »

Actually think I just noticed why. Didn't realize the default emulators AVDs are using x86. The apps I was testing with were expecting arm64-v8a or armeabi-v7a. Downloading the other system stuff and redoing the AVDs and will see if that fixes the emulator problems. Hopefully, IDA's remote server stuff will run on the emulators as well.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help me decrypting an XXTEA encrypted file

Post by aluigi »

Tried many combos of xxtea and xtea but all the results are a failure.
Quite normal since there are different settings of xxtea so can't do anything without the right parameters
Fibble
Posts: 4
Joined: Wed Oct 16, 2019 3:27 pm

Re: Help me decrypting an XXTEA encrypted file

Post by Fibble »

aluigi wrote:Tried many combos of xxtea and xtea but all the results are a failure.
Quite normal since there are different settings of xxtea so can't do anything without the right parameters


Well kinda guessed that :/
Thanks anyways for the try aluigi :)
rai88kau
Posts: 1
Joined: Thu Apr 02, 2020 4:14 am

Re: Help me decrypting an XXTEA encrypted file

Post by rai88kau »

Fibble wrote:I decompiled and debugged the game in IDA (+- Breakpoints to get the key).
I do also have the decrypted *.zip file. Just need to acutally overwrite the encrypted one :/


can you tell me, how to did this?
thank you so much