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
- Host: GitHub
- URL: https://github.com/hinqiwame/soinjector
- Owner: hinqiwame
- License: unlicense
- Created: 2023-02-27T12:32:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-19T16:43:32.000Z (11 months ago)
- Last Synced: 2025-05-19T17:55:30.204Z (11 months ago)
- Topics: c, cli, debugging, dynamic-linking, injection, linux, process-manipulation, security
- Language: C
- Homepage:
- Size: 165 KB
- Stars: 48
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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)

## 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
```