From 5131b84b7e7d069f42bc958ecc5a01735c1ac868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 26 Jul 2024 19:45:52 -0300 Subject: [PATCH] Renaming structure files --- shared/src/ioctls.rs | 5 +++- .../{callback_struct.rs => callback.rs} | 0 .../structs/{driver_struct.rs => driver.rs} | 0 shared/src/structs/injection.rs | 6 ++++ shared/src/structs/mod.rs | 28 +++++++++++-------- .../structs/{module_struct.rs => module.rs} | 0 .../structs/{process_struct.rs => process.rs} | 0 .../{registry_struct.rs => registry.rs} | 0 .../structs/{thread_struct.rs => thread.rs} | 0 9 files changed, 26 insertions(+), 13 deletions(-) rename shared/src/structs/{callback_struct.rs => callback.rs} (100%) rename shared/src/structs/{driver_struct.rs => driver.rs} (100%) create mode 100644 shared/src/structs/injection.rs rename shared/src/structs/{module_struct.rs => module.rs} (100%) rename shared/src/structs/{process_struct.rs => process.rs} (100%) rename shared/src/structs/{registry_struct.rs => registry.rs} (100%) rename shared/src/structs/{thread_struct.rs => thread.rs} (100%) diff --git a/shared/src/ioctls.rs b/shared/src/ioctls.rs index e6dd08d..47f9a30 100644 --- a/shared/src/ioctls.rs +++ b/shared/src/ioctls.rs @@ -41,4 +41,7 @@ pub const IOCTL_REGISTRY_PROTECTION_VALUE: u32 = CTL_CODE!(FILE_DEVICE_UNKNOWN, pub const IOCTL_REGISTRY_PROTECTION_KEY: u32 = CTL_CODE!(FILE_DEVICE_UNKNOWN, 0x817, METHOD_NEITHER, FILE_ANY_ACCESS); // Module -pub const IOCTL_ENUMERATE_MODULE: u32 = CTL_CODE!(FILE_DEVICE_UNKNOWN, 0x818, METHOD_NEITHER, FILE_ANY_ACCESS); \ No newline at end of file +pub const IOCTL_ENUMERATE_MODULE: u32 = CTL_CODE!(FILE_DEVICE_UNKNOWN, 0x818, METHOD_NEITHER, FILE_ANY_ACCESS); + +// Injection +pub const IOCTL_INJECTION: u32 = CTL_CODE!(FILE_DEVICE_UNKNOWN, 0x818, METHOD_NEITHER, FILE_ANY_ACCESS); \ No newline at end of file diff --git a/shared/src/structs/callback_struct.rs b/shared/src/structs/callback.rs similarity index 100% rename from shared/src/structs/callback_struct.rs rename to shared/src/structs/callback.rs diff --git a/shared/src/structs/driver_struct.rs b/shared/src/structs/driver.rs similarity index 100% rename from shared/src/structs/driver_struct.rs rename to shared/src/structs/driver.rs diff --git a/shared/src/structs/injection.rs b/shared/src/structs/injection.rs new file mode 100644 index 0000000..8d88c17 --- /dev/null +++ b/shared/src/structs/injection.rs @@ -0,0 +1,6 @@ +extern crate alloc; + +pub struct TargetInjection { + pub pid: usize, + pub path: alloc::string::String +} \ No newline at end of file diff --git a/shared/src/structs/mod.rs b/shared/src/structs/mod.rs index b5f1fd2..fde933f 100644 --- a/shared/src/structs/mod.rs +++ b/shared/src/structs/mod.rs @@ -3,19 +3,23 @@ use crate::vars::Options; -pub mod process_struct; -pub mod thread_struct; -pub mod callback_struct; -pub mod driver_struct; -pub mod registry_struct; -pub mod module_struct; +pub use { + process::*, + driver::*, + thread::*, + callback::*, + registry::*, + module::*, + injection::*, +}; -pub use process_struct::*; -pub use driver_struct::*; -pub use thread_struct::*; -pub use callback_struct::*; -pub use registry_struct::*; -pub use module_struct::*; +pub mod process; +pub mod thread; +pub mod callback; +pub mod driver; +pub mod registry; +pub mod module; +pub mod injection; // Custom LIST_ENTRY #[repr(C)] diff --git a/shared/src/structs/module_struct.rs b/shared/src/structs/module.rs similarity index 100% rename from shared/src/structs/module_struct.rs rename to shared/src/structs/module.rs diff --git a/shared/src/structs/process_struct.rs b/shared/src/structs/process.rs similarity index 100% rename from shared/src/structs/process_struct.rs rename to shared/src/structs/process.rs diff --git a/shared/src/structs/registry_struct.rs b/shared/src/structs/registry.rs similarity index 100% rename from shared/src/structs/registry_struct.rs rename to shared/src/structs/registry.rs diff --git a/shared/src/structs/thread_struct.rs b/shared/src/structs/thread.rs similarity index 100% rename from shared/src/structs/thread_struct.rs rename to shared/src/structs/thread.rs