Classic DLL injection POC in Rust leveraging Windows API hashing.
Injection approach:
OpenProcessfor the given process IDVirtualAllocExto allocate RW memory in the target process to write the DLL pathWriteProcessMemoryto write the DLL path into the buffer allocated byVirtualAllocExCreateRemoteThreadto create a remote thread in the target process that will executeLoadLibraryWusing the DLL path from the buffer as the argument
Usage:
rust_classic_dll_injection.exe [target PID] [DLL path]
# debug
cargo build
# release
cargo build --release