Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcellomaugeri/ptrace_experiments
Code snippets to test ptrace functionalities
https://github.com/marcellomaugeri/ptrace_experiments
Last synced: 2 days ago
JSON representation
Code snippets to test ptrace functionalities
- Host: GitHub
- URL: https://github.com/marcellomaugeri/ptrace_experiments
- Owner: marcellomaugeri
- License: mit
- Created: 2023-09-09T15:35:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-09T18:07:19.000Z (over 1 year ago)
- Last Synced: 2023-09-09T18:41:55.634Z (over 1 year ago)
- Language: C
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ptrace experiments
This project contains some code snippets to test ptrace functionalities.
Feel free to use the code as you wish and to contribute to the project.
A list of available experiments is provided below as well as their purpose and how to run them.### Disclaimer
Note that the code is not meant to be used in production and it is provided as is.
Also, the code is not optimised and it is not meant to be used as a reference for best practices.### Requirements
- Linux-based OS with ptrace support
- C compiler
- make## Available experiments
### control_fd
In this experiment the tracee has three fds open: fd1, fd2 and fd3.
fd3 is a copy of fd2.
The tracer overrides fd3 with fd1 by using the ptrace syscall PTRACE_POKEDATA.#### How to run
```
cd control_fd
make
./control_fd
```