1

I'm working on the challenges on ROP Emporium. For the ARMv5 version of the callme challenge, we are given two binaries and two shared libraries: callme_armv5 with libcallme_armv5.so and callme_armv5-hf with libcallme_armv5-hf.so. The first pair appears to be using the armel EABI, while the second pair is using the armhf EABI.

In Appendix B of ROP Emporium's Beginner's Guide, they show how to set up an environment for cross-platform debugging for ARM like so:

$ sudo apt install qemu-user libc6-armel-cross gdb-multiarch
$ sudo mkdir /etc/qemu-binfmt
$ sudo ln -s /usr/arm-linux-gnueabi /etc/qemu-binfmt/arm

That works great for armel, but it doesn't work for armhf. So I found this post, showing how to set up an environment for cross-platform debugging of armhf binaries.

$ sudo apt install qemu-user libc6-armhf-cross gdb-multiarch
$ sudo mkdir /etc/qemu-binfmt
$ sudo ln -s /usr/arm-linux-gnueabihf /etc/qemu-binfmt/arm

This works fine for armhf, but not for armel ...

$ qemu-arm ./callme_armv5-hf  # Okay
...
$ qemu-arm ./callme_armv5     # FAIL
./callme_armv5: error while loading shared libraries: libcallme_armv5.so: cannot open shared object file: No such file or directory

The problem is that both setups create the same symlink, but to different directories, so I can debug armel and armhf binaries individually, but each time I want to switch, I have to change the symlink. Is there some way to set up an environment so I can debug both binaries simultaneously?

In case it's relevant, I'm running Ubuntu 20.04 under WSL2.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.