Skip to content

Commit

Permalink
Merge pull request #14 from frack113/refactor/comments
Browse files Browse the repository at this point in the history
Refactor/comments
  • Loading branch information
frack113 authored Jun 12, 2024
2 parents d7c0e7d + 4e71912 commit fb6b2d7
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 43 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ version = "1.0.0"
edition = "2021"
description = "Windows Artefact Generator"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[profile.release]
opt-level = 3
debug = false
Expand Down
3 changes: 0 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

// build.rs

use winres::{self, WindowsResource};

fn main() {
if cfg!(target_os = "windows") {
let mut res: WindowsResource = winres::WindowsResource::new();

//res.set_icon("rust.ico");
res.set("FileVersion", "1.0.0");
res.set("InternalName", "🔓 your detection");
res.set("CompanyName", "Frack113");
Expand Down
11 changes: 0 additions & 11 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

/*
the cli option
Global
--help -h
--module -m
--get -g
--detail -d
*/

use crate::malware::ads::ADS;
use crate::malware::file::FileCreate;
use crate::malware::mutex::Mutex;
Expand Down
9 changes: 0 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

/*
____ ____ ____ ____ ____ ____ ____ _________ ____ ____ ____ ____ ____ ____ ____ ____ _________ ____ ____ ____ ____ ____ ____ ____ ____ ____
||W |||i |||n |||d |||o |||w |||s ||| |||A |||r |||t |||e |||f |||a |||c |||t ||| |||G |||e |||n |||e |||r |||a |||t |||o |||r ||
||__|||__|||__|||__|||__|||__|||__|||_______|||__|||__|||__|||__|||__|||__|||__|||__|||_______|||__|||__|||__|||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|/__\|/_______\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|/_______\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|
Working date: 2023-08
*/

mod cli;
mod malware;

Expand Down
1 change: 0 additions & 1 deletion src/malware/ads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Alternate Data Stream
//
// Last update 20240224
Expand Down
1 change: 0 additions & 1 deletion src/malware/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Mutex
//
// Last update 20240224
Expand Down
1 change: 0 additions & 1 deletion src/malware/namepipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Name Pipe
//
// Last update 20240224
Expand Down
2 changes: 0 additions & 2 deletions src/malware/ppid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// PPID Spoofing
//
// Last update 20240224
Expand Down Expand Up @@ -38,7 +37,6 @@ pub struct PPID {
executable: String,
}

/* Use internal rust command */
fn get_user_pid() -> u32 {
let s: System = System::new_all();
let mut ppid_list: Vec<u32> = Vec::<u32>::new();
Expand Down
5 changes: 0 additions & 5 deletions src/malware/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Load Vulnerable Driver
//
// Last update 20240224

// Windows API
use windows::core::{Result as WindowsResult, PCWSTR};
use windows::Win32::Security::SC_HANDLE;
use windows::Win32::System::Services::{
ControlService, CreateServiceW, DeleteService, OpenSCManagerW, StartServiceW,
ENUM_SERVICE_TYPE, SC_MANAGER_ALL_ACCESS, SERVICE_CONTROL_STOP, SERVICE_ERROR,
SERVICE_START_TYPE, SERVICE_STATUS,
};

// Some others
use crate::malware::tools::{process_is_admin, EXIST_ALL_GOOD, EXIST_TEST_ERROR};
use clap::Parser;
use std::{thread, time};
Expand Down Expand Up @@ -84,7 +80,6 @@ fn create_driver_service(name: &String, details: &String, path: &String) -> bool
};
}
Err(value) => {
// let error_code = unsafe { GetLastError() };
println!("Service Start failure with code : {:#06x}", value.code().0);
}
};
Expand Down
8 changes: 0 additions & 8 deletions src/malware/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Tools box
//
// std::process::exit need a i32
pub const EXIST_ALL_GOOD: i32 = 0;
pub const EXIST_CLI_ERROR: i32 = 10;
pub const EXIST_TEST_ERROR: i32 = 11;
Expand All @@ -15,7 +11,6 @@ use std::collections::HashSet;
use regex_generate::{Generator, DEFAULT_MAX_REPEAT};
use windows::Win32::UI::Shell::IsUserAnAdmin;

// File Creation
pub fn hex_to_bytes(s: &str) -> Option<Vec<u8>> {
if s.len() % 2 == 0 {
(0..s.len())
Expand All @@ -30,9 +25,6 @@ pub fn hex_to_bytes(s: &str) -> Option<Vec<u8>> {
}
}

/*
Some usefull fn
*/
pub fn regex_to_string(name: &String) -> String {
let mut gen: Generator<rand::rngs::ThreadRng> =
Generator::new(name, rand::thread_rng(), DEFAULT_MAX_REPEAT).unwrap();
Expand Down

0 comments on commit fb6b2d7

Please sign in to comment.