It looked like the files used in the OS were seperated into each files, which is not what I wanted. So I used Binwalk again and it showed some possible OS offsets. I tried extracting them with dd like ↓ but kept getting garbage. The Cisco IOS seemed like the most viable offset, but it doesnt even give the correct header.

If your BIN image doesn’t have a CUE file, don’t worry, you can easily create one using Pad of notes (on Windows), edition of texts (on Mac) or any other text editor. All you have to do is start creating a new document and write the following in it.

The microcontroller’s flashing tool will happily write the combined firmware to the device, placing the payload files in the right address. But how does the running firmware know where to look to extract the payloads? A detailed discussion of the usage of the linker script is out of scope here but for now let’s summarize it as, well, a script for the linker!

modify firmware bin file

Select Configuration on device menu and open a terminal emulator program on PC. To configure the device using AT commands (while connected to an MDK or UDK2), refer to Configuration Mode for details. Ultimately, you can open any BIN file with a hex editor, such as Hexed, regardless of its purpose. This way, you’ll be able to see the code content of the file and edit it. Of course, this is only advised if you know what you’re doing; otherwise, you might corrupt the file for good.

The plugin would prompt to specify the path to a SVD file to parse. We can select the STM32F103xx.svd file downloaded from the cmsis-svd repository and click on «Load SVD File». In the other function, FUN_ c we can see the «Authentication Failed» string which implies this will be called if the password is incorrect. Presence of the string «Authentication successful» indicates that this function will be called if the password was correct. Ghidra will prompt to analyze the file and we click yes keeping the default analysis options. Let’s have a look at the disassembled code after analysis finishes.