用于查询libc版本函数偏移的工具

在线查询libc版本的网站:
https://libc.blukat.me/
在这里插入图片描述

一个python项目LibcSearcher
项目地址:https://github.com/lieanu/LibcSearcher
安装
(下载比较慢,该项目依赖另外一个项目https://github.com/lieanu/libc-database

git clone https://github.com/lieanu/LibcSearcher.git
cd LibcSearcher
python setup.py develop

这个项目我已经打包在下面地址了https://download.csdn.net/download/weixin_43833642/12507253(大概有500MB左右,从github上下要下到猴年马月…)

from LibcSearcher import *

#第二个参数,为已泄露的实际地址,或最后12位(比如:d90),int类型
obj = LibcSearcher("fgets", 0X7ff39014bd90)

obj.dump("system")        #system 偏移
obj.dump("str_bin_sh")    #/bin/sh 偏移
obj.dump("__libc_start_main_ret")    

另一个用ruby开发的项目one_gadget
项目地址:https://github.com/david942j/one_gadget
安装
需要ruby环境

sudo apt install ruby
gem install one_gadget

python中调用

import subprocess
def one_gadget(filename):
  return map(int, subprocess.check_output(['one_gadget', '--raw', filename]).split(' '))

one_gadget('/lib/x86_64-linux-gnu/libc.so.6')

参考:https://www.jianshu.com/p/8d2552b8e1a2

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章