One of the techniques that often come in useful during exploitation is the ability to modify firmware. This can be done by extracting the filesystem from the firmware, modifying the contents, and then repackaging it into new firmware. This new firmware could then be flashed to the device.
In order to modify firmware, we will use a tool called FMK written by Jeremy Collake and Craig Heffner. FMK utilizes Binwalk and additional tools to extract the filesystem from the firmware and also provides us with the ability to repackage the modified filesystem into a new firmware binary.
FMK can be downloaded from https://github.com/brianpow/firmware-mod-kit/ or it might already be present in your system if you cloned the FAT tool earlier. Once you have downloaded it, we need firmware which we can try it out on. To keep things simple and so that everyone who is reading this book can replicate the following steps without investing in purchasing...