Coder Social home page Coder Social logo

libc's Introduction

Search libc function offset

  1. 简介 =======

这是针对CTF比赛所做的小工具,在泄露了Libc中的某一个函数地址后,常常为不知道对方所使用的操作系统及libc的版本而苦恼,常规方法就是挨个把常见的Libc.so从系统里拿出来,与泄露的地址对比一下最后12位。

为了不在这一块浪费太多生命,写了几行代码,方便以后重用。

  1. 使用 =======

git clone https://github.com/lieanu/libc.git

submodule libc_binary不是必须的。

from libc import *
obj = libc("fgets", "7ff39014bd90") #第二个参数,为已泄露的实际地址,字符串或int均可

obj.system_address()        #system 地址
obj.system_offset()         #system 偏移
obj.base()                  #libc 基址
obj.address_by_name("puts") #返回puts函数地址
  1. 完善 =======

现在阶段database里只包括了为数不多的几个常用版本,添加新的版本的libc.so的信息进去也非常简单

objdump -T your_libc.so.6 > OS版本_32or64bitOS_32or64bitLibc.db

将这个文件放到database里即可。

4.其它

水平一般,代码很烂,如有bug,欢迎吐槽。

欢迎贡献不同linux发行版的libc信息。

libc's People

Contributors

lieanu avatar

Stargazers

Zhang avatar Alain Dessureault avatar Zach Riggle avatar

Watchers

melbshark avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.