Shellcode reflective DLL injection in Rust
Go to file
2024-01-05 21:15:45 +02:00
generator randomized XOR & organized common headers 2024-01-05 21:02:01 +02:00
injector randomized XOR & organized common headers 2024-01-05 21:02:01 +02:00
payload c++ conversion & updated build config 2024-01-02 23:06:07 +02:00
reflective_loader randomized XOR & organized common headers 2024-01-05 21:02:01 +02:00
shared randomized XOR & organized common headers 2024-01-05 21:02:01 +02:00
toolchains build size optimizations, streamlining 2024-01-04 20:00:24 +02:00
.gitignore semiproper cmake build configuration 2023-12-29 21:36:08 +02:00
build.sh build size optimizations, streamlining 2024-01-04 20:00:24 +02:00
CMakeLists.txt build size optimizations, streamlining 2024-01-04 20:00:24 +02:00
LICENSE Initial commit 2023-12-13 00:18:24 +02:00
README.md include features & disclaimer to readme 2024-01-05 21:15:45 +02:00

Shellcode reflective DLL injection in C++

Reflective DLL injection demo for fun and education. In practical applications, there's significant scope for enhancing build sizes, obfuscation, and delivery logic.

Project Structure

.
├── build.sh            # Build script (cmake & make)
├── generator           # Shellcode generator (ties together bootstrap, loader, payload, and user data)
├── injector            # PoC injector
├── payload             # PoC payload (DllMain & PrintMessage(lpUserData))
├── reflective_loader   # sRDI implementation
├── shared              # Common cryptographic & file modules
└── toolchains          # Cross-compilation toolchains (linux & darwin)

Features

  • Hashed import names & indirect function calls
  • Randomized export iteration & IAT patching
  • XOR encryption for shellcode (randomized key generated during shellcode generation)

Check out Alcatraz for additional obfuscation for the shellcode/injector.

Usage

Compile the libraries and executables with the included build.sh shellscript (if cross-compiling).

Disclaimer

Information and code provided on this repository are for educational purposes only. The creator is in no way responsible for any direct or indirect damage caused due to the misuse of the information.

Credits