sudo idapronl_xxx.run
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
:amd64
选择安装的目标架构。sudo apt-get update
sudo apt-get install binutils:amd64
ida64
,果然又提示各种库文件缺失。/opt/idapro-8.3/ida64: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
libGL.so.1
动态链接库,谷歌搜索后发现需要安装libgl1-mesa-glx
库,则运行命令sudo apt install libgl1-mesa-glx:amd64
安装amd64架构下的libgl1-mesa-glx
库。libgthread-2.0.so.0
缺失则安装libglib2.0-0:amd64
。提示libSM.so.6
则安装libsm6:amd64
和libxext6:amd64
。提示libfontconfig.so.1
则安装libsm6:amd64。
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
libQt5XcbQpa.so.5
所依赖的其他链接库无法运行,将在下一章使用ldd命令分析缺失的动态链接库。ldd libQt5XcbQpa.so.5
,终端却提示not a dynamic executable
。sudo apt install libc-bin:amd64
安装amd64架构下的ldd工具。但很不幸,由于amd64下的libc-bin和arm原生的libc-bin冲突,无法正常安装。The following packages have unmet dependencies:
libc-bin : Conflicts: libc-bin:amd64
libc-bin:amd64 : Conflicts: libc-bin
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
libc-bin
看起来又像是系统比较重要的库,因此没有冒险把原本的libc-bin
替换为amd64架构的软件。ldd
程序本身其实是脚本,并非二进制程序。/usr/bin/ldd
代码中使用RTLDLIST
定义了使用哪个ld-linux。RTLDLIST=/lib/ld-linux-aarch64.so.1
ldd
是依赖于ld-linux
动态链接库的实现的,而ld-linux
在不同架构下对应有不同的二进制包。比如在arm下为ld-linux-aarch64.so.1
,在amd64下为ld-linux-x86-64.so.2
。/lib64/ld-linux-x86-64.so.2
替换掉arm架构的版本,并将程序保存为/usr/bin/ldd-amd64
,现在可以成功运行ldd libQt5XcbQpa.so.5
,分析缺失的依赖项。ldd libQt5XcbQpa.so.5
,解决依赖缺失问题。$ ldd-amd64 /opt/idapro-8.3/libQt5XcbQpa.so.5
...(省略)
/lib64/ld-linux-x86-64.so.2 (0x00007ffffffc4000)
libdbus-1.so.3 => not found
libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007ffffe6b5000)
...(省略)
libdbus-1.so.3
缺失,搜索发现缺少了libdbus-1-3
,于是运行安装sudo apt install libdbus-1-3:amd64
。dlopen(/opt/idapro-8.3/plugins/idapython3_64.so): libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
/opt/idapro-8.3/plugins/idapython3_64.so: can't load file
idapython3_64.so
运行时无法找到libpython3.6m.so.1.0
,导致出错。libpython3.10:amd64
,但还是不行。sudo apt install libpython3.10:amd64
dpkg -L libpython3.10:amd64 #查看libpython3.10的so文件所在路径
sudo ln -s libpython3.10.so.1 libpython3.6m.so.1
sudo ln -s libpython3.10.so.1.0 libpython3.6m.so.1.0
curl -O https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ./Miniconda3-latest-Linux-x86_64.sh
/opt/miniconda3/bin/conda init
conda create --name idapy36 "python=3.6,<3.7"
export LD_LIBRARY_PATH=/home/parallels/.conda/envs/idapy36/lib:$LD_LIBRARY_PATH
sudo apt-get update
sudo apt-get install binutils:amd64 libgl1-mesa-glx:amd64 libglib2.0-0:amd64 libsecret-1-0:amd64
sudo apt-get install libfontconfig1:amd64 libxcb-icccm4:amd64 libxcb-image0:amd64 libxcb-keysyms1:amd64 libxcb-render-util0:amd64 libxcb-render0:amd64 libxcb-shape0:amd64 libxcb-xinerama0:amd64 libxcb-xkb1:amd64 libsm6:amd64 libice6:amd64 libxkbcommon-x11-0:amd64 libxkbcommon0:amd64 libdbus-1-3:amd64sudo apt install libpython3.10:amd64
cd /usr/lib/x86_64-linux-gnu/
sudo ln -s libpython3.10.so.1 libpython3.6m.so.1
sudo ln -s libpython3.10.so.1.0 libpython3.6m.so.1.0
看雪ID:m2kar
https://bbs.kanxue.com/user-home-979143.htm
# 往期推荐
2、Large Bin Attack学习(_int_malloc源码细读 )
3、CVE-2022-2588 Dirty Cred漏洞分析与复现
球分享
球点赞
球在看
点击阅读原文查看更多