An open API service indexing awesome lists of open source software.

https://github.com/hinqiwame/soinjector

Linux shared object injector written in pure C
https://github.com/hinqiwame/soinjector

c cli debugging dynamic-linking injection linux process-manipulation security

Last synced: 2 months ago
JSON representation

Linux shared object injector written in pure C

Awesome Lists containing this project

README

          



Soinjector






This is a simple Linux library injector that allows you to inject a shared library into a running process. It uses `ptrace` to attach to the target process, call `dlopen` with the specified library path, and detach from the process. Uses GTK 3 for GUI.

## Download
You can get the latest stable binary from [here](https://github.com/meth1337/soinjector/releases/latest) (filename: `injector`)

## Building
To compile the injector, navigate to the `src/build` directory and run these commands to compile using CMake:
```
cmake ..
make
```
Alternatively, you can compile using the included `compiler` binary to compile the program for you.
```
chmod +x compiler
./compiler
```

## Usage
### CLI
To use the injector, you must have root privileges. You can run the program with the following command:
```
sudo ./injector
```
Where `` is the path to the shared library you want to inject and `` is the process ID of the target process.


Example:
```
sudo ./inject /path/to/libexample.so 1234
```
The injector will attach to the process, call `dlopen` with the specified library path, and detach from the process. If successful, it will print `[*] Library injected successfully!` to the console.

### GUI (BETA)
![gui](img/gui.jpg)

## Docs
The documentation of this tool is [here](https://github.com/meth1337/soinjector/wiki).

---
```
[x0@0x0-80tx ~]$ sudo ./injector libexample.so 1952
[*] Dlopen memory address: 0x7fa06a5b0700
[*] Found library path: libexample.so
[*] Library injected successfully!
[*] Resumed the target process: 1952
```