Hooking
Example:
1. Getchar() / rand
only C , and this code is meaningless code.
Only test!
Target
code.
-
target.c
: gcc –o target target.c
Hook
code.
- hook.c
: gcc -shared -fPIC -o hook.so main.c –ldl
Exec:
Normal:
$ ./target
Hook:
$LD_PRELOAD="/home/xxxx/hook_test/hook/hook.so"
./target
*the blue
box : privacy.
#C #C++ #Linux #Embedded #Hooking Example #Hooking
#C #C++ #Linux #Embedded #Hooking Example #Hooking
No comments:
Post a Comment