A Python tool for extracting raw firmware binaries from DFU (Device Firmware Update) containers, optimized for reverse engineering with Ghidra. Perfect for analyzing Flipper Zero and other embedded device firmware.
DFU Format Support: Handles both standard DFU and DfuSe (ST Microelectronics) formats Multi-Target Extraction: Automatically extracts all firmware targets from DfuSe files Ghidra-Ready: Outputs raw binaries ready for import into Ghidra or other RE tools
No external dependencies (uses only Python standard library)
Extract firmware from DFU file:
python dfu-bin-extractor.py firmware.dfu
python dfu-bin-extractor.py firmware.dfu -o extracted_firmware
python dfu-bin-extractor.py firmware.dfu -i
Command Line Options positional arguments: input Input DFU file
optional arguments: -h, --help Show help message and exit -o OUTPUT, --output OUTPUT Output file prefix (default: input filename without extension) -i, --info Show DFU file information without extracting
After extracting your firmware:
Create New Project: File → New Project → Non-Shared Project Import Binary: File → Import File → Select your .bin file Configure Import:
Format: Raw Binary Language: ARM Cortex (for STM32) or appropriate architecture (Flipper Zero use little endian) Base Address: Use the address shown by the extractor (e.g., 0x08000000)
Analyze: Analysis → Auto Analyze → Select all analyzers → Analyze
Flipper Zero Development: Extract and analyze Flipper Zero firmware updates
Research: Reverse engineer closed source firmware