Analyze Firmware
After you successfully obtained a firmware dump, it's time to analyze its content.
Quick wins
binwalk is the goto option for quickly analyzing your firmware
Identify data
binwalk firmware.bin: will give you an overview which contents are found in the dumpExample Output:
DECIMAL HEXADECIMAL DESCRIPTION -------------------------------------------------------------------------------- 0 0x0 U-Boot bootloader image, header size: 64 bytes, load address: 0x80800000, entry point: 0x80800000, CRC32: 0xFFFFFFFF 64 0x40 LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 524288 bytes 1024 0x400 Linux kernel ARM boot executable zImage (little-endian) 1048576 0x100000 Squashfs filesystem, little endian, version 4.0, compression: lzma, size: 262144 bytes, 1198 inodes, blocksize: 131072 bytes, created: Mon Jan 1 00:00:00 2024
Extract Firmware
binwalk -e firmware.bin: will try to automatically extract all content => will often give us full root-filesystem.Example:

Example extraction of a firmware Entropy Analyiss
binwalk -E firmware.binThis will give us the entropy of the firmwareNote: parts of very high entropy can be sign for compression or encryption being used.
Example Output:

Here we see a blob which might be encrypted or compressed
The strings command can be helpful to quickly find sensitive data like passwords or password hashes:
Password Hashes:
Hardcoded Credentials
Private Keys and Certificates
API Keys, Tokens, and Secrets
IP Addresses and URLs
Configuration Files
Encryption Keys and Passwords
Version Information
Debug Information
Email Addresses
Encryption/Decryption Routines
Default and Backup Files
SSH Information
Analysis of bare metal firmware
Todo
Resources:
Last updated
Was this helpful?