Skip to content

Quin-Darcy/injector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INJECTOR

This is a tool written in Rust for injecting DLLs into running Windows processes. It utilizes a classic DLL injection technique and includes robust error handling and detailed logging of its operation.

Overview

With a DLL in hand and a target process selected, you can use this tool to inject the DLL into the process. The technique used follows this general structure:

  1. Allocate memory into the target process's address space using VirtualAllocEx.

  2. Write the DLL path into the process's address space with WriteProcessMemory.

  3. Create a remote thread in the target process using CreateRemoteThread and within this thread, run LoadLibraryA to load your DLL.

Usage

This tool allows you to specify either the target process name or the target process ID as well as the path to the DLL and the path to the log file. usage

Examples

injector.exe -n "notepad" -d "my_dll.dll"
injector.exe -p 2334 -d "this_dll.dll" -l "C:\\Users\\Public\\injector.log"

An example of the extensive logging the injector gives

live_log

A clip of Process Explorer showing the moment the DLL gets injected

live_procexp

Installation

Before you begin, ensure you have met the following requirements.

Prerequisites

Build From Source

  1. Clone the repository
git clone https://github.com/Quin-Darcy/injector.git
  1. Build the project
cd injector
cargo build --release
  1. Add to PATH

    On Windows, you can add the full path to the executable in your system's PATH environment variable. Assuming you've cloned the repository into C:\Projects\injector

    1. Type Win+r to open the Run window.

    2. Enter systempropertiesadvanced.

    3. In the System Properties window, click on "Environment Variables ...".

    4. Under the "System variables" section, find the "Path" variable, and click on "Edit."

    5. Click "New" and add the new path: C:\Projects\injector\target\release

    6. Click "OK" to save.

Shameless Recommendation

Don't know what to inject? Might I recommend this great tool which uses Tera for templating and generates a custom DLL designed to hook any Windows API of your choice! The tool gives you a robust .rs file which you only need to fill in the generic hook function included in the template. Everything else is done for you! It also gives you a complete Cargo.toml and everything is nicely tucked in its own directory.

Now, open a new Command Prompt and you should be able to use injector as a command.

About

A DLL injector written in Rust which utilizes the winapi crate and extensive logging.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages