From f3d5dd8c377ff44f92faa77c6a494f2f457d002f Mon Sep 17 00:00:00 2001 From: deepkicks <77412763+deepkicks@users.noreply.github.com> Date: Thu, 15 Oct 2026 03:31:35 -0500 Subject: [PATCH] Add files via upload Step by step guide from A-Z --- EXTRACTION_GUIDE.md | 264 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 EXTRACTION_GUIDE.md diff --git a/EXTRACTION_GUIDE.md b/EXTRACTION_GUIDE.md new file mode 100644 index 0000000..f346f1d --- /dev/null +++ b/EXTRACTION_GUIDE.md @@ -0,0 +1,264 @@ +# PUP Container Key Extraction — Step-by-Step Guide + +This guide walks through the full process of extracting the missing PUP container decryption key from a jailbroken PS5 on FW 13.60 or below. The person with console access needs to run the payload at most twice. Everything else happens on PC. + +**Risk level: Zero.** The payload is completely read-only — no writes to kernel, hardware, flash, or NVS. See the FAQ at the bottom. + +--- + +## Phase 1: On the PS5 (the person with console access) + +### Step 1 — Set up the jailbreak + +Boot the PS5 on FW 13.60. Open the browser, navigate to the exploit host (e.g. the etaHEN page), run the Relapse kernel exploit, then Byepervisor Reborn. The console now has kernel R/W. + +### Step 2 — Compile the payload + +On a PC, cross-compile `ps5_key_extract.c` for FreeBSD 11 amd64: + +```bash +clang -target x86_64-unknown-freebsd11 -o ps5_key_extract ps5_key_extract.c +``` + +You'll need to link your framework's `kernel_read64`, `kernel_read32`, and `kernel_copyout` implementations. These are typically provided by the payload SDK (e.g. etaHEN/GoldHEN SDK). + +### Step 3 — Load and run the payload + +Send the compiled binary to the PS5 via the payload loader (usually TCP port 9020): + +```bash +nc 192.168.1.XX 9020 < ps5_key_extract +``` + +The payload runs all 5 approaches automatically. Console screen or log output shows progress. Takes about 10-30 seconds. + +### Step 4 — Transfer the dump file + +Use FTP (etaHEN enables FTP on port 2121): + +```bash +ftp 192.168.1.XX 2121 +> get /data/pup_key_dump.bin +> bye +``` + +The file is typically 50-200KB depending on how many sections were captured. Send this file to whoever is doing the PC-side analysis. + +--- + +## Phase 2: First Analysis Pass (on PC) + +### Step 5 — Run the analyzer + +```bash +pip install -r requirements.txt +python analyze_dump.py pup_key_dump.bin --pup14 PS5UPDATE14.00.PUP --pup14_1 PS5UPDATE14.10.PUP +``` + +Example output: + +``` +[+] Dump version 2, 8 sections + Section 0: CCP LSB Key Slots, 4096 bytes at offset 0x440 + Section 1: CCP Queue Registers, 220 bytes at offset 0x1440 + Section 2: cdevsw Struct, 128 bytes at offset 0x1518 + Section 3: d_ioctl Handler Code, 16384 bytes at offset 0x1598 + Section 4: d_open Handler Code, 16384 bytes at offset 0x5598 + ... + +--- CCP Queue Registers --- + Queue 0: + PUBLIC_MASK_LO = 0x0000ffff + PRIVATE_MASK_LO = 0x0000ff00 + CPU-readable slots mask: 0x00000000000000ff + [+] Slot 0 is CPU-readable + [+] Slot 1 is CPU-readable + ... + +--- cdevsw Struct (pup_update0) --- + +0x10 d_open = 0xffffffff8234a000 + +0x30 d_ioctl = 0xffffffff8234b200 + +[*] Extracted 47 unique key candidates +[*] Testing 47 candidates against 2 PUP files... +``` + +**If the output says `KEY FOUND`** — skip to Phase 4. You're done. + +**If no match (most likely)** — continue to Phase 3. This is expected — it means the key is in a hardware-protected CCP slot or loaded from an address we need to find by reading the handler code. + +--- + +## Phase 3: Reverse Engineer the Handler (on PC) + +This is where the chained strategy pays off. The dump contains 16KB of the raw x86-64 code that implements `DecryptPupHeader`. We disassemble it to find where the key comes from. + +### Step 6 — Extract the handler binaries + +Save this as `quick_extract.py` and run it: + +```python +import struct +from pathlib import Path + +data = Path("pup_key_dump.bin").read_bytes() +magic, ver, count = struct.unpack_from("