From 8084118ae7ff51de61a9d73daa3b63303f676555 Mon Sep 17 00:00:00 2001 From: joaoviictorti Date: Wed, 25 Sep 2024 20:17:26 -0300 Subject: [PATCH] fix(driver): Remove KeUnstackDetachProcess --- driver/src/utils/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver/src/utils/mod.rs b/driver/src/utils/mod.rs index 93c045d..7f1bac4 100644 --- a/driver/src/utils/mod.rs +++ b/driver/src/utils/mod.rs @@ -166,13 +166,12 @@ pub unsafe fn get_process_by_name(process_name: &str) -> Option { /// - `Option<*mut c_void>`: The address of the target function if found. /// pub unsafe fn get_module_peb(pid: usize, module_name: &str, function_name: &str) -> Option<*mut c_void> { - let mut apc_state: KAPC_STATE = core::mem::zeroed(); + let apc_state: KAPC_STATE = core::mem::zeroed(); let target = Process::new(pid)?; let attach_process = ProcessAttach::new(target.e_process); let target_peb = PsGetProcessPeb(target.e_process) as *mut PEB; if target_peb.is_null() || (*target_peb).Ldr.is_null() { - KeUnstackDetachProcess(&mut apc_state); return None; }