A process tracer CLI written in golang.
The design is rather straightforward. We get sys calls via ptrace functions using C wrappers and on each sys call type found, get it's arguments from memory and print it in human readable format.
go build .
./gostrace -p <pid>
go build .
./gostrace <path_to_binary>
2024-09-22.11-39-25.mp4
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- write
- clock_nanosleep
- close
- lseek
- openat
- brk