libc-database now has a web service and frontend. Visit to
try it out! Read
if you are interested in the API.
If you're getting errors, please check the "Requirements" section below.
Fetch the desired libc categories and extract the symbol offsets.
It will not download anything twice, so you can also use it to update your
database:
$ ./get # List categories
$ ./get ubuntu debian # Download Ubuntu's and Debian's libc, old default behavior
$ ./get all # Download all categories. Can take a while!
You can also add a custom libc to your database.
$ ./add /usr/lib/libc-2.21.so
Find all the libc's in the database that have the gi at the given
addresses. Only the last 12 bits are checked because randomization usually
works on page size level.
$ ./find printf 260 puts f30
archi (libc6_2.19-10ubuntu2_i386)
Find a libc from the leaked return address into __libc_start_main.
$ ./find __libc_start_main_ret a83
ubuntu-trusty-i386-libc6 (libc6_2.19-0ubuntu6.6_i386)
archi (libc6_2.19-0ubuntu6_i386)
ubuntu-utopic-i386-libc6 (libc6_2.19-10ubuntu2.3_i386)
archi (libc6_2.19-10ubuntu2_i386)
archi (libc6_2.19-15ubuntu2_i386)
Dump some useful offsets, given a libc ID. You can also provide your own names
to dump.
$ ./dump libc6_2.19-0ubuntu6.6_i386
offset___libc_start_main_ret = 0x19a83
offset_system = 0x00040190
offset_dup2 = 0x000db590
offset_rec
offset_str_bin_sh = 0x160a24
Check whether a library is already in the database.
$ ./identify /usr/lib/libc.so.6
local-f706181f06104ef6c7008c066290ea47aa4a82c5
Or find a libc using a hash (currently BuildID, MD5, SHA1 and SHA256 is
implemented):
$ ./identify bid=ebeabf5f7039f53748e996fc976b4da2d486a626
libc6_2.17-93ubuntu4_i386
$ ./identify md5=af7c40da33c685d67cdb166bd6ab7ac0
libc6_2.17-93ubuntu4_i386
$ ./identify sha1=9054f5cb7969056b6816b1e2572f2506370940c4
libc6_2.17-93ubuntu4_i386
$ ./identify sha256=8dc102c06c50512d1e5142ce93a6faf4ec8b6f5d9e33d2e1b45311aef683d9b2
libc6_2.17-93ubuntu4_i386
Download the whole libs corresponding to a libc ID.
$ ./download libc6_2.23-0ubuntu10_amd64
Getting libc6_2.23-0ubuntu10_amd64
-> Location:
-> Downloading package
-> Extracting package
-> Package saved to libs/libc6_2.23-0ubuntu10_amd64
$ ls libs/libc6_2.23-0ubuntu10_amd64
ld-2.23.so ... libc.so.6 ... libpthread.so.0 ...
To run these scripts, you will need following command on your PATH:
* readelf
* objdump
* strings
* perl
* find
* grep
* md5sum
* sha1sum
* sha256sum
* file
* mktemp
* perl
* wget
* ar
* tar
* grep
* zstd
* mktemp
* perl
* wget
* rpm2cpio
* cpio
* grep
In addition to the RPM-Based requirements, you will need:
* wget
* gzip
* grep
* mktemp
* perl
* grep
* sed
* cat
* wget
* zstd
* xz-utils
* tar
* mktemp
* perl
* wget
* tar
* gzip
* grep
In addition to the Debian-based requirements, you will need:
* jq
To install e on Debian 10, run these commands:
开发语言:Shell
Star 数:1871
该项目属于CTF思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Build a database of libc offsets to simplify exploitation展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | libc-database - Build a database of libc offsets to simplify explo |
| 所属分类 | CTF思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 23:35:59 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 167 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |