https://github.com/stackoverflowexcept1on/ld-preload-trick
C++ library that is loaded before the binary and hooks the `time` function
https://github.com/stackoverflowexcept1on/ld-preload-trick
cmake cpp20 hooking-template ld-preload reverse-engineering
Last synced: about 2 months ago
JSON representation
C++ library that is loaded before the binary and hooks the `time` function
- Host: GitHub
- URL: https://github.com/stackoverflowexcept1on/ld-preload-trick
- Owner: StackOverflowExcept1on
- Created: 2023-02-10T09:14:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T10:22:30.000Z (over 2 years ago)
- Last Synced: 2025-01-11T13:23:57.966Z (9 months ago)
- Topics: cmake, cpp20, hooking-template, ld-preload, reverse-engineering
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### ld-preload-trick
[](https://github.com/StackOverflowExcept1on/ld-preload-trick/actions/workflows/ci.yml)
C++ library that is loaded before the binary and hooks the `time` function
### Requirements
- cmake
- g++ compiler### Building
```bash
./build.sh
```### Running
```bash
LD_PRELOAD=./build/bin/libhook.so ./build/bin/demo
``````
[+] library is loaded[!] hooked time(...) function
[!] original time(...) at 0x7fff261f2be0
original time(...) = 1675958710
patching result to 0
time(...) = 0 (in binary)[-] library has been unloaded
```