FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Question about how to obtain decryption key for UE4 title. (https://fileforums.com/showthread.php?t=104376)

L33THAK0R 24-04-2021 09:04

Question about how to obtain decryption key for UE4 title.
 
Hi all,

Was looking into repacking/compressing Unreal Engine 4 titles (specifically Chernobylite), however it would seem that a decryption key is required to properly pack and unpack the archives. I'm not very sure as to where to find an index of decryption keys or how to properly extract/find the key for the title.

Another question I have is do all Unreal Engine 4 titles have encrypted archives or is it a case-by-case basis?

KaktoR 24-04-2021 11:18

AES finder
https://zenhax.com/viewtopic.php?f=9...p=56251#p56251

L33THAK0R 24-04-2021 12:21

Quote:

Originally Posted by KaktoR (Post 491531)

cheers man, you're a lifesaver! Real quick is it possible for some titles to not be encrypted? Chernobylite, when scanned with the AES finder app gives a "key.txt" output of "key not found, archives are probably not encrypted". Is it possible that the version of UE4 the title runs on isn't supported by the application? I only ask as it takes a fair while for my poor CPU to compress larger games (this one's a whopping 32gb!), and I'd rather not go through the pain again of finding my .arc file is useless. Thank you so much for that resource, it's honestly an incredible little tool!

Joe Forster/STA 24-04-2021 12:54

Quote:

Originally Posted by L33THAK0R (Post 491534)
Chernobylite, when scanned with the AES finder app gives a "key.txt" output of "key not found, archives are probably not encrypted".

I can confirm this, with AES finder 0.9f. The .pak files do seem to be encrypted, though. Yes, probably AES finder doesn't support this game (yet).

L33THAK0R 24-04-2021 13:01

Quote:

Originally Posted by Joe Forster/STA (Post 491535)
I can confirm this, with AES finder 0.9f. The .pak files do seem to be encrypted, though. Yes, probably AES finder doesn't support this game (yet).

Thank you for confirming Joe, thankfully there are many more UE4 games for me to try my hand at compressing! Fingers crossed a future version supports this title!

Joe Forster/STA 25-04-2021 01:50

Quote:

Originally Posted by L33THAK0R (Post 491536)
there are many more UE4 games for me to try my hand at compressing!

Do you have one for which AES finder can find the key? (I think it will find keys in 32-bit executables only.)

L33THAK0R 25-04-2021 05:38

Quote:

Originally Posted by Joe Forster/STA (Post 491538)
Do you have one for which AES finder can find the key? (I think it will find keys in 32-bit executables only.)

"Samurai Jack - Battle Through Time" which has the file name "SJGAME-Win64-Shipping.exe", (which I'm thinking is a 64-bit executable) generates the key "0x8E0A631576F6CBE340BF039C7C5BB8632E6FDC1082E019B 646B44B2846C96855". Currently attempting to compress some other games right now but I'll be sure to give it a shot in the coming days. Tried getting a key from the game "Satisfactory", but I'm having issues unpacking it with steamless, might ask over on the cs forums for help with that though, as I don't think its relevant here.

Joe Forster/STA 26-04-2021 01:49

According to this utility: UnrealPak, Chernobylite's files are not encrypted, only compressed (with ZLib). I could list and extract the contents of any of the PAK's. If I understand correctly, you have to specify the AES key in the "Crypto.json" file of this utility to be able to decrypt files; if the PAK "index" is also encrypted, you won't even be able to list the files inside without the proper key. So I think AES finder was right: there's no key in this game.

This also means that you won't be able to significantly compress the game as it is further because it's already compressed, unless you extract everything from all the PAK's. [...] I tried it: Chernobylite works fine it this unpacked form - I could load the last savegame in the base and start a mission - and the (unpacked) files don't seem to be encrypted. (You can't compress encrypted files much anyway.) I extracted the PAK's in this order: 0, 1, 3, 3optional, ..., 9, 10, ..., 15. About 124 thousand files, 40.6 gigabytes. The "ChernobylGame" and "Engine" directories extracted from the PAK's go to the root directory of the game, all other directories go under "ChernobylGame\Content".

Can you confirm that you cannot list of extract files from "Samurai Jack - Battle Through Time" with the same utility? Without explicitly specifying the AES key, that is.

Masquerade 26-04-2021 03:03

UnrealPAK is OK, however if you are extracting ue4 paks I recommend using quickbms.

If any key is needed, it prompts you at the start of the extraction process.

There's a script on Luigi's site, but there's also updated scripts which have better chance of working on cs forum (not entirely sure I'm allowed to link it for obvious reason). This thread contains long list of keys also.

@Joe you'll need to specify the key in order to decrypt/extract the pak - regardless if the full pak is encrypted or only Table of Contents.

All ue4 games run fine when their pak files are unpacked.

Joe Forster/STA 26-04-2021 06:36

Quote:

Originally Posted by Masquerade (Post 491564)
updated scripts which have better chance of working on cs forum (not entirely sure I'm allowed to link it for obvious reason). This thread contains long list of keys also.

Yes, I think we made maximum use of this topic on this forum. :)

L33THAK0R 26-04-2021 07:34

Quote:

Originally Posted by Joe Forster/STA (Post 491563)
According to this utility: UnrealPak, Chernobylite's files are not encrypted, only compressed (with ZLib). I could list and extract the contents of any of the PAK's. If I understand correctly, you have to specify the AES key in the "Crypto.json" file of this utility to be able to decrypt files; if the PAK "index" is also encrypted, you won't even be able to list the files inside without the proper key. So I think AES finder was right: there's no key in this game.

This also means that you won't be able to significantly compress the game as it is further because it's already compressed, unless you extract everything from all the PAK's. [...] I tried it: Chernobylite works fine it this unpacked form - I could load the last savegame in the base and start a mission - and the (unpacked) files don't seem to be encrypted. (You can't compress encrypted files much anyway.) I extracted the PAK's in this order: 0, 1, 3, 3optional, ..., 9, 10, ..., 15. About 124 thousand files, 40.6 gigabytes. The "ChernobylGame" and "Engine" directories extracted from the PAK's go to the root directory of the game, all other directories go under "ChernobylGame\Content".

Can you confirm that you cannot list of extract files from "Samurai Jack - Battle Through Time" with the same utility? Without explicitly specifying the AES key, that is.

Attempted to Extract the .pak (only 1 exists) for Samurai Jack, can confirm a key is required. When inputting a key (using BMS script) extraction is successful. Thank you so much for your help man!

L33THAK0R 26-04-2021 07:36

Quote:

Originally Posted by Masquerade (Post 491564)
UnrealPAK is OK, however if you are extracting ue4 paks I recommend using quickbms.

If any key is needed, it prompts you at the start of the extraction process.

There's a script on Luigi's site, but there's also updated scripts which have better chance of working on cs forum (not entirely sure I'm allowed to link it for obvious reason). This thread contains long list of keys also.

@Joe you'll need to specify the key in order to decrypt/extract the pak - regardless if the full pak is encrypted or only Table of Contents.

All ue4 games run fine when their pak files are unpacked.

I had no idea all ue4 games run fine with the .pak files unpacked! Definitely keen to experiment with this!

Masquerade 26-04-2021 07:55

When I say "all" there may be one or two exceptions, none that I can think of...

Before I figured out how to use XTool, I used to unpack the games :D

L33THAK0R 26-04-2021 08:50

Quote:

Originally Posted by Masquerade (Post 491569)
When I say "all" there may be one or two exceptions, none that I can think of...

Before I figured out how to use XTool, I used to unpack the games :D

For sure there are expectations, but I was under the assumption that every UE4 title would only be able to read the .pak files and not unpacked files, I'm always amazed to learn things I'd never even considered to be possible!

KaktoR 26-04-2021 09:33

Engine properties.

I think the unpacked files have to be in a folder which is exactly named as the corresponding pak file.

Masquerade 26-04-2021 11:00

Quote:

Originally Posted by KaktoR (Post 491573)
I think the unpacked files have to be in a folder which is exactly named as the corresponding pak file.

No, move the pak file to a separate folder outside of the game, unpack it, then move the unpacked files to the root of the game folder. The pak file contains stuff outside of the Content / Content\Paks folder.

dixen 26-04-2021 12:06

Quote:

Originally Posted by Joe Forster/STA (Post 491563)
According to this utility: UnrealPak, Chernobylite's files are not encrypted, only compressed (with ZLib). I could list and extract the contents of any of the PAK's. If I understand correctly, you have to specify the AES key in the "Crypto.json" file of this utility to be able to decrypt files; if the PAK "index" is also encrypted, you won't even be able to list the files inside without the proper key. So I think AES finder was right: there's no key in this game.

This also means that you won't be able to significantly compress the game as it is further because it's already compressed, unless you extract everything from all the PAK's. [...] I tried it: Chernobylite works fine it this unpacked form - I could load the last savegame in the base and start a mission - and the (unpacked) files don't seem to be encrypted. (You can't compress encrypted files much anyway.) I extracted the PAK's in this order: 0, 1, 3, 3optional, ..., 9, 10, ..., 15. About 124 thousand files, 40.6 gigabytes. The "ChernobylGame" and "Engine" directories extracted from the PAK's go to the root directory of the game, all other directories go under "ChernobylGame\Content".

Can you confirm that you cannot list of extract files from "Samurai Jack - Battle Through Time" with the same utility? Without explicitly specifying the AES key, that is.

This feature -create does not work in this version

Masquerade 26-04-2021 12:58

I am also having issues trying to make paks with the UnrealPak, I tried with Partisans.

L33THAK0R 26-04-2021 17:11

Quote:

Originally Posted by Joe Forster/STA (Post 491563)
According to this utility: UnrealPak, Chernobylite's files are not encrypted, only compressed (with ZLib). I could list and extract the contents of any of the PAK's. If I understand correctly, you have to specify the AES key in the "Crypto.json" file of this utility to be able to decrypt files; if the PAK "index" is also encrypted, you won't even be able to list the files inside without the proper key. So I think AES finder was right: there's no key in this game.

This also means that you won't be able to significantly compress the game as it is further because it's already compressed, unless you extract everything from all the PAK's. [...] I tried it: Chernobylite works fine it this unpacked form - I could load the last savegame in the base and start a mission - and the (unpacked) files don't seem to be encrypted. (You can't compress encrypted files much anyway.) I extracted the PAK's in this order: 0, 1, 3, 3optional, ..., 9, 10, ..., 15. About 124 thousand files, 40.6 gigabytes. The "ChernobylGame" and "Engine" directories extracted from the PAK's go to the root directory of the game, all other directories go under "ChernobylGame\Content".

Can you confirm that you cannot list of extract files from "Samurai Jack - Battle Through Time" with the same utility? Without explicitly specifying the AES key, that is.

Hi Joe sorry to ask but did you have any difficulties extracting PAK 0? I'm using the GOG release and always seem to hit a byte allocation error, with QuickBMS, and a series of errors when using UnrealPakTool, however I'm able to unpack all the other PAK files with no issues.

Joe Forster/STA 27-04-2021 01:22

Quote:

Originally Posted by L33THAK0R (Post 491579)
did you have any difficulties extracting PAK 0?

No difficulties here (GOG v33909) but I think I know what's wrong with UnrealPak: it handles file offsets and sizes as signed 32-bit (maximum of 2 GB) values.

When you extract files from PAK 0 (2967 MB), you get a line for each file like this:
Code:

LogPakFile: Display: Extracted "Engine/Content/EditorBlueprintResources/StandardMacros.uasset" to ".../Engine/Content/EditorBlueprintResources/StandardMacros.uasset" Offset 0.
And often offsets are negative numbers.

When extracting from PAK 1 (9128 MB), offsets obviously start from 0, go upwards to 2 GB, then switch to -2 GB and continue going upwards. This would suggest that files extracted from most of PAK 1 - above 4 GB - may be damaged - because they have been extracted from the wrong part of the PAK - but that's not the case: they don't seem to be damaged and you couldn't decompress damaged ZLib streams anyway without noticing. So, probably, only the display of file offsets is wrong but I can't tell as there's no source code: you can download the "source code" from GitHub but that's just another copy of the binaries. (?!)

PAK 0 is the only one whose size is between 2 GB (maximum of 32-bit signed integer) and 4 GB (32-bit unsigned integer); this may be why you're experiencing this error with it and only it. Look at the error message and you'll see that the file size is negative.

QuickBMS's error message looks similar: it's trying to allocate a negative number of bytes.

L33THAK0R 27-04-2021 03:27

Quote:

Originally Posted by Joe Forster/STA (Post 491585)
No difficulties here (GOG v33909) but I think I know what's wrong with UnrealPak: it handles file offsets and sizes as signed 32-bit (maximum of 2 GB) values.

When you extract files from PAK 0 (2967 MB), you get a line for each file like this:
Code:

LogPakFile: Display: Extracted "Engine/Content/EditorBlueprintResources/StandardMacros.uasset" to ".../Engine/Content/EditorBlueprintResources/StandardMacros.uasset" Offset 0.
And often offsets are negative numbers.

When extracting from PAK 1 (9128 MB), offsets obviously start from 0, go upwards to 2 GB, then switch to -2 GB and continue going upwards. This would suggest that files extracted from most of PAK 1 - above 4 GB - may be damaged - because they have been extracted from the wrong part of the PAK - but that's not the case: they don't seem to be damaged and you couldn't decompress damaged ZLib streams anyway without noticing. So, probably, only the display of file offsets is wrong but I can't tell as there's no source code: you can download the "source code" from GitHub but that's just another copy of the binaries. (?!)

PAK 0 is the only one whose size is between 2 GB (maximum of 32-bit signed integer) and 4 GB (32-bit unsigned integer); this may be why you're experiencing this error with it and only it. Look at the error message and you'll see that the file size is negative.

QuickBMS's error message looks similar: it's trying to allocate a negative number of bytes.

Huh I think I actually understood that, I'll try re-downloading the tools to see if the original source is the issue (outdated or an unstable version as I don't quite remember what version either were, and I didn't document this), it's still a puzzle to me why I was unsuccessful and you were, but I suppose sometimes shit breaks for reasons we cannot fathom, thank you for the explanation!

L33THAK0R 02-05-2021 21:21

1 Attachment(s)
UPDATE: Issue with Chernobylite pak0 has been resolved, thanks to a revision on the UE4.26 QuickBMS script, courtesy of spiritovod on the ZenHax forums. The attached file is the revised script for anyone looking.


All times are GMT -7. The time now is 12:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com