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
  • Key Features
  • Cheat Sheet
  • Installation
  • Usage
  • Common Use Cases
  • Resources

Was this helpful?

Edit on GitHub
  1. Hardware Hacking
  2. Basics
  3. Tools
  4. Software Tools

Binwalk

Binwalk is a powerful tool designed for analyzing, extracting, and reverse-engineering firmware images. It is frequently used by pentesters and security researchers for identifying embedded files and data in firmware, especially in IoT and hardware hacking.

Key Features

  • Signature Scanning

    • Binwalk scans firmware images for known file signatures such as compressed files, file systems, and cryptographic keys.

  • File Extraction

    • Automatically extracts embedded files and file systems from firmware images.

  • Entropy Analysis

    • Helps detect encrypted or compressed data by analyzing the randomness within a binary.

  • Custom Signatures

    • Users can define their own file signatures, expanding Binwalk's capabilities to detect specific patterns.

Cheat Sheet

# Scan a firmware image for known file signatures
binwalk firmware.bin

# Automatically extract embedded files from a firmware image
binwalk -e firmware.bin

# Analyze entropy to detect encrypted or compressed sections
binwalk -E firmware.bin

# Recursively extract files from deeply embedded archives
binwalk -Me firmware.bin

Installation

Binwalk can be easily installed on most Linux distributions using the following command:

sudo apt-get install binwalk

Usage

Here’s a quick breakdown of the most common commands:

  1. Basic Scan: To identify and list all known signatures in a firmware image:

    binwalk firmware.bin
  2. Extract Embedded Files: Automatically extract files found during the scan:

    binwalk -e firmware.bin
  3. Entropy Analysis: Useful for detecting compressed or encrypted sections within the firmware:

    binwalk -E firmware.bin
  4. Recursive Extraction: Extracts files recursively to dig deeper into embedded archives:

    binwalk -Me firmware.bin

Common Use Cases

  • Firmware Reverse Engineering

    • Binwalk helps break down firmware to find vulnerabilities, such as hardcoded credentials or encryption keys.

  • File System Extraction

    • Extract embedded file systems like JFFS2, SquashFS, etc. from IoT devices.

  • Cryptanalysis

    • Identify and locate encrypted sections of firmware for further investigation.

Resources

PreviousSoftware ToolsNextFirmwalker

Last updated 4 months ago

Was this helpful?

For other systems, or to build it from source, follow the instructions on the .

official Binwalk GitHub repository
Binwalk Wiki