HardBreak
GitHubDiscordLinkedInX
  • HardBreak - Hardware Hacking Wiki
  • Introduction
    • How to start
    • Methodology
    • Case Study (Led to a CVE Update)
      • General Case Study
  • Hardware Hacking
    • Introduction
    • Basics
      • Tools
        • Hardware Tools
          • Essential Tools
          • Soldering Tools
          • Logic Analyzer
            • Saleae Logic Analyzer
          • Open-Source Tools
            • Bus Pirate v3.6
            • Bus Pirate 5
            • GoodFET
          • Multimeters & Oscilloscopes
          • JTAG and SWD Debuggers
            • Segger JLink
            • TI CC-Debugger
          • UART-to-TTL adapter
          • Chip readers and programmers
            • Xgecu T56
        • Software Tools
          • Binwalk
          • Firmwalker
          • flashrom
          • Ghidra
          • OpenOCD
          • Mitmrouter
      • Common Hardware Components
      • Firmware Extraction Methods
      • Ethics
    • Reconnaissance
      • Closed device
        • OSINT (search the web)
        • USB Ports / SD-card
      • Opened device
        • Board Analysis
    • Interface Interaction
      • UART
        • Identify UART
        • Connect to UART
        • Extract Firmware using UART
      • I2C
      • SPI
        • Extract Firmware using SPI
      • JTAG/SWD
        • JTAG
          • Identify JTAG
        • SWD
        • Extract Firmware using JTAG/SWD
      • VE.Direct
    • Bypassing Security
      • Voltage Glitching
        • Example: LPC1768
      • Electromagnetic Fault Injection
    • Analyze Firmware
  • Network Analysis
    • Introduction
    • Reconnaissance
    • Protocols
      • WIFI
        • WEP
        • Deauthentication Attacks
      • Application Layer
        • Proprietary Protocols
          • Parrot Anafi Drone Reverse Engineering
        • MQTT
        • CoAP
        • Web Sockets
  • Radio Hacking
    • Introduction
    • Reconnaissance
    • Protocols
      • NFC
      • RFID
    • Tools
      • RF Signal Analyzers
        • RTL-SDR
        • HackRF
      • Flipper Zero
        • NFC
        • Sub-GHz
  • Contribute
    • How to contribute
    • Gitbook - Basics
      • Markdown
      • Images & media
      • Interactive blocks
  • About
    • Impressum – Legal Notice
    • Privacy Policy
    • Datenschutzerklärung
    • License
Powered by GitBook
On this page
  • Quick wins
  • Analysis of bare metal firmware

Was this helpful?

Edit on GitHub
  1. Hardware Hacking

Analyze Firmware

PreviousElectromagnetic Fault InjectionNextIntroduction

Last updated 4 months ago

Was this helpful?

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 dump

    • Example 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:

  • Entropy Analyiss

    • binwalk -E firmware.binThis will give us the entropy of the firmware

      • Note: parts of very high entropy can be sign for compression or encryption being used.

      • Example Output:

The strings command can be helpful to quickly find sensitive data like passwords or password hashes:

  • Password Hashes:

    strings firmware.bin | grep -E ':[x$1$5$6]:'
  • Hardcoded Credentials

    strings firmware.bin | grep -i 'password'
    strings firmware.bin | grep -i 'user'
    strings firmware.bin | grep -i 'admin'
    strings firmware.bin | grep -i 'login'
  • Private Keys and Certificates

    strings firmware.bin | grep -i 'PRIVATE KEY'
    strings firmware.bin | grep -i 'BEGIN RSA'
    strings firmware.bin | grep -i 'BEGIN DSA'
  • API Keys, Tokens, and Secrets

    strings firmware.bin | grep -i 'api_key'
    strings firmware.bin | grep -i 'token'
    strings firmware.bin | grep -i 'secret'
  • IP Addresses and URLs

    strings firmware.bin | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}'
    strings firmware.bin | grep -E 'http://|https://'
    strings firmware.bin | grep -i 'ftp'
  • Configuration Files

    strings firmware.bin | grep -i '.conf'
    strings firmware.bin | grep -i '.ini'
    strings firmware.bin | grep -i '.xml'
  • Encryption Keys and Passwords

    strings firmware.bin | grep -i 'encryption_key'
    strings firmware.bin | grep -i 'aes'
    strings firmware.bin | grep -i 'des'
    strings firmware.bin | grep -i 'key='
  • Version Information

    strings firmware.bin | grep -i 'version'
    strings firmware.bin | grep -i 'build'
  • Debug Information

    strings firmware.bin | grep -i 'debug'
    strings firmware.bin | grep -i 'trace'
    strings firmware.bin | grep -i 'error'
    strings firmware.bin | grep -i 'fail'
  • Email Addresses

    strings firmware.bin | grep -E '\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b'
  • Encryption/Decryption Routines

    strings firmware.bin | grep -i 'openssl'
    strings firmware.bin | grep -i 'encrypt'
    strings firmware.bin | grep -i 'decrypt'
  • Default and Backup Files

    strings firmware.bin | grep -i 'default'
    strings firmware.bin | grep -i 'backup'
  • SSH Information

    strings firmware.bin | grep -i 'ssh'
    strings firmware.bin | grep -i 'port'

Analysis of bare metal firmware

Todo

Resources:

Binwalk: Firmware Analysis Tool
Analysing and extracting firmware using Binwalk 3.1.0 in 2025
Reverse engineering my router's firmware with binwalk
Example extraction of a firmware
Here we see a blob which might be encrypted or compressed