The following segment shows the data section for the intermediate microcontroller, and the two payload sections I added below it. Firmware Analysis and Comparison Tool (FACT) is an automation toolkit to analyze binaries of IoT devices, network devices, drones, UEFI, etc.). This tool comes with a beautiful web interface and you just need to upload test binary on it. This tool automates the whole process by using different tools such as binwalk, QEMU, etc. Having this information also helps to perform manual analysis using hex editors, as it indicates which integrity checking means have been used to build the firmware image.
Hopefully you now feel empowered to slice and dice your way to binary payload victory, no matter the geometry in question. So why wasn’t this my final method for injecting payload firmwares? It requires a copy of objcopy that knows how to handle ELFs of the target architecture.
Using reverse engineering tools, or just using hex dump tools, you can try and “read” the machine code in the file. Compilers leave traces like human readable labels for all kinds of things.
If you have chosen the right COM port and right binary, it will be flashed within 5-10 minutes. After that you will be able to use Arduino IDE to upload codes to your NodeMCU (ESP8266) module and program it for the next best IoT device. And that’s the reason why I am writing this post to help all those stuck with other firmware (Lua, Mongoose etc.) and want to go back.