MasterxMaster: Please help (Encrypted *.PAKs) -- progress inside

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
droitd
Posts: 2
Joined: Tue Jul 04, 2017 10:15 pm

MasterxMaster: Please help (Encrypted *.PAKs) -- progress inside

Post by droitd »

This game was recently released in the west. Has some nice sounds/art to go with it, but its assets have been stashed away behind encrypted .PAK files.
The good news is that some progress towards cracking the used encryption (XOR+AES) has been made previously on this forum, back when the game was out in Korea.
Previous Thread: viewtopic.php?t=372.

At the bottom of said thread you'll find a test.zip file, which contains what we have so far: a WIP quickbms script (courtesy of our beloved admin), and the updatekey files created by another user.
Download: download/file.php?id=201

Any help towards putting the missing pieces of the puzzle together so that one can access & extract files from this game's .pak files would be very greatly appreciated.
I have attached a sample .PAK from the game with the active XOR/AES encryption below in case anyone wants to give it a whirl (~2mb):
MxM_SampleFile.pak

Site: http://www.playmxm.com
Client: http://download.playmxm.com/
Last edited by droitd on Fri Jul 14, 2017 3:23 pm, edited 5 times in total.
droitd
Posts: 2
Joined: Tue Jul 04, 2017 10:15 pm

Re: MasterxMaster - please help (Encrypted *.PAKs)

Post by droitd »

One week later, a careful bump.

I have added a sample .pak from the game to the first post, which I probably should have done right away in case anyone wanted to try their hand at cracking it.
Now as for some field testing:

Using the quickbms script found in the other thread as it is will give the following error:
Image

Replacing "PAKA" by "PAKW" in the script gives one of two possibilities:
-If the amount of cycles is an uneven number (1/3/5/x) it will crash with the following message:
Image

Using an even number for cycles works, but it will just produce an (empty) 1kb 0000000.dat file since the decryption key does not match:
Image
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: MasterxMaster: Please help (Encrypted *.PAKs) -- progress inside

Post by aluigi »

The problem is that here there are 3 unknown fields: master key, final key and number of cycles.
It's not possible to "guess" or brute force them so: you have them or you don't have them.
If the algorithm is the same, someone with the game, free time and some desire can probably do the job by locating the encryption function in the game (using the tables of constants) and then locating the keys and cycle.