DLL injection library with 32-bit and 64-bit support.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Luna Catkins a00bb2d1ff
Lift shellcode into their own files, use include_bytes to include pre-assembled blobs
1 week ago
examples initial commit 1 week ago
src Lift shellcode into their own files, use include_bytes to include pre-assembled blobs 1 week ago
.gitignore initial commit 1 week ago
Cargo.toml Fix x64 crashing on 'real' Windows because I fucked up the ABI. Also fix Cargo.toml because I can't type. 1 week ago
LICENSE.txt initial commit 1 week ago
README.md initial commit 1 week ago

README.md

Djin - Windows DLL injection library for Rust

Features

  • Custom stub code for 32-bit and 64-bit allows calling an additional initialization function
  • Includes full error handling
  • Minimal, low level interface
// DWORD WINAPI fn(void);
extern "system" fn() -> DWORD;

See examples/injector.rs for how to use this library.

Method used

CreateRemoteThread

FEP (Frequently Encountered Problems)

  • It doesn't work, the error code is 5!

Note that the bitness (32-bit or 64-bit) of the calling process, target process, and injected DLL all need to match. Also, in some cases, Windows won't let you inject certain processes.

  • It doesn't work, the error code is 126!

The injected process couldn't find your DLL. Make sure you got the path to your DLL right, and that it stays where it is until inject_dll returns.

  • It doesn't work, the error code is 127!

The system couldn't find the initialization function in your DLL. Make sure you spelled the name correctly.

  • It doesn't work, the error code is some huge number!

or

  • It doesn't work, the injected program crashes!

Make sure it's not an issue in your DLL's code. Note that some programs may implement code that can detect if they're being injected, and crash.

Otherwise, not sure how much I can help you. Debugging this stuff is not easy.