This commit is contained in:
Nathan Fargo
2026-09-22 07:34:03 +02:00
parent 22663ffb0b
commit d87b408de3
3 changed files with 8 additions and 15 deletions
+2 -9
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<title>PS5</title>
<title>PS5-Relapse</title>
<style>
html, body {
background: #060606;
@@ -13,17 +13,10 @@
</head>
<body>
<div id="console"></div>
<script>
const params = new URLSearchParams(location.search);
window.RELAPSE_CFG = {
kexp: params.get("kexp"),
elfldr: params.get("elfldr"),
};
</script>
<script src="./src/firmware.js"></script>
<script src="./src/main.js"></script>
<script src="./src/rop.js"></script>
<script src="./src/utils/syscalls.js"></script>
<script type="module" src="./src/site.js"></script>
</body>
</html>
</html>
+4 -4
View File
@@ -235,7 +235,7 @@ async function spawnAndJoin(entry, args, symbols, p, chain) {
return { joinResult: joined.low >>> 0, shellcodeResult: p.read8(result) };
}
export async function runKexp(krw, p, chain, log, config = {}) {
export async function runKexp(krw, p, chain, log) {
const say = typeof log === "function" ? log : () => {};
const allprocRva = window.KRW && window.KRW.allproc;
if (!krw || !krw.ktextBase || !krw.procFdAddr)
@@ -248,9 +248,9 @@ export async function runKexp(krw, p, chain, log, config = {}) {
throw new Error("kexp: invalid allproc address " + hex(allproc));
const symbols = resolveSymbols(p);
const elfldr = await mapElf(config.elfldr || DEFAULT_ELFLDR, p, chain);
const elfldr = await mapElf(DEFAULT_ELFLDR, p, chain);
const blob = await fetchBinary(config.kexp || DEFAULT_KEXP);
const blob = await fetchBinary(DEFAULT_KEXP);
patchShellcode(blob, symbols);
const entry = await mapExecutable(blob, p, chain);
@@ -273,4 +273,4 @@ export async function runKexp(krw, p, chain, log, config = {}) {
throw new Error("kexp: pthread_join returned " + hex(result.joinResult));
say("elfldr returned " + hex(result.shellcodeResult));
return true;
}
}
+2 -2
View File
@@ -1039,7 +1039,7 @@ class KernelExploit {
write4: (address, value) => this.writeKernel32(address, value),
write8: (address, value) => this.writeKernel64(address, value),
};
const loaded = await runKexp(krw, this.p, this.chain, (message) => this.report("kexp", message), window.RELAPSE_CFG || {});
const loaded = await runKexp(krw, this.p, this.chain, (message) => this.report("kexp", message));
if (!loaded) this.report("kexp", "payloads did not load");
return !!loaded;
@@ -1175,4 +1175,4 @@ class KernelExploit {
this.report("Cleanup", "failed");
}
}
}
}