I'm currently having a look at the Damn Vulnerable Router Firmware, and I'm roughly following the description that is given here:
https://p16.praetorian.com/blog/getting-started-with-damn-vulnerable-router-firmware-dvrf-v0.1
This means I did the following:
- Extracted the firmware with binwalk
- Copied qemu-mipsel-static into the squashfs-root of the extracted firmware
- Emulated the binaries with qemu using chroot, like this:
sudo chroot . ./qemu-mipsel-static -g 1234 ./pwnable/Intro/stack_bof_01 test123
- Started GDB and entered:
set architecture mips
andtarget remote 127.0.0.1:1234
When I now continue with c
I get:
(gdb) c Continuing. warning: Could not load shared library symbols for 3 libraries, e.g. /lib/libgcc_s.so.1. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? [Inferior 1 (Remote target) exited with code 0101] (gdb) info sharedlibrary No shared libraries loaded at this time.
Although this is only a warning and the debugged program seems to execute just fine, I'm wondering if I actually need to copy some more libraries into my squashfs-root folder in order to get this clean. And if so how do I find out which libraries and where to get them? (info sharedlibrary
didn't yield anything)