artemis21 / ptrace-inject Goto Github PK
View Code? Open in Web Editor NEWShared library injection for *nix using ptrace, in Rust.
Shared library injection for *nix using ptrace, in Rust.
hi,
I am trying to use this crate to inject a share library into process. But it failed with this error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: failed to inject shellcode
Caused by:
0: couldn't get libc function addresses for tracee
1: getting the local libc offset failed
2: could not find libc in the target process
This means searching libc.so.6 failed. Here is what i found on my machine:
$ls /usr/lib64/ -l | grep libc.so.6
lrwxrwxrwx 1 root root 12 Dec 19 2019 libc.so.6 -> libc-2.30.so
And when the process is running, what we can find in /proc//maps is "libc-2.30.so" rather than "libc.so.6":
7f29dbd55000-7f29dbd7a000 r--p 00000000 08:03 661688 /usr/lib64/libc-2.30.so
7f29dbd7a000-7f29dbec7000 r-xp 00025000 08:03 661688 /usr/lib64/libc-2.30.so
7f29dbec7000-7f29dbf11000 r--p 00172000 08:03 661688 /usr/lib64/libc-2.30.so
7f29dbf11000-7f29dbf12000 ---p 001bc000 08:03 661688 /usr/lib64/libc-2.30.so
7f29dbf12000-7f29dbf15000 r--p 001bc000 08:03 661688 /usr/lib64/libc-2.30.so
7f29dbf15000-7f29dbf18000 rw-p 001bf000 08:03 661688 /usr/lib64/libc-2.30.so
Maybe we can have a check if it is a symbolic link and get the correct file name?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.