#process #dll #injector #inject #tool #testing #pid

bin+lib injrs

DLL injector library and tool written in Rust. Rust 实现的DLL注入工具/库。

2 releases

0.1.2 Oct 22, 2021
0.1.1 Oct 20, 2021
0.1.0 Oct 20, 2021

#4 in #injector

Download history 21/week @ 2024-02-19 34/week @ 2024-02-26 9/week @ 2024-03-04 13/week @ 2024-03-11 4/week @ 2024-03-18 6/week @ 2024-03-25 59/week @ 2024-04-01 4/week @ 2024-04-08 4/week @ 2024-04-15

73 downloads per month

Apache-2.0

21KB
460 lines

injrs

DLL injector library and tool written in Rust. Rust 实现的DLL注入工具/库

CI crates.io Documentation dependency status Apache-2.0

Install

Go to releases page download the latest binary.

Or if you have rust installed, use cargo to install:

cargo install injrs

Install rust if you don't have.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Usage

At most time, you can use injrs as a simple tool.

USAGE:
injrs PROCESS_NAME/PID [Libraies...]

EXAMPLES:
1. Inject test.dll to process Calc.exe
    $ injrs Calc.exe test.dll

2. Inject test.dll and demo.dll to process with PID: 1888
    $ injrs 1888 test.dll demo.dll

DLL Demo

The code in examples/hellobox is a simple message box dll for testing injector.

You can build with command:

cargo build --release --example hellobox

Build target will locate in:

target/i686-pc-windows-msvc/release/examples/hellobox.dll

Try to inject the demo dll to your target process:

injrs PID/PNAME target/i686-pc-windows-msvc/release/examples/hellobox.dll

Usage as library

You also can write a injector project using injrs as a library.

use injrs::process_windows::*;
use injrs::inject_windows::*;

fn main() {
    let name = "Calc.exe";
    let dll = "./my-demo-dll.dll";
    let p = Process::find_first_by_name(name).unwrap();

    print!("inject dll to process => ");
    match process.inject(dll) {
        Err(e) => {
            println!("error: {}", e);
        },
        Ok(_) => {
            println!("success");
        }
    }
}

for more detail you can check src/main.rs.

Dependencies

~225KB