We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
看了下coost文档注意到有hook 机制,便想了解下hook机制,文档中没有详细的hook的内容,便看了下源码。 用户态的函数如malloc之类被hook掉能理解,但是内核的函数是如何被自定义的hook函数hook掉没太搞明白,google搜出来的有点乱。 #define _hook(f) f #define _hook_api(f) if (!__sys_api(f)) atomic_store(&__sys_api(f), dlsym(RTLD_NEXT, #f), mo_relaxed) #define hook_api(f) _hook_api(f) 通过dlsym找到内核符号后就能直接hook内核的函数了吗? 如果有时间的话,望不吝赐教。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
看了下coost文档注意到有hook 机制,便想了解下hook机制,文档中没有详细的hook的内容,便看了下源码。
用户态的函数如malloc之类被hook掉能理解,但是内核的函数是如何被自定义的hook函数hook掉没太搞明白,google搜出来的有点乱。
#define _hook(f) f
#define _hook_api(f)
if (!__sys_api(f)) atomic_store(&__sys_api(f), dlsym(RTLD_NEXT, #f), mo_relaxed)
#define hook_api(f) _hook_api(f)
通过dlsym找到内核符号后就能直接hook内核的函数了吗?
如果有时间的话,望不吝赐教。
The text was updated successfully, but these errors were encountered: