|
|
@ -2,6 +2,20 @@ |
|
|
|
|
|
|
|
|
|
|
|
## Dump firmware |
|
|
|
## Dump firmware |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can use `OpenOCD` to dump firmware from STM32F103 mcu: |
|
|
|
|
|
|
|
|
|
|
|
```bash |
|
|
|
```bash |
|
|
|
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "flash read_bank 0 firmware_gold.bin 0 0x10000" -c "reset" -c shutdown |
|
|
|
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "flash read_bank 0 firmware_gold.bin 0 0x10000" -c "reset" -c shutdown |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Ghidra |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1. You need to load bynary file to ghidra systems: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Press `I` and add `firmware_gold.bin` |
|
|
|
|
|
|
|
- Choose `ARM-Cortex-32-little` |
|
|
|
|
|
|
|
- And: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
![](2024-09-20_15-52.png) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Analyze -> YES, select ALL options, press Apply and finaly press Analyze. |