免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2096 | 回复: 0
打印 上一主题 下一主题

[C] library call hook [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-11-05 06:32 |只看该作者 |倒序浏览
大家好,我想做一个library call hook.  是glibc提供的库函数(strcpy, strlen),而不是系统调用。

有两种办法,一种是LD_PRELOAD,第二种是ptrace。我编译了Injectso源码,发现出错,无法找到符号表中的_dl_open

Injectso 2002年出现的,是不是Linux内核的linker和动态链接原理发生了变化,导致Injectso无法工作。(参考网页:http://blog.chinaunix.net/space. ... blog&id=1962528)

附: 下面是在一个进程影像找到的符号表中得信息,

got it   getpagesize
got it   abort
got it   __errno_location
got it   __cxa_atexit
got it   open64
got it   fputs_unlocked
got it   __ctype_get_mb_cur_max
got it   realloc
got it   calloc
got it   write
got it   memset
got it   __libc_start_main
got it   stpcpy
got it   _exit
got it   bindtextdomain
got it   mbrtowc
got it   read
got it   free
got it   dcgettext
...

got it   exit

Sorry, No such sym _dl_open
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP