As promised, following his
4.55 Custom / Repacked PS4 Package (PKG) Files demo video and
recent updates today PlayStation 4 developer
@flatz made available on
Twitter his
method to handle PS4 Fake PKGs and SELF / FSELF write-up so that
PS4 Scene developers can backport and make use of it with the recent
4.05 Kernel Exploit and
4.05 Game Dumps!
Check it out below, or download it from here:
write-up.zip (415 KB)
Fake PKGs + SELFs: Table of Contents
- Overview
- Fake SELFs
2.1. Kernel code
2.2. Testing
- Fake PKGs
3.1. Toolchain
3.2. Modding of Shellcore
3.3. Kernel code
- Defines, structures and helper functions
- Package repacking issues
5.1. SFO file parsing
5.2. PlayGo chunk builder
5.3. GP4 project generation
5.4. Some of PKG/PFS stuff
- Conclusion
Overview
My original intent was to implement a minimalistic strategy that could lead to running stuff like fselfs and debug pkgs. I don't like methods that do a lot of patching and involve a lot of manual work, so I prefer to use built-in functionality whenever possible. While the result is not as minimalistic, it is effective. As I've said multiple times, this stuff can be ported to any firmware.
So here's the problems we have:
- Executable files including SELFs/SPRXs/SEXEs/SDLLs are signed and encrypted. While their fake versions are not signed and encrypted, we usually can't use them on a retail console due to restrictions that are put in place by the auth manager that loads them (a secure module, or SM, that is running by SAMU, a secure co-processor that is embedded into our AMD's APU). The (S)ELF loader from the kernel use SAMU calls for everything crypto-related...