Bootloaders
Bootloaders are the first code executed during system startup, responsible for loading an OS or initializing firmware. In low-level reversing or CTF tasks, bootloaders may contain custom routines, hidden data, or password checks embedded in assembly.
- Run a bootloader in QEMU:
qemu-system-i386 -drive file=bootloader.bin,format=raw
- Launch QEMU for debugging:
qemu-system-i386 -drive file=bootloader.bin,format=raw -s -S
- Attach GDB to debug session:
gdb
(gdb) target remote localhost:1234