From 47d9c31ad74256283c29d0e741e00154f86a18c0 Mon Sep 17 00:00:00 2001 From: kmanc Date: Thu, 7 Apr 2022 17:48:21 -0700 Subject: [PATCH] Bugfix (#42) * clippy suggestion * bug that prevented xor_params from doing anything at all * Update xor params badge data via Github Action Co-authored-by: kmanc --- .custom_shields/xor_params.json | 2 +- process_migration/src/rco_process_migration_windows/mod.rs | 2 +- xor_params/Cargo.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.custom_shields/xor_params.json b/.custom_shields/xor_params.json index 63ccc78..8984fc1 100644 --- a/.custom_shields/xor_params.json +++ b/.custom_shields/xor_params.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "xor_params", - "message": "1.1.1", + "message": "1.1.2", "color": "blue" } \ No newline at end of file diff --git a/process_migration/src/rco_process_migration_windows/mod.rs b/process_migration/src/rco_process_migration_windows/mod.rs index d0c076a..d58a8b8 100644 --- a/process_migration/src/rco_process_migration_windows/mod.rs +++ b/process_migration/src/rco_process_migration_windows/mod.rs @@ -68,7 +68,7 @@ pub fn inject_and_migrate(shellcode: &[u8], target_process: &str) { // WINDOWS --> https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createremotethread // RUST --> https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/System/Threading/fn.CreateRemoteThread.html let start_address_option = unsafe { Some(mem::transmute(base_address)) }; - if let Err(_) = unsafe { CreateRemoteThread(explorer_handle, ptr::null(), 0, start_address_option, ptr::null(), 0, ptr::null_mut()) } { + if unsafe { CreateRemoteThread(explorer_handle, ptr::null(), 0, start_address_option, ptr::null(), 0, ptr::null_mut()) }.is_err() { panic!("CreateRemoteThread failed"); } } diff --git a/xor_params/Cargo.toml b/xor_params/Cargo.toml index 9e3fd11..4fab568 100644 --- a/xor_params/Cargo.toml +++ b/xor_params/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xor_params" -version = "1.1.1" +version = "1.1.2" edition = "2021" authors = ["Kevin Conley "] rust-version = "1.59" @@ -9,4 +9,4 @@ rust-version = "1.59" [dependencies] rco_config = {path = "../rco_config"} -rco_utils = {path = "../rco_utils"} +rco_utils = {path = "../rco_utils", features = ["xor"] }