-
Notifications
You must be signed in to change notification settings - Fork 39
思路请教 #1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
适应多个版本其实要解决的是两个问题
第一个问题讨论:module->version 在编译的时候,就已经确定了,这是没错。 nginx加载module,本质上就是dlopen so。 attribute ((constructor))会使函数在main()函数之前被执行,那么在so被dlopen的那一刻,都会先执行我预设的__attribute__ ((constructor))函数,就等于我就有了操作当前nginx内存的权限了 修改当前module 的version,signature自然也不是什么问题。甚至修改原有的module逻辑也是可以的,因为我有了操作当前nginx内存的权限 第二个问题讨论:这个问题我并没有深入研究,而是采取的比较简单的方式,使用较多版本通用的函数和变量。howmp提到的这个问题是有可能的,我没关注各版本ngx_http_request_t结构体有没有过变化,但经过测试从1.12.0到1.22.0都还行。 我有个想法,兼容性问题有可能也能使用解决问题一的方式解决。 |
师傅应该是分别使用两个版本的头文件/源码重新编译的模块,否则因为version和signature的问题也无法加载 来加个联系方式,py一下 |
不是啊…… version和signature可以绕过的嘛 |
想知道是怎么避免传统nginx的so后门需要编译对应nginx版本的问题、能否提供一下学习思路
The text was updated successfully, but these errors were encountered: