ShadPKG
A tool for deriving PKG packet encryption keys for ps4 written in c++
Install / Use
/learn @seregonwar/ShadPKGREADME
shadPKG
<img src="https://img.shields.io/github/downloads/seregonwar/ShadPKG/total?style=flat-square&color=success" alt="Downloads"/><br/>
shadPKG is a C++ tool designed to derive encryption keys and extract content from PlayStation 4 PKG files.
Overview
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.
Key capabilities:
- 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
☕ Support Development
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.
System Requirements
-
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
Build Instructions
1. Clone the repository
git clone https://github.com/seregonwar/ShadPKG.git
cd ShadPKG
2. Install Conan (if missing)
pip install conan
3. Install dependencies
conan install . --build=missing
4. Build the project
Run the build script from the project root:
python build.py
The compiled binaries will be located in:
build/Release/
Usage
From Command Prompt or PowerShell:
shadPKG.exe <path_to_pkg> <output_directory>
Example:
shadPKG.exe "C:\GAMES\CUSA12345.pkg" C:\extracted\CUSA12345
Behavior:
-
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
Main Features
- 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
Notes & Limitations
- Some PKG types (especially patches or updates) may intentionally omit certain files
- If extraction issues occur, consult the generated
debug_log.txtbefore reporting problems
Technical Documentation
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
Credits & License
- Based on reverse engineering and community documentation.
- Licensed under MIT.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
