Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 36 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,46 @@
name: Build payload
name: CI

on:
pull_request:
paths:
- 'include/**'
- 'source/**'
- 'Makefile'
push:
paths:
- 'include/**'
- 'source/**'
- 'Makefile'
paths-ignore:
- "**/*.md"
- "**/*.txt"
pull_request:
paths-ignore:
- "**/*.md"
- "**/*.txt"
workflow_dispatch:

permissions:
id-token: write
attestations: write
contents: write
concurrency:
group: ${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
build:
payload-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt update
sudo apt install build-essential clang-18 lld-18 xxd yasm nasm

- name: Install toolchain
run: |
wget https://github.com/ps5-payload-dev/pacbrew-repo/releases/download/v0.29/ps5-payload-dev.tar.gz
sudo tar xf ps5-payload-dev.tar.gz -C /

- name: Build Payload
run: |
export PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk
make

- name: Upload Payload ELF
uses: actions/upload-artifact@v4
with:
name: ps5-self-decrypter
path: ./bin/ps5-self-decrypter.elf
if-no-files-found: error

# based on https://github.com/ps5-payload-dev/elfldr/blob/9198efdb02535e6647b00db6d9dac223874b1a87/.github/workflows/ci.yml#L23
- name: Checkout SDK
uses: actions/checkout@v3
with:
repository: ps5-payload-dev/sdk
path: sdk

- name: Setup SDK
working-directory: sdk
run: |
sudo apt update
sudo apt install xxd clang-15 lld-15
make DESTDIR=${{ runner.tool_cache }}/ps5-payload-sdk clean install
echo PS5_PAYLOAD_SDK=${{ runner.tool_cache }}/ps5-payload-sdk >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v3

- name: Build
run: make

- name: Attest
uses: actions/attest-build-provenance@v1
continue-on-error: true # this will fail if the repo is private
with:
subject-path: ./bin/ps5-self-decrypter.elf

- name: Upload
uses: actions/upload-artifact@v4
with:
name: ps5-self-decrypter
path: ./bin/ps5-self-decrypter.elf
if-no-files-found: error
53 changes: 53 additions & 0 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,59 @@ int main()
offsets.offset_datacave_1 = 0x5060000;
offsets.offset_datacave_2 = 0x5064000;
break;
case 0x8000000:
case 0x8200000:
case 0x8400000:
case 0x8600000:
offsets.offset_authmgr_handle = 0x0E203C0;
offsets.offset_sbl_mb_mtx = 0x27FF888;
offsets.offset_mailbox_base = 0x27FF890;
offsets.offset_sbl_sxlock = 0x27FF898;
offsets.offset_mailbox_flags = 0x2CEA820;
offsets.offset_mailbox_meta = 0x2CEA5C0;
offsets.offset_dmpml4i = 0x2E48AE4;
offsets.offset_dmpdpi = 0x2E48AE8;
offsets.offset_pml4pml4i = 0x2E4779C;
offsets.offset_g_message_id = 0x4270000;
offsets.offset_datacave_1 = 0x5060000;
offsets.offset_datacave_2 = 0x5064000;
break;
case 0x9000000:
case 0x9200000:
case 0x9400000:
case 0x9600000:
offsets.offset_authmgr_handle = 0xDB8D60;
offsets.offset_sbl_mb_mtx = 0x26E71F8;
offsets.offset_mailbox_base = 0x26E7200;
offsets.offset_sbl_sxlock = 0x26E7208;
offsets.offset_mailbox_flags = 0x2BCA860;
offsets.offset_mailbox_meta = 0x2BCA600;
offsets.offset_dmpml4i = 0x2D28E14;
offsets.offset_dmpdpi = 0x2D28E18;
offsets.offset_pml4pml4i = 0x2D279CC;
offsets.offset_g_message_id = 0x4270000;
offsets.offset_datacave_1 = 0x5060000;
offsets.offset_datacave_2 = 0x5064000;
break;
case 0x10000000:
case 0x10010000:
case 0x10200000:
case 0x10400000:
case 0x10600000:
offsets.offset_authmgr_handle = 0x0DB8DF0;
offsets.offset_sbl_mb_mtx = 0x26F71F8;
offsets.offset_mailbox_base = 0x26F7200;
offsets.offset_sbl_sxlock = 0x26F7208;
offsets.offset_mailbox_flags = 0x2BEE860;
offsets.offset_mailbox_meta = 0x2BEE600;
offsets.offset_dmpml4i = 0x2CF1194;
offsets.offset_dmpdpi = 0x2CF1198;
offsets.offset_pml4pml4i = 0x2CEFD4C;
offsets.offset_g_message_id = 0x4270000;
offsets.offset_datacave_1 = 0x5060000;
offsets.offset_datacave_2 = 0x5064000;
break;

default:
SOCK_LOG(sock, "[!] unsupported firmware, dumping then bailing!\n");
char *dump_buf = mmap(NULL, 0x7800 * 0x1000, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
Expand Down