HexDig
June 21, 2026 Β· View on GitHub
π HexDig is a fast, extensible tool for scanning, inspecting, and extracting embedded data from binary files and firmware images.
Inspired by tools like binwalk, HexDig focuses on modern workflows, clear output, and hackable internalsβmaking it ideal for reverse engineers, firmware analysts, and security researchers.
β¨ Features
-
π§ Scan binary files for embedded file signatures
-
π§© Identify compressed data, file systems, and common firmware formats
-
π¦ Extract discovered data automatically or selectively
-
π§ͺ Analyze raw binaries and hex-level structures
-
β‘ Fast scanning with minimal dependencies
-
π Plugin-friendly architecture (WIP)
π Installation
Pre-built releases (easiest)
Pre-built binaries for the latest version are attached to the GitHub releases page:
-
π§ Debian / Ubuntu β
hexdig_<version>_amd64.debsudo dpkg -i hexdig_*_amd64.deb sudo apt-get install -f # only if needed -
πͺ Windows β decompress
hexdig_<version>_win_x64_portable.zip, and start using it by runninghexdig.exea standalone static binary. 7Zip executable and DLL are provided for extraction functionalities
Quick install (Linux, build from source)
For other Linux distributions, the install.sh script detects your
distribution, installs the build dependencies, then builds and installs
HexDig with CMake. Supported families: Debian/Ubuntu, Fedora/RHEL, Arch,
openSUSE, Alpine.
git clone https://github.com/gcarmix/hexdig.git
cd hexdig
./install.sh
Useful flags:
-y,--yesβ non-interactive (don't prompt before installing packages)--no-installβ only build the binary, don't runcmake --install--prefix=/pathβ set a customCMAKE_INSTALL_PREFIX--uninstallβ remove a previously installed copy-h,--helpβ show usage
Build from source manually
Build dependencies: a C++17 compiler, CMake (>= 3.12), pkg-config, and
the development headers for zlib, liblzma (xz) and lzo2.
git clone https://github.com/gcarmix/hexdig.git
cd hexdig
cmake -B build
cmake --build build -j
sudo cmake --install build
Other build paths
- πͺ Windows from source (MinGW) β see docs/building-windows.md
- π¦ Build a
.debyourself β see docs/packaging-deb.md
Installation instructions may change as HexDig evolves.
Packaging support (pip, cargo, apt, etc.) is planned.
π Usage
Basic scan
hexdig firmware.bin
Scan with extraction
hexdig -e firmware.bin
Show detailed output
hexdig -v firmware.bin
π Example Output
* ../inputs/openwrt-18.06.3-mediatek-mt7623-7623n-bananapi-bpi-r2-initramfs-kernel.bin
βββ [0x0000] UIMAGE (length=4259578)
Source: ../inputs/openwrt-18.06.3-mediatek-mt7623-7623n-bananapi-bpi-r2-initramfs-kernel.bin
Info: UImage: ARM OpenWrt Linux-4.14.128, timestamp=2019-06-21
12:17:25 UTC, OS=Linux, CPU=ARM, Type=Kernel,
Compression=None
βββ [0x3c38] XZ (length=4220724)
β Source: extractions/openwrt-18.06.3-mediatek-mt7623-7623n-bananapi-bpi-r2-initramfs-kernel.bin.extracted/0/ARM OpenWrt Linux-4.14.128.bin
β Info: XZ compressed stream, total size: 4220724 bytes
βββ [0x40a3ac] DTB (length=23434)
Source: extractions/openwrt-18.06.3-mediatek-mt7623-7623n-bananapi-bpi-r2-initramfs-kernel.bin.extracted/0/ARM OpenWrt Linux-4.14.128.bin
Info: Device Tree Blob
π§ Configuration
HexDig supports configuration via:
-
Command-line flags
-
Environment variables (planned)
-
Config file support (planned)
Run hexdig --help for all available options.
π§© Supported Parsers
- AES
- Android Sparse
- APFS
- ARJ
- BMP
- BZIP2
- CAB
- CPIO
- CRAMFS
- CRC
- DEB
- DTB
- ELF
- FAT
- GIF
- GPT
- GZIP
- JPG
- Linux
- LZMA
- LZO (lzop)
- MachO
- MBR
- PE
- PNG
- RAR
- ROMFS
- RPM
- 7Z
- SquashFS
- TAR
- UImage
- UBI
- XZ
- ZIP
More formats are continuously being added.
π§ͺ Development Status
β οΈ HexDig is under active development.
APIs, output formats, and features may change.
Contributions, feedback, and testing are very welcome.
π€ Contributing
Contributions are encouraged!
1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Open a pull request
Please include:
-
Clear commit messages
-
Tests when applicable
-
Documentation updates for new features
π License
HexDig is released under the GPL-3.0 License.
See the LICENSE file for details.
π Acknowledgements
-
Inspired by binwalk
-
Thanks to the firmware reverse-engineering and open-source security communities
π« Contact
Have ideas, bugs, or feature requests?
Open an issue or start a discussion on GitHub.
Happy digging π§βπ»