Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

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

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by tristo »

Thanks aluigi!

It works in umodel with -game=ue4.16

Image
TerryXX
Posts: 15
Joined: Sat Apr 30, 2016 9:01 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by TerryXX »

Hi Aluigi I tried to add that key (dragon ball z) on unreal_tournament_4.bms but quickbms generates a strange error: Last script line before the error pr that produced the error: 156 getarray key 10 z
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

I have updated the script, take a look at how to add new keys.
TerryXX
Posts: 15
Joined: Sat Apr 30, 2016 9:01 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by TerryXX »

Thx man now it works perfectly :)
nexuselite
Posts: 4
Joined: Thu Jul 28, 2016 3:16 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by nexuselite »

Thank you Aluigi.
blenux
Posts: 66
Joined: Wed Nov 15, 2017 1:30 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by blenux »

So has anyone been able to extract the Paragon Meshes/Animations?
marn
Posts: 6
Joined: Thu Aug 31, 2017 7:03 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by marn »

aluigi wrote:

Code: Select all

b9uW0RKNY91be8HN3Lemi68j6Xsi2l7fQJYsp5oR4al4C4c9kY5E0l90411l9P3L


Thank you for providing this. I am able to find where the key is within the EXE.
I am trying to use this information to get another encryption key for Sea of Thieves but am unable to decipher it.
I will upload / attach the EXE for you to review if you can.
https://drive.google.com/open?id=1zQ8lg ... zBHw1yQllm

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

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

@marn and everybody else
When you run the script (if you prefer with the -0 option to avoid extracting other files), press RETURN when it asks about the key.
It will show an error like the following

Code: Select all

Info:  algorithm   ?
       offset      11111111
       input size  0x22222222 0
       output size 0x33333333 0
Now create a new text file (a bms script) containing the following line:

Code: Select all

log "sample.dat" 0x11111111 0x22222222
where the 3 hexadecimal number must be replaced with those of your error just like I did with that example.
Then upload sample.dat, copy&paste the input/output size and upload the big game executable (that you already did).

*edit* fixed an error in the post
mq1r2
Posts: 6
Joined: Fri Feb 02, 2018 9:30 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by mq1r2 »

aluigi wrote:@marn and everybody else
When you run the script (if you prefer with the -0 option to avoid extracting other files), press RETURN when it asks about the key.
It will show an error like the following

Code: Select all

Info:  algorithm   ?
       offset      11111111
       input size  0x22222222 0
       output size 0x33333333 0
Now create a new text file (a bms script) containing the following line:

Code: Select all

log "sample.dat" 0x11111111 0x22222222
where the 3 hexadecimal number must be replaced with those of your error just like I did with that example.
Then upload sample.dat, copy&paste the input/output size and upload the big game executable (that you already did).

*edit* fixed an error in the post


Hey there,

Since the original poster never replied back, I've done it for him. You can find the sample.dat here along with the new updated exe here: https://vjoeyz.stackstorage.com/s/8ibz7x10V964e7y.
Input size: 0x00000000000007a0 1952
Output size: 0x000000000000223b 8763

I've also already found a few possible aes decryption keys, though they keep giving me the same error message.

Thank you in advance.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

If the algorithm is 1 (zlib, which wasn't visible in the copy&paste) then it's not a static key.
blenux
Posts: 66
Joined: Wed Nov 15, 2017 1:30 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by blenux »

Someone over at gildors forums believes the aes key is encoded or is a binary one know, not a text type.

AES key is no longer in plain text in the game executable. I extracted all viable AES Key Strings from it. So they probably encoded the key or switched to a binary key.
Those are the new Strings from the 2.4.0 executable: https://puu.sh/zfPpH/79e39fc38a.txt
Old Strings (which contained the key): https://puu.sh/zfPqe/77574c8f6d.txt

Post by haubna..


Both Fortnite and Paragon are using 4.19 engines also...
mq1r2
Posts: 6
Joined: Fri Feb 02, 2018 9:30 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by mq1r2 »

aluigi wrote:If the algorithm is 1 (zlib, which wasn't visible in the copy&paste) then it's not a static key.


Well I wasn't really able to confirm it being zlib with the comptype scanner, could they be using custom compression?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

It's written by quickbms as visible in the example I provided, the "?" placeholder at right of "algorithm"
mq1r2
Posts: 6
Joined: Fri Feb 02, 2018 9:30 am

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by mq1r2 »

aluigi wrote:It's written by quickbms as visible in the example I provided, the "?" placeholder at right of "algorithm"


Well it does try to unpack it using zlib(1), but does the

Code: Select all

the compressed zlib/deflate input is wrong or incomplete (-3)
- error mean the selected compression is invalid or that the encryption key was incorrect?
ifthatsthecase
Posts: 2
Joined: Wed Feb 07, 2018 2:33 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by ifthatsthecase »

So PUBG Test Server has now encrypted their paks, I tried using the AES keys with my limited knowledge but I didn't have any success unpacking them. How do I get the correct key or how can I extract the files nonetheless?
bizzfarts
Posts: 2
Joined: Wed Feb 07, 2018 2:20 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by bizzfarts »

PUBG current test server build uses encryption, key: 45DD15D6DD2DA50AEB71CE7A5284CF8EA498B2EC3D52B7E336F3EA0071CE44B3

edit: Moved to live server, same key.
Last edited by bizzfarts on Thu Feb 08, 2018 4:32 am, edited 1 time in total.
ifthatsthecase
Posts: 2
Joined: Wed Feb 07, 2018 2:33 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by ifthatsthecase »

bizzfarts wrote:PUBG current test server build uses encryption, key: 45DD15D6DD2DA50AEB71CE7A5284CF8EA498B2EC3D52B7E336F3EA0071CE44B3


I can't thank you enough! For the future, how would I go and find this key?

Edit: I'm dumb, thank you nevertheless :D
peupuppy
Posts: 4
Joined: Sun Jan 21, 2018 1:10 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by peupuppy »

How to use encryption key in command line? (quickbms.exe [Option with key?] file.bms file.pak Output]
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by aluigi »

There is no way from command-line.
You can add it directly to the script if you don't want to type it everytime, there is a section of the script at the beginning with various "putarray" commands, use the same putarray command at the beginning of the script (first line is ok) with your key.
The script accepts also binary keys like "\x01\x02\x03".
Example:
putarray 10 -1 "45DD15D6DD2DA50AEB71CE7A5284CF8EA498B2EC3D52B7E336F3EA0071CE44B3"
LearningGuy
Posts: 2
Joined: Sat Feb 10, 2018 8:49 pm

Re: Unreal Engine 4 pak-file Unpacker / unreal_tournament_4.bms [UE4 global topic]

Post by LearningGuy »

. i need help , i manage to decrypt the file and get the content inside , when i done modify the files , i repacked the file. but i cant get to encrypt again because i cant find right script / software