Skip to content

Commit 907275b

Browse files
committed
More stable payload
1 parent 83b1348 commit 907275b

File tree

6 files changed

+16
-35
lines changed

6 files changed

+16
-35
lines changed

exploit/fix.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exploit/index.html

+3-23
Original file line numberDiff line numberDiff line change
@@ -628,32 +628,12 @@
628628
// Launch thread
629629
var thread_id_ptr = malloc(0x08);
630630
var thread_name = malloc(0x100);
631-
var exit_code_ptr = malloc(0x08);
632631

633632
p.writeString(thread_name, "payload");
634633

635-
// run payload forever
636-
for (;;)
637-
{
638-
var result = p.call(libkernel.add32(0x11570), thread_id_ptr, 0, code_addr, 0, thread_name);
639-
print("scePthreadCreate: 0x" + result);
640-
if (result == 0)
641-
{
642-
var thread_id = p.read8(thread_id_ptr);
643-
print("thread: 0x" + thread_id);
644-
var result = p.call(libkernel.add32(0x11610), thread_id, exit_code_ptr);
645-
646-
print("scePthreadJoin: 0x" + result);
647-
if (result == 0)
648-
{
649-
var exit_code = p.read8(exit_code_ptr);
650-
print("exit code: " + exit_code);
651-
print("=== Done ===");
652-
alert("Done");
653-
break;
654-
}
655-
}
656-
}
634+
print("scePthreadCreate: 0x" + p.call(libkernel.add32(0x11570), thread_id_ptr, 0, code_addr, 0, thread_name));
635+
print("thread: 0x" + p.read8(thread_id_ptr));
636+
print("=== Done ===");
657637
}
658638
else
659639
{

exploit/payload.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

installer/include/debug.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef DEBUG_H
22
#define DEBUG_H
33

4+
#define PRIx64 "llx"
5+
#define PRIu64 "llu"
6+
#define PRId64 "lld"
7+
48
int sock;
59

610
void initDebugSocket(void);

installer/include/defines.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef __DEFINES
22
#define __DEFINES
33

4-
#define VERSION "1.2"
4+
#define VERSION "1.3"
55

66
//#define DEBUG_SOCKET
77

@@ -91,6 +91,7 @@ struct install_payload_args
9191

9292
struct kernel_payload_args
9393
{
94+
void* syscall_handler;
9495
uint64_t user_arg;
9596
};
9697

installer/source/main.c

+5-9
Original file line numberDiff line numberDiff line change
@@ -286,16 +286,9 @@ int kernel_payload(struct thread *td, struct kernel_payload_args* args)
286286
static inline void patch_update(void)
287287
{
288288
unlink(PS4_UPDATE_FULL_PATH);
289-
290-
DIR* directory = opendir(PS4_UPDATE_TEMP_PATH);
291-
292-
if(directory != NULL)
293-
{
294-
closedir(directory);
295-
return;
296-
}
297-
298289
unlink(PS4_UPDATE_TEMP_PATH);
290+
291+
mkdir(PS4_UPDATE_FULL_PATH, 0777);
299292
mkdir(PS4_UPDATE_TEMP_PATH, 0777);
300293
}
301294

@@ -305,6 +298,8 @@ int _main(struct thread *td) {
305298
initKernel();
306299
initLibc();
307300

301+
sceKernelSleep(1);
302+
308303
#ifdef DEBUG_SOCKET
309304
initNetwork();
310305
initDebugSocket();
@@ -327,6 +322,7 @@ int _main(struct thread *td) {
327322
struct payload_info payload_info;
328323
payload_info.buffer = payload_data;
329324
payload_info.size = payload_size;
325+
330326
errno = 0;
331327

332328
result = kexec(&install_payload, &payload_info);

0 commit comments

Comments
 (0)