Added batch processing
This commit is contained in:
parent
a599792cbe
commit
75a5c48f2b
19
README.md
19
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 <name_of_pe.exe>`
|
||||
(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 <filename.exe>`
|
||||
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
|
||||
|
||||
BIN
batch_output/10_encrypted.exe
Executable file
BIN
batch_output/10_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/11_encrypted.exe
Executable file
BIN
batch_output/11_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/12_encrypted.exe
Executable file
BIN
batch_output/12_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/13_encrypted.exe
Executable file
BIN
batch_output/13_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/14_encrypted.exe
Executable file
BIN
batch_output/14_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/15_encrypted.exe
Executable file
BIN
batch_output/15_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/16_encrypted.exe
Executable file
BIN
batch_output/16_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/17_encrypted.exe
Executable file
BIN
batch_output/17_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/18_encrypted.exe
Executable file
BIN
batch_output/18_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/19_encrypted.exe
Executable file
BIN
batch_output/19_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/1_encrypted.exe
Executable file
BIN
batch_output/1_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/20_encrypted.exe
Executable file
BIN
batch_output/20_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/21_encrypted.exe
Executable file
BIN
batch_output/21_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/22_encrypted.exe
Executable file
BIN
batch_output/22_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/23_encrypted.exe
Executable file
BIN
batch_output/23_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/24_encrypted.exe
Executable file
BIN
batch_output/24_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/25_encrypted.exe
Executable file
BIN
batch_output/25_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/26_encrypted.exe
Executable file
BIN
batch_output/26_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/27_encrypted.exe
Executable file
BIN
batch_output/27_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/28_encrypted.exe
Executable file
BIN
batch_output/28_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/29_encrypted.exe
Executable file
BIN
batch_output/29_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/2_encrypted.exe
Executable file
BIN
batch_output/2_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/30_encrypted.exe
Executable file
BIN
batch_output/30_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/31_encrypted.exe
Executable file
BIN
batch_output/31_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/32_encrypted.exe
Executable file
BIN
batch_output/32_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/33_encrypted.exe
Executable file
BIN
batch_output/33_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/34_encrypted.exe
Executable file
BIN
batch_output/34_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/35_encrypted.exe
Executable file
BIN
batch_output/35_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/36_encrypted.exe
Executable file
BIN
batch_output/36_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/37_encrypted.exe
Executable file
BIN
batch_output/37_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/38_encrypted.exe
Executable file
BIN
batch_output/38_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/39_encrypted.exe
Executable file
BIN
batch_output/39_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/3_encrypted.exe
Executable file
BIN
batch_output/3_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/40_encrypted.exe
Executable file
BIN
batch_output/40_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/41_encrypted.exe
Executable file
BIN
batch_output/41_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/42_encrypted.exe
Executable file
BIN
batch_output/42_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/43_encrypted.exe
Executable file
BIN
batch_output/43_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/44_encrypted.exe
Executable file
BIN
batch_output/44_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/45_encrypted.exe
Executable file
BIN
batch_output/45_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/46_encrypted.exe
Executable file
BIN
batch_output/46_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/47_encrypted.exe
Executable file
BIN
batch_output/47_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/48_encrypted.exe
Executable file
BIN
batch_output/48_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/49_encrypted.exe
Executable file
BIN
batch_output/49_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/4_encrypted.exe
Executable file
BIN
batch_output/4_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/50_encrypted.exe
Executable file
BIN
batch_output/50_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/5_encrypted.exe
Executable file
BIN
batch_output/5_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/6_encrypted.exe
Executable file
BIN
batch_output/6_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/7_encrypted.exe
Executable file
BIN
batch_output/7_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/8_encrypted.exe
Executable file
BIN
batch_output/8_encrypted.exe
Executable file
Binary file not shown.
BIN
batch_output/9_encrypted.exe
Executable file
BIN
batch_output/9_encrypted.exe
Executable file
Binary file not shown.
@ -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")?;
|
||||
|
||||
|
||||
BIN
crypt/test_file.exe
Executable file
BIN
crypt/test_file.exe
Executable file
Binary file not shown.
69
simple_batch.sh
Executable file
69
simple_batch.sh
Executable file
@ -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."
|
||||
BIN
stub/src/encrypted_Input.bin
Normal file
BIN
stub/src/encrypted_Input.bin
Normal file
Binary file not shown.
1
stub/src/key.txt
Normal file
1
stub/src/key.txt
Normal file
@ -0,0 +1 @@
|
||||
¢÷µ¸ónøšƒ–úÑi›
|
||||
Loading…
Reference in New Issue
Block a user