GDB调试和拆卸i386在AARCH64机器上可执行

发布于 2025-01-22 20:00:34 字数 795 浏览 0 评论 0原文

我正在Mac M1内的虚拟机上运行ARM Ubuntu。

我正在进行一系列二进制逆向工程练习,其中I386提供了二进制文件。

起初,我根本无法在这些文件上运行或打开调试器。但是我找到了一种方法。我下载了QEMU和i386的Linux/c共享库,并且可以这样运行可执行文件:

QEMU-i386 -l/usr/usr/i686-linux-gnu $

我还可以使用gdb-multiarch和do disas main打开二进制文件,该显示了该功能的一些组件,但是如果我尝试做r并在GDB中运行二进制文件或添加断点或类似的内容,我会收到此错误消息:

warning: Selected architecture i386 is not compatible with reported target architecture aarch64
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug share library initializers and
track explicitly loaded dynamic code.
Cannot instert breakpoint -1
Cannot access memory at address ....

设置架构I386尝试运行之前或之后不会更改任何内容。

我想念什么?这可能吗?

I'm running ARM Ubuntu on a virtual machine inside a mac M1.

I am doing a series of binary reverse engineering exercises where binaries have been supplied in i386.

At first I couldn't run or open a debugger on these files at all. But I found a way. I downloaded qemu and the linux/c shared libraries for the i386 and can run the executable like this:

qemu-i386 -L /usr/i686-linux-gnu $BINARY

I can also open the binary with gdb-multiarch and do disas main which shows some assembly for the function, but if I try to do r and run the binary inside gdb or add breakpoints or anything like that I get this error message:

warning: Selected architecture i386 is not compatible with reported target architecture aarch64
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug share library initializers and
track explicitly loaded dynamic code.
Cannot instert breakpoint -1
Cannot access memory at address ....

Doing set architecture i386 before or after attempting to run doesn't change anything.

What am I missing? Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文