xxtea crypted csv file [word charm / cocos2d]

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
pravda
Posts: 29
Joined: Sat Dec 09, 2017 10:53 am

xxtea crypted csv file [word charm / cocos2d]

Post by pravda »

Hi all,

Thanks to luigi for his great work :)

i've tried many script to decrypt this file but nothing.

Any help will be really great.

Regards.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: xxtea crypted csv file

Post by aluigi »

Name of the game/software?
pravda
Posts: 29
Joined: Sat Dec 09, 2017 10:53 am

Re: xxtea crypted csv file

Post by pravda »

Hi,

Thank you very much for your quick response.

the game is word charm , built with coco2d.

Need the apk ?

Regards.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: xxtea crypted csv file [word charm / coco2d]

Post by aluigi »

If someone will work on that, he needs at least the lib that contains the xxtea key
pravda
Posts: 29
Joined: Sat Dec 09, 2017 10:53 am

Re: xxtea crypted csv file [word charm / cocos2d]

Post by pravda »

Hi ,

i upload the libgame.so to ida and search xxtea and found this :

_DWORD __fastcall cocos2d::CCLuaStack::setXXTEAKeyAndSign(size_t size, const char *, int, const char *, int)
EXPORT _ZN7cocos2d10CCLuaStack18setXXTEAKeyAndSignEPKciS2_i
ZN7cocos2d10CCLuaStack18setXXTEAKeyAndSignEPKciS2_i

I don't know how to use it.

Luigi, did you need the libgame.so file ?

Thanks for help.

Regards.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: xxtea crypted csv file [word charm / cocos2d]

Post by aluigi »

I guess the key is "8VVTJ-UC2R1" but the xxtea_decrypt functions available online fail miserably for some unknown reasons, didn't investigate.
pravda
Posts: 29
Joined: Sat Dec 09, 2017 10:53 am

Re: xxtea crypted csv file [word charm / cocos2d]

Post by pravda »

Hi,

Thank you for your help.

did you have any script ( quickbms ) that can be used to decrypt this ?

Regards
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: xxtea crypted csv file [word charm / cocos2d]

Post by aluigi »

no
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: xxtea crypted csv file [word charm / cocos2d]

Post by aluigi »

pravda
Posts: 29
Joined: Sat Dec 09, 2017 10:53 am

Re: xxtea crypted csv file [word charm / cocos2d]

Post by pravda »

Hi man,

Thank you very much . it work like a charm :)
jessijung
Posts: 20
Joined: Thu Aug 23, 2018 5:44 pm

Re: xxtea crypted csv file [word charm / cocos2d]

Post by jessijung »

aluigi wrote:http://aluigi.org/bms/word_charm.bms

# Word Charm XXTEA decrypter
# script for QuickBMS http://quickbms.aluigi.org

set KEY string "8VVTJ-UC2R1"
encryption xxtea KEY "0x9e3779b9 0" 0 16 # cocos2d

idstring "XXTEA"
savepos OFFSET
get SIZE asize
math SIZE - OFFSET
get NAME filename
log NAME OFFSET SIZE

how to encrypt it again? thank so much
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: xxtea crypted csv file [word charm / cocos2d]

Post by aluigi »

Code: Select all

get NAME filename
string NAME + ".encrypt"
set MEMORY_FILE string "XXTEA"
log NAME 0 5 MEMORY_FILE
set KEY string "8VVTJ-UC2R1"
encryption xxtea KEY "0x9e3779b9 0" 1 16    # cocos2d
get SIZE asize
append
log NAME OFFSET SIZE
append