22 Dec 2022
Firmware Binwalkin’ around the Christmas treeFocusing on firmware reverse engineering from a security standpoint. It’s possible a smart watch could have firmware programmed to send all incoming messages, emails, etc. to a specific IP unbeknownst to the user. Steps to follow:
Essential examination of the binary file contents, performing its reverse engineering, and reading assembly instructions to understand functionality. Commonly used command line utilities and binary analysis tools include:
zip, tar, exe, ELF, etc. Has database of binary header signatures to run a match against. Common objective is to extract a file system like Squashfs, yaffs, Cramfs, ext*fs, jffs2, etc., which is embedded in the firmware binary. File system has all the application code of device.binwalk and outputs directory with the file system. Developer can then modify desired files and repack the binary with a single command.etc/shadow, etc/passwd, etc/ssl, special keywords like admin, root, password, etc., and vulnerable binaries like ssh, telnet, netcat, etc.Involves running the firmware code on actual hardware and observing its behavior through emulation and hardware/software based debugging. Significant advantages include analyzing unintended network communication for identifying data prilfering. Common tools used:
Find a flag and some data on the device’s firmware.
Started with binwalk -E -N Binwalk entropy analysis without plotting entropy graph. Returned sing entry with rising entropy edge. Same process on unsigned returned multiple entries alternating between falling and rising entropy edges. (Should research more to see what that means)
Next used FMK extract-firmware.sh on older unencrypted version of firmware. Follow up by using grep -ir to search extracted files for gpg keys using case insensitive and recursive flags.
Flag and info found.