shadPKG is a C++ tool designed to derive encryption keys and extract content from PlayStation 4 PKG files.
shadPKG is an advanced utility for analyzing, decrypting, and extracting PS4 PKG files, including games, updates, patches, DLCs, and homebrew packages.
It focuses on correctness, performance, and transparency, providing detailed logs and clear insight into the internal structure of PKG archives.
- Full PKG structure analysis
- Automatic derivation and handling of encryption keys
- Decryption of protected data
- Complete file and directory extraction
- Support for retail, update, DLC, and homebrew PKGs
- Multi-threaded extraction with progress reporting
ShadPKG is actively maintained and improved over time. If you find it useful and want to support continued development, you can contribute via Ko-fi.
-
OS: Windows 10 / 11 (x64)
-
Compiler: Visual Studio 2022 (Build Tools or full IDE)
-
Python: 3.10 or newer (required for
build.py) -
Dependencies: Conan 2.x
- Used for managing libraries such as Zlib, Crypto++, and others
git clone https://github.com/seregonwar/ShadPKG.git
cd ShadPKGpip install conanconan install . --build=missingRun the build script from the project root:
python build.pyThe compiled binaries will be located in:
build/Release/
From Command Prompt or PowerShell:
shadPKG.exe <path_to_pkg> <output_directory>
shadPKG.exe "C:\GAMES\CUSA12345.pkg" C:\extracted\CUSA12345
-
All files and directories contained in the PKG are extracted to the target folder
-
Progress is displayed in real time
-
A detailed execution log is printed to the console and saved to
debug_log.txt -
Unknown or unnamed entries are exported as:
entry_0x<ID>.bin
- Multi-threaded extraction for improved performance
- Automatic key handling and decryption
- Robust support for different PKG types
- Persistent logging for debugging and analysis
- Safe path handling and error resilience
- Some PKG types (especially patches or updates) may intentionally omit certain files
- If extraction issues occur, consult the generated
debug_log.txtbefore reporting problems
A detailed breakdown of the PKG and PFS formats, including cryptographic flow, data structures, and decryption logic, is available here:
📄 Technical Analysis of the Decryption Process for PlayStation 4 PKG and PFS File Formats
- Based on reverse engineering efforts from the PS4 research community
- Developed and maintained by seregonwar
- Licensed under LGPL-2.0-or-later