# github-suriya/ps5-jb architecture

> Architecture diagram of the GitHub repository github-suriya/ps5-jb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/github-suriya/ps5-jb
- Repository: https://github.com/github-suriya/ps5-jb

## Overview

This repository implements a browser-triggered PS5 jailbreak exploit for firmware 7.00–13.60. The user opens the exploit site on the console; the runtime establishes a WebKit memory primitive, prepares a ROP worker, runs the kernel exploit, then can start an ELF loader and send optional payloads. The README documents the exploit-chain stages and payload workflow. Source excerpts show the main orchestration and kernel-to-payload handoff; some detailed wiring, including firmware selection and ROP setup, is not fully visible, so those links are omitted or marked unverified.

Main entry points: [`src/relapse_exploit.js`](https://github.com/github-suriya/ps5-jb/blob/main/src/relapse_exploit.js) (Kernel exploit), [`src/site.js`](https://github.com/github-suriya/ps5-jb/blob/main/src/site.js) (Exploit site), [`src/main.js`](https://github.com/github-suriya/ps5-jb/blob/main/src/main.js) (Exploit orchestration), [`src/utils/mem.js`](https://github.com/github-suriya/ps5-jb/blob/main/src/utils/mem.js) (Memory access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser Exploit"]
  node_site["Exploit site<br/>[site.js]"]
  node_webkit["WebKit primitive<br/>[webkit.js]"]
  node_memory["Memory access<br/>[mem.js]"]
  node_int64["64-bit values<br/>[int64.js]"]
  node_firmware["Firmware checks<br/>[firmware.js]"]
  node_offsets["Firmware offsets"]
end

subgraph group_kernel["Kernel Escalation"]
  node_main["Exploit orchestration<br/>[main.js]"]
  node_rop["ROP worker<br/>[rop.js]"]
  node_kernelx["Kernel exploit<br/>[relapse_exploit.js]"]
end

subgraph group_payloads["Payload Delivery"]
  node_kexp["Kernel payload setup<br/>[kexp.js]"]
  node_payloadfiles["Payload files"]
  node_elfldr(("ELF loader"))
end

node_ps5user(("PS5 user"))

node_ps5user -->|"opens"| node_site
node_site -->|"establishes primitive"| node_webkit
node_site -->|"installs access"| node_memory
node_memory -->|"uses values"| node_int64
node_site -->|"checks support"| node_firmware
node_main -->|"runs exploit"| node_kernelx
node_main -.->|"creates worker"| node_rop
node_kernelx -->|"uses addresses"| node_int64
node_kernelx -->|"starts payload setup"| node_kexp
node_kernelx -.->|"reads firmware offsets"| node_offsets
node_main -->|"passes primitive and chain"| node_kernelx
node_ps5user -->|"provides payloads"| node_payloadfiles
node_elfldr -->|"receives payloads"| node_payloadfiles
node_ps5user -->|"loads payloads"| node_elfldr

click node_site "https://github.com/github-suriya/ps5-jb/blob/main/src/site.js"
click node_webkit "https://github.com/github-suriya/ps5-jb/blob/main/src/webkit.js"
click node_memory "https://github.com/github-suriya/ps5-jb/blob/main/src/utils/mem.js"
click node_int64 "https://github.com/github-suriya/ps5-jb/blob/main/src/utils/int64.js"
click node_firmware "https://github.com/github-suriya/ps5-jb/blob/main/src/firmware.js"
click node_offsets "https://github.com/github-suriya/ps5-jb/tree/main/offsets"
click node_main "https://github.com/github-suriya/ps5-jb/blob/main/src/main.js"
click node_rop "https://github.com/github-suriya/ps5-jb/blob/main/src/rop.js"
click node_kernelx "https://github.com/github-suriya/ps5-jb/blob/main/src/relapse_exploit.js"
click node_kexp "https://github.com/github-suriya/ps5-jb/blob/main/src/kexp.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_site,node_webkit,node_memory,node_int64,node_firmware,node_offsets,node_ps5user toneBlue
class node_main,node_rop,node_kernelx toneAmber
class node_kexp,node_payloadfiles,node_elfldr toneMint
```

## Components

### Browser Exploit

- [Exploit site](https://github.com/github-suriya/ps5-jb/blob/main/src/site.js): `src/site.js`
- [WebKit primitive](https://github.com/github-suriya/ps5-jb/blob/main/src/webkit.js): `src/webkit.js`
- [Memory access](https://github.com/github-suriya/ps5-jb/blob/main/src/utils/mem.js): `src/utils/mem.js`
- [64-bit values](https://github.com/github-suriya/ps5-jb/blob/main/src/utils/int64.js): `src/utils/int64.js`
- [Firmware checks](https://github.com/github-suriya/ps5-jb/blob/main/src/firmware.js): `src/firmware.js`
- [Firmware offsets](https://github.com/github-suriya/ps5-jb/tree/main/offsets): `offsets`

### Kernel Escalation

- [Exploit orchestration](https://github.com/github-suriya/ps5-jb/blob/main/src/main.js): `src/main.js`
- [ROP worker](https://github.com/github-suriya/ps5-jb/blob/main/src/rop.js): `src/rop.js`
- [Kernel exploit](https://github.com/github-suriya/ps5-jb/blob/main/src/relapse_exploit.js): `src/relapse_exploit.js`

### Payload Delivery

- [Kernel payload setup](https://github.com/github-suriya/ps5-jb/blob/main/src/kexp.js): `src/kexp.js`
- **Payload files**
- **ELF loader**

### Other components

- **PS5 user**

## Connections

- PS5 user → Exploit site: opens
- Exploit site → WebKit primitive: establishes primitive (evidence: `src/site.js`)
- Exploit site → Memory access: installs access (evidence: `src/site.js`)
- Memory access → 64-bit values: uses values (evidence: `src/utils/mem.js`)
- Exploit site → Firmware checks: checks support (evidence: `src/site.js`)
- Exploit orchestration → Kernel exploit: runs exploit (evidence: `src/main.js`)
- Exploit orchestration → ROP worker: creates worker
- Kernel exploit → 64-bit values: uses addresses (evidence: `src/relapse_exploit.js`)
- Kernel exploit → Kernel payload setup: starts payload setup (evidence: `src/relapse_exploit.js`)
- Kernel exploit → Firmware offsets: reads firmware offsets
- Exploit orchestration → Kernel exploit: passes primitive and chain (evidence: `src/main.js`)
- PS5 user → Payload files: provides payloads
- ELF loader → Payload files: receives payloads
- PS5 user → ELF loader: loads payloads
