This project provides tools to extract and analyze data from Flattened Image Tree (FIT) files using Python. FIT files are commonly used in embedded systems and firmware updates to package multiple images—such as kernels, device trees, and ramdisks—into a single binary. This project allows you to unpack these files, inspect their contents, and extract individual components for further analysis.
For testing purposes, the iDRAC with Lifecycle Controller Firmware executable from Dell was used.
Note: The download link may become unavailable in the future.
- Extract FIT files from firmware executables.
- List the contents of FIT files in a readable format with syntax highlighting.
- Extract individual images from FIT files.
- Handle SquashFS images for deeper inspection.
- Python 3.x
- Required Python packages listed in
requirements.txt
To install the necessary dependencies, run the following command:
pip install -r requirements.txt
This will install the following packages:
libfdt
(Python bindings for libfdt)pyunpack
This script lists the contents of a FIT file in a human-readable format with syntax highlighting. It parses the FIT file structure and displays nodes and properties with colored output for better readability.
python dump_fit.py [path_to_fit_file]
python dump_fit.py extracted/payload/firmimgFIT.d9
This script automates the extraction of the firmware executable, locates the FIT file within it, and extracts the individual images contained in the FIT file.
-
Configure the Script
- Ensure the firmware executable (
iDRAC-with-Lifecycle-Controller_Firmware_XTFXJ_WN64_7.00.00.173_A00.EXE
) is in the same directory as the script. - Adjust the variables in the script if using a different firmware file:
exe_file = "iDRAC-with-Lifecycle-Controller_Firmware_XTFXJ_WN64_7.00.00.173_A00.EXE" extracted_exe_dir = "extracted" fit_file = "extracted/payload/firmimgFIT.d9" output_dir = "firmware"
- Ensure the firmware executable (
-
Run the Script
python FIT-extract.py
The script will:
- Extract the EXE file into the
extracted
directory. - Locate the FIT file (e.g.,
extracted/payload/firmimgFIT.d9
). - Extract images from the FIT file into the
firmware
directory.
- Extract the EXE file into the
- The extracted images may include SquashFS file systems, which can be mounted and explored using appropriate tools.
Many of the extracted files are SquashFS images. To mount and investigate them:
-
Install SquashFS Tools
-
On Linux:
sudo apt-get install squashfs-tools
-
-
Mount the SquashFS Image
mkdir squashfs-root sudo mount -t squashfs -o loop [path_to_squashfs_image] squashfs-root
-
Explore the File System
Navigate the
squashfs-root
directory to inspect the contents.
- Use tools like
binwalk
,hexdump
, orstrings
to analyze binary files. - Decompile or disassemble firmware binaries for deeper analysis.
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request.
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes with clear commit messages.
- Push your branch to your fork.
- Open a pull request detailing your changes.
For any questions or support, please open an issue on the GitHub repository.
This project was developed with invaluable help from ChatGPT and GitHub Copilot. Their assistance in code generation and problem-solving was instrumental in bringing this project to fruition.