It started out as a way to simplify the hassle of changing libc back and forth when doing pwn topics, and to simplify the commands, got a little script that can be added to /usr/local/bin as a shortcut command 🔢
This is written in the tools repository (git clone /CH13hh/), so feel free to download it and suggest some optimizations if you need them.
patlibc
is a tool for easy replacement oflibc
library is a tool for solving problems that require customization of thelibc
(used form a nominal expression)pwn
Title. Attention: dependenciespatchelf
If you don't have it, please download it first.patchelf
The Three-parameter model dependencyglibc-all-in-one
。
Installation
git clone /CH13hh/
cd
sudo chmod +x patlibc
sudo cp patlibc /usr/local/bin
It is ready to use after completing the above steps.
Usage
Notes: utilizationpatlibc
You will need to set thepwn
Notes: utilizationpatlibc
You will need to set thepwn
folder where the topic is located, otherwise the replacement may fail. Notes: utilizationpatlibc
You will need to set thepwn
folder where the topic is located, otherwise the replacement may fail.
Method 1: Four-parameter model(Applies when the title provideslibc
cap (a poem)ld
(Documentation)
Usage: patlibc <new_libc_path> <new_ld_path> <lib_name> <pwn_name>
eg: patlibc ./.6 ./.6 .6 ./pwn
Method 2: Three-parameter model(For use withglibc-all-in-one
to replacelibc
(library)
This mode requires specifying thelibc
version (must beglibc-all-in-one
(used form a nominal expression)libs
(that already exist in the folder). For example.2.23-0ubuntu11.3_amd64
followParameter I
write data in a box (on a questionnaire or web form)2.23
Ready to go.
Notes:If there is more than one minor version, you can choose your own. path cannot be read across directories, e.g. . /AA/BB/glibc-all-in-one
suppose that...glibc-all-in-one
exist~/
folder, then parameter three is filled in~/
。
Usage: patlibc <libc_version> <pwn_name> <glibc-all-in-one_path>
eg: patlibc 2.23 pwn ~/
Specific replacement effect