Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tylous committed May 3, 2023
1 parent d575aef commit 52f0bc0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ Freeze.rs was developed in Rust.

## Install

If Rust is not installed please install it from here. If you are compiling it from OSX or Linux sure you have the target "x86_64-pc-windows-gnu" added. To so run the following command:
If `Rust` and `Rustup` is not installed please install them. If you are compiling it from OSX or Linux sure you have the target "x86_64-pc-windows-gnu" added. To so run the following command:
```
rustup target add x86_64-pc-windows-gnu
```

Once done you can compile Freeze.rs, run the following commands (assuming Rust installed), or use the compiled binary:
Once done you can compile Freeze.rs, run the following commands, or use the compiled binary:
```
cargo build --release
```
Expand All @@ -78,6 +78,7 @@ From there the compiled version will be found in in target/release (note if you
## Help

```
___________
\_ _____/______ ____ ____ ________ ____ _______ ______
| __) \_ __ \_/ __ \_/ __ \\___ // __ \ \_ __ \/ ___/
Expand All @@ -98,6 +99,9 @@ FLAGS:
-h, --help Prints help information
-n, --noetw Disables the ETW patching that prevents ETW events from being generated.
-s, --sandbox Enables sandbox evasion by checking:
Is Endpoint joined to a domain?
Does the Endpoint have more than 2 CPUs?
Does the Endpoint have more than 4 gigs of RAM?
-V, --version Prints version information
OPTIONS:
Expand Down
Binary file modified Screenshots/Kernel_EDR.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 21 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ fn main() {
.arg(Arg::with_name("sandbox")
.short("s")
.long("sandbox")
.help("Enables sandbox evasion by checking:"))
.help("Enables sandbox evasion by checking:
Is Endpoint joined to a domain?
Does the Endpoint have more than 2 CPUs?
Does the Endpoint have more than 4 gigs of RAM?"))
.arg(Arg::with_name("export")
.short("export")
.long("export")
Expand Down Expand Up @@ -131,7 +134,11 @@ fn buildfile(project_name: &str, console: bool, sandbox: bool, etw: bool) {
let original_path = env::current_dir().unwrap();
let project_path = original_path.join(project_name);
env::set_current_dir(&project_path).expect("Failed to change directory to Rust project");
let mut args = vec!["build", "--release", "--target", "x86_64-pc-windows-gnu"];
let mut args = if cfg!(target_os = "windows") {
vec!["build", "--release"]
} else {
vec!["build", "--release", "--target", "x86_64-pc-windows-gnu"]
};
args.push("--quiet");

let mut features = String::new();
Expand Down Expand Up @@ -172,11 +179,18 @@ fn buildfile(project_name: &str, console: bool, sandbox: bool, etw: bool) {
pub fn cleanup(project_name: &str, file_name: &str) {
let original_path = env::current_dir().unwrap();
let project_path = original_path.join(project_name);
let compiled_file = project_path
.join("target")
.join("x86_64-pc-windows-gnu")
.join("release")
.join(format!("{}", file_name));
let compiled_file = if cfg!(target_os = "windows") {
project_path
.join("target")
.join("release")
.join(format!("{}", file_name))
} else {
project_path
.join("target")
.join("x86_64-pc-windows-gnu")
.join("release")
.join(format!("{}", file_name))
};
if !compiled_file.exists() {
eprintln!("Error: Compiled file not found");
std::process::exit(1);
Expand Down

0 comments on commit 52f0bc0

Please sign in to comment.