How brunofischergermany/fuji works
Project Type & Purpose
• Fuji is a specialized, open source forensic acquisition tool aimed at performing live, logical acquisitions on Mac computers.
• Its primary purpose is to generate a DMG file that digital forensics programs can ingest. It supports different acquisition modes (ASR, Rsync, Sysdiagnose) and includes preliminary system checks (folders, free space, network).
• The README and file structure clearly indicate that this is not a web (full-stack) application but rather a command-line/desktop tool developed in Python and packaged as a Universal2 app for macOS.
Key Components Identified from the File Tree
• Main Entry Point:
• fuji.py – This seems to be the central script which likely coordinates the acquisition process.
• meta.py – For managing metadata (versioning, configuration details).
• Acquisition Module:
• The “acquisition” directory contains specific implementations:
▪ abstract.py – Base class/interface for acquisition methods.
▪ asr.py – Implements acquisition using Apple’s ASR (Apple Software Restore) capabilities.
▪ rsync.py – Implements the Rsync mode for file collection.
▪ sysdiagnose.py – Likely gathers system diagnostic information.
• Checks Module:
• The “checks” directory features modules used to verify prerequisites:
▪ abstract.py – Base checks interface.
▪ folders.py, free_space.py, network.py – Check implementations that ensure folders, disk space, network conditions are adequate.
• Packaging:
• The “packaging” directory holds resources and scripts for building, code-signing, and creating the final DMG:
▪ Fuji.icns, Fuji.sh, dmgbuild.py – Used for packaging the app.
▪ The inclusion of the DMG build script and other packaging assets reflect the need to produce a distributable artifact.
• Shared Utilities:
• The “shared” folder includes common utility functions (utils.py) that may be used by both acquisition and checks modules.
Relationships and Interactions
• fuji.py likely acts as the orchestrator:
• It imports modules from the “acquisition” and “checks” directories to perform necessary operations.
• It may also use the “shared” utilities for cross-cutting concerns.
• The acquisition methods (ASR, Rsync, Sysdiagnose) are designed to be interchangeable or selected based on system conditions, while the Checks module ensures that the system meets preconditions for a successful forensic image.
• Packaging scripts are used post-acquisition to bundle the work into a DMG suitable for digital forensic import.
• Meta information from meta.py and configuration details (requirements.txt, PyInstaller spec via Fuji.spec) further tie the build and execution environments together.
Architectural Patterns & Technologies
• Modular design – Separation of concerns between acquisition, checking system prerequisites, and packaging.
• Plugin-like architecture – The use of abstract modules (in both acquisition and checks) suggests that new acquisition or check methods could be added with minimal impact on the main orchestrator.
• Technology stack:
• Python 3.10 is used for development.
• PyInstaller (via Fuji.spec) is used for packaging.
• Standard macOS executables and utilities are leveraged for disk imaging and system interactions.
• The design leverages well-defined modules, each with a single responsibility, which is a common and effective design principle for tools like these.