Vdiscover代码笔记

来源:互联网 发布:2016嘉兴菜鸟网络招聘 编辑:程序博客网 时间:2024/06/08 05:00

vdiscover.RandomWalk

函数

  • RandomWalkElf:抽取静态特征

vdiscover.spec

解析prototypes.conf中的除系统调用之外的函数,将返回值类型和参数类型存入字典spec中,字典的key为函数名

vdiscover.ELF

class ELF

  • self.path:文件路径
  • self.base:起点,默认为0x0
  • self.sections:字典类型
  • self.filetype:path的文件类型,32位/64位
  • self.entrypoint:程序入口点信息
  • self.no_frame_pointer:程序是否有frame pointer(???)
  • self.plt:程序的plt地址,以字典形式存储
  • self.got:程序的got地址,以字典形式存储
  • self.name2addr:段名到地址的转换
  • self.addr2name:地址到段名的转换
  • self.name2func:段名到got地址的转换
  • self.func2name:got地址到段名的转换

全局变量

  • realpath:此脚本所在目录的绝对路径
  • datadir:.. / cache /

函数

  • file_type:得到文件类型,32位/64位
  • entrypoint:利用linux readelf命令得到入口点信息
  • no_frame_pointer:程序.eh_frame段大小是否大于4(???)
  • plt_got:得到代码段的plt和got地址并存入cache文件夹
  • _load_cached_data:从cache文件夹中读取缓存的plt和got信息
  • load_raw_inss:得到text段的汇编指令
原创粉丝点击