https://github.com/narhen/procjack
PoC of injecting code into a running Linux process
https://github.com/narhen/procjack
hijack injection linux linux-process poc ptrace ptrace-injection shellcode shellcode-injector
Last synced: 3 months ago
JSON representation
PoC of injecting code into a running Linux process
- Host: GitHub
- URL: https://github.com/narhen/procjack
- Owner: narhen
- License: mit
- Created: 2018-01-31T15:19:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-11T17:12:22.000Z (over 6 years ago)
- Last Synced: 2025-04-08T01:11:09.010Z (8 months ago)
- Topics: hijack, injection, linux, linux-process, poc, ptrace, ptrace-injection, shellcode, shellcode-injector
- Language: C
- Size: 8.79 KB
- Stars: 23
- Watchers: 3
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# procjack
PoC of injecting code into a running Linux process.
Spawns a new thread to host the injected code.
## Example
This will inject shellcode, contained in the [`count`](src/count.asm) binary, into a running process 'dummy'.
```
$ cd src
$ make
$ ./dummy &
$ ./inject -p $(pidof dummy) -f ./count
```
Quick-n-dirty command to verify that a process is running multiple threads
```
$ ps -eLF | head -1; ps -eLF | grep -i dummy
```
## Dependencies
* [Capstone](http://www.capstone-engine.org/documentation.html) (`apt-get install libcapstone3 libcapstone-dev`)