glibc-all-in-one 下载使用及问题解决

一、环境安装

下载glibc-all-in-one:
sudo git clone https://github.com/matrix1001/glibc-all-in-one.git
cd glibc-all-in-one/
cat list
./download xxx
下载patchelf:
git clone https://github.com/NixOS/patchelf.git
cd patchelf
./bootstrap.sh 
./configure
make
make check
sudo make install

二、配置

配置ls.so
先ldd +要运行的文件路径 查看所需要的.so文件名  或者在IDA中搜索字符串直接查看也行
patchelf --set-interpreter glibc-all-in-one/libs/2.34-0ubuntu3_amd64/ld-linux-x86-64.so ./FileName   
#对应的 .so文件路径 ,目标文件 
配置环境
patchelf --set-rpath  /glibc-all-in-one-master/libs/  nothing-4   
#libc所在路径 目标文件
这样操作之后,直接运行文件即可
 

三、遇到的坑

正常情况下应该会有很多.so文件
遇到的问题:
./download 的时候遇到
tar (child): zstd: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar failed
这样的问题
0
查看glibc-all-in-one源码才发现,extract脚本在解压的时候用到了zstd解压命令...
 
 
0
下载zstd解压工具即可
sudo apt-get install zstd
posted @ 2022-07-19 23:10  TLSN  阅读(2853)  评论(0编辑  收藏  举报