Acquire and verify EnCase 6 EWF/E01 images. A fallback when commercial tools are missing, broken, or not allowed.
Version 1.0.0 (Alpha). Linux TUI/CLI and Windows GUI. Does not use libewf. Chunks use libdeflate zlib. MD5 is stored in the image. SHA-256 of the same bytes is written next to the image (EnCase 6 has no SHA-256 field).
Work in progress. Use at your own risk. The author is not responsible for any loss of data.
After a Linux install, the man pages are the reference for each command
(man fallbackimager). This README is the same facts in one place,
plus Windows and build notes.
| Tool | Platform | Role | Manual |
|---|---|---|---|
mkewf / mkewf_win.exe |
Linux / Windows | Acquire a file or device as EnCase 6 E01 | mkewf(1) |
chckewf / chckewf_win.exe |
Linux / Windows | Verify an E01 (structure, zlib, MD5) | chckewf(1) |
fallbackimager |
Linux | TUI/CLI frontend for mkewf, chckewf and blckd | fallbackimager(1) |
make-fbimage |
Linux | Debian stable boot image for a portable drive | make-fbimage(1) |
blckd |
Linux | Background software write-blocker for newly attached disks | blckd(8) |
blockdevsro |
Linux | One-shot: set unmounted block devices read-only | blockdevsro(8) |
winfi.exe |
Windows 10/11 | Same job from a portable GUI folder | Help in the GUI |
blckd and blockdevsro are not hardware write-blockers. Do not mount
evidence disks.
Every mkewf or chckewf run writes the running tool, its C source and
LICENSE into <target>.progs.zip next to the E?? files. Names inside
the zip are the originals (mkewf / mkewf.c / LICENSE on Linux,
mkewf_win.exe / mkewf_win.c / LICENSE on Windows; chckewf the
same way). Acquire then verify add to the same zip. Source is linked
into the binary, so this works wherever the tool is copied or launched.
LICENSE is taken from next to the tool, or from the copy built into
the binary.
The zip stays if the run fails or is cancelled. .txt / .json /
.chck reports from an aborted job are not kept. chckewf -w writes
<image>.chck.txt and <image>.chck.json only.
Needs Python 3.13+ (Debian stable: python3), python3-curses, and
gcc. ./make-c.sh fetches libdeflate 1.22 once and links it
statically into mkewf and chckewf, so no libdeflate package is needed
at runtime. No pip packages.
sudo apt install python3 python3-curses gcc curl
./make-c.sh
./fallbackimager.sh
./fallbackimager.sh runs python3 fallbackimager/. With no -m/-k
the TUI starts. Other flags prefill the main screen.
Config files are looked up in this order: ~/.config/fallbackimager,
/etc/fallbackimager, then the source tree. [settings] is written to
~/.config/fallbackimager/config.toml. [definitions] (including
target_path and start_writeblocker) is not rewritten. Case number,
evidence number, description, source and target paths are not stored.
Leaving the TUI always stops blckd.
To install on an Arch or Debian host (not the boot image):
./make-c.sh
sudo ./install-linux.sh
That puts fallbackimager, make-fbimage, mkewf, and chckewf in
/usr/bin, blckd and blockdevsro in /usr/sbin, man pages in
/usr/share/man, the Python tree in /usr/lib/fallbackimager, and the
TOML templates in /etc/fallbackimager. winfi and Windows
executables are not installed. PREFIX and DESTDIR work as usual
(PREFIX=/usr/local sudo ./install-linux.sh).
Arch AUR: packaging/arch/PKGBUILD is a fallbackimager-git package
(makepkg -si from that directory after the PKGBUILD is on the AUR).
When you want to publish: ./packaging/arch/push-aur.sh
(--dry-run prepares files and does not push). It builds the Linux
tools only. Python on Arch already includes curses.
Debian .deb (python3 >= 3.13):
./packaging/debian/make-deb.sh
sudo dpkg -i dist/fallbackimager_*.deb
Acquire (TUI Make EWF, or -m / --mkewf) needs case number, evidence
number, examiner and description. Notes are optional. If -C / Case is
omitted, the target directory name is used. If that name is empty,
mkewf is not started. Examiner defaults to the login name in uppercase.
Target (-t) is a directory, a file path without .E01, or a
destination block device. If omitted, the current directory is used.
If -t does not exist and -C is omitted, that path is created as the
case directory.
SOURCE is optional. If omitted, blckd starts, you plug in a source drive, then select it from the list (Up/Down, Enter). If SOURCE is given, it is a block device or a file.
fallbackimager
fallbackimager -h
fallbackimager -m -D "PC01 HD01" -E EV1 /dev/sda
fallbackimager -m -k -t /cases/26-001 -D "PC01 HD01" -E EV1
fallbackimager -k -t case/image
From a checkout, use ./fallbackimager.sh the same way.
-m / --mkewf runs mkewf without the TUI. -k / --chckewf runs
chckewf without the TUI. Both together run mkewf first, then chckewf
-w (writes <target>.chck.txt and <target>.chck.json). Media type
is --media_type (short -m is make). Config is --config only
(-c is compression). Full option list: man fallbackimager.
Esc and Ctrl+C ask to quit the TUI. A second press confirms. During a job they abort the tool, then leave. Mouse works when the terminal supports it.
make-fbimage (or python3 make-fbimage.py from a checkout) builds a
Debian stable USB image. The last argument is the target: an image
file, or a whole disk (not a partition). Config is looked up in
~/.config/fallbackimager, /etc/fallbackimager, then
make-fbimage.config.toml in the project directory. CLI flags are
written back to the user file, or to the project file when that is the
copy that was loaded. The target is not stored.
GPT layout is EFI, then the system partition. A file target is sized
to those partitions (-z / -o, or the config) and has no data
partition. A whole disk (not a partition, e.g. /dev/sdb not
/dev/sdb1) is partitioned in place. Confirm overwrite with arrow
keys (starts on No). You are offered a data partition for the
image(s); -a accepts without asking.
If already root, no sudo. Otherwise sudo is used for an image file and
for a whole disk (password at most once, only if sudo needs one). Needs
debootstrap, debian-archive-keyring, parted, and the filesystems tools. Build
the C tools first (./make-c.sh). Pass --download to fetch Debian
into /var/cache/debootstrap (or -l). Later runs reuse that cache.
sudo apt install debootstrap debian-archive-keyring parted dosfstools e2fsprogs ntfs-3g
make-fbimage -h
make-fbimage --download /tmp/fbimage.raw
make-fbimage --download /dev/sdX
On boot the media runs blockdevsro (mounted boot disk stays writable)
and then the acquire dialog. Other disks are offered for imaging. If a
data partition is on the boot media you can save there or plug in
another drive. The image only gets fallbackup.py, its Python helpers,
mkewf, chckewf, and blockdevsro (not the TUI or blckd). Full
option list: man make-fbimage.
mkewf -t case/image /dev/sdX
chckewf -w case/image
blckd
blockdevsro
blckd and blockdevsro install to /usr/sbin. Use the full path if
sbin is not on PATH. See man mkewf, man chckewf, man 8 blckd
and man 8 blockdevsro.
Build on Linux with MinGW-w64:
./make-exe.sh
That writes a static portable folder winfi/ and winfi_v<VERSION>.zip.
The zip name uses the VERSION string in c/winfi.c (not the Linux
__version__.py). The zip unpacks to a winfi/ folder with a flat
layout: winfi.exe, mkewf_win.exe, chckewf_win.exe, mkewf_win.c,
chckewf_win.c, README.md, LICENSE. No MinGW DLLs. Run winfi.exe
as Administrator.
winfi.exe launches mkewf_win.exe and chckewf_win.exe from the same
folder. Source may be a file, \\.\PhysicalDriveN, \\.\X: or a volume.
Make EWF needs a source, a target path, case number, examiner and
description. Evidence and notes are optional. Browse parent uses the
folder name as the case number. Make and check EWF runs chckewf -w
after mkewf.
There are no Windows man pages. Use Help in winfi.exe, or
mkewf_win.exe -h / chckewf_win.exe -h from a console.
- EnCase 6 E01 only. Segment names
.E01...E99, then.EAA, ... - Default segment split is
/40(image size divided by 40, rounded to 1 GiB)./1writes one segment. - Compression
-cis libdeflate 0..12 (default 6). Level 0 stores raw. - Jobs
-jis the total thread count.0orautois max(3, CPUs/2). - MD5 of the acquired bytes is stored in the EWF hash and digest
sections. SHA-256 of the same bytes is in
<target>.txtand, on success,<target>.json.
After install:
man fallbackimager
man make-fbimage
man mkewf
man chckewf
man 8 blckd
man 8 blockdevsro
From a checkout:
man -l man/man1/fallbackimager.1
./fallbackimager.sh -h
python3 make-fbimage.py -h
./mkewf -h
./chckewf -h
./blckd -h
./blockdevsro -h
On Windows: Help in winfi.exe, or mkewf_win.exe -h / chckewf_win.exe -h
from a console.
MIT. See LICENSE.
Author: Markus Thilo, markus.thilo@proton.me
