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?