https://github.com/backtrace-labs/ptrace-module-example
https://github.com/backtrace-labs/ptrace-module-example
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/backtrace-labs/ptrace-module-example
- Owner: backtrace-labs
- License: mit
- Created: 2021-03-25T18:51:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-25T18:51:10.000Z (almost 5 years ago)
- Last Synced: 2025-04-02T15:43:28.506Z (10 months ago)
- Language: C
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This directory contains an example ptrace module, its Makefile, and an example
C++ program that demonstrates usage.
To run the example, you need to do the following:
- Build the C++ program
- Build the ptrace module
- Run the program
- Run ptrace on the program
# Build the C++ program
For example:
```
g++ -std=c++11 program.cpp -ggdb -o program
```
# Build the ptrace module
```
make
```
# Run program
```
./program &
```
# Run ptrace on the program
Assuming PID of the program is 1337
```
ptrace 1337 --pretty-print --module-load=pmodule-example.so
```
This should leave you with a `.btt` file in the current working directory. It
can be later inspected by `hydra`, `ptrace`, or uploaded to your coroner
instance using the Web-UI or `morgue`.