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

Was this helpful?

Edit on GitHub
  1. Hardware Hacking
  2. Interface Interaction
  3. SPI

Extract Firmware using SPI

PreviousSPINextJTAG/SWD

Last updated 7 months ago

Was this helpful?

Requirements:

  • external SPI flash, which has firmware stored

  • SPI capable reader (Buspirate, RaspberryPi, Xgecu T56, etc.)

Let's say you find an external flash memory on a PCB: chances are good that it will store interesting information like the bootloader or the root-filesystem.

Steps to Extract Firmware:

  1. Identify the used flash chip by Google the chip description printed on it

    1. in the datasheet of the chip you should find the pinout of the chip (the dot on the chip specifies the upper left corner

    2. Example Pinout:

  2. Connect your Flash reader probes to the pins of the chip:

The quickest and easiest way to connect to a flash chip is by using a clamp, like these:

Attach the clamp to the chip and the end to your programmer/debugger like the Bus Pirate or an Xgecu T56.

If you don't have a clamp, you can also solder cables directly to the needed pins:

If Unsuccessful: The methods before can be unsuccessful as the MCU on the PCB inteferes with the flash chip, making it unable to read out. In that cases you can try to:

  1. Remove clock crystal on the PCB to stop the MCU from running

  2. desolder the flash chip and read it out separately using XGECU T56 for example

If the chip has internal pins (BGA layout) you might be required to desolder the chip.

If you desoldered the chip, you can:

  1. solder jumper cables on the correct pins

  2. read the chip out by placing it on an adapter, like the XGecu T56:

You can also 3D-Print Board Probe Testing Jig like this one:

The needles probes will directly connect to the pins on the chip:

Example pinout of a flash chip
Clamps can be used to connect to pins on chip
clamps connected to an SPI flash
SPI flash is read out using Xgecu T56