CLI tool for documenting, hashing, and signing forensic investigations
Project description
Forensic Log Tracker
A modular CLI tool for digital forensic professionals and students. Designed to execute, document, and cryptographically sign forensic commands during investigations — producing structured, auditable evidence records.
What it does
When you run a command through flt, it:
- Executes the command via the system shell
- Logs the output, truncated to a configurable preview
- Attaches a formal legal explanation for the command (from
explanations.yaml) - Hashes the output with SHA256 for integrity verification
- Optionally signs the log file with your GPG key
- Organizes everything under a named case folder
All evidence is written as plain Markdown .log files alongside a .meta.json sidecar. Reports are generated as a single case_report.md per case.
Requirements
- Python 3.9+
- GPG (GNU Privacy Guard) — Gpg4win on Windows
Installation
pip install forensic-log-tracker
Then run the setup wizard once:
flt setup
This checks for a GPG key, guides you through creating one if needed, and shows you where your config file lives.
Configuration
Your config is stored at ~/.config/forensic-log-tracker/config.yaml. Edit it before starting investigations:
project:
analyst: "Your Name"
timezone: "Europe/Berlin" # Any IANA timezone string
output:
preview_lines: 20 # Lines shown in log preview
hash_algorithm: "sha256"
comment_type: "Comment" # "Comment" or "Callout" (Obsidian-style)
gpg:
enabled: true
auto_verify: true
default_key: "" # Optional: GPG key fingerprint
logging:
level: INFO # DEBUG, INFO, WARNING, ERROR, CRITICAL
To add or extend tool explanations, edit ~/.config/forensic-log-tracker/explanations.yaml. Each entry maps a command (and optional flags) to a formal explanation used in log output and reports.
Usage
Create a case
flt new-case case001 --description "Investigating suspicious USB device"
Creates logs/case001/ in your current directory and writes a description.txt.
Run a forensic command
flt run "strings /bin/ls" --case case001
Produces:
logs/case001/<timestamp>_command.log— Markdown log with output preview, explanation, and hashlogs/case001/<timestamp>_command.meta.json— structured metadata (command, hash, timestamp)logs/case001/<timestamp>_command.log.sig— GPG detached signature (if enabled)
Dry-run mode
flt run "fdisk -l /dev/sdb" --case case001 --dry-run
Logs the command with its explanation and timestamp but does not execute it. Useful for documenting intended actions before touching evidence.
Add a comment
flt comment --case case001 --text "Drive was write-protected before imaging."
Creates a _comment.log file with the analyst name and timestamp. Signed with GPG if enabled.
List all cases
flt list-cases
View case description
flt case-info --case case001
Analyze a case
flt analyze --case case001
Lists all log files and signatures present in the case folder.
Generate a report
flt report --case case001
Writes logs/case001/case001_report.md containing:
- Case description
- Chronological timeline of all commands and comments
- Output excerpts, SHA256 hashes, legal context, and GPG signature status per entry
To skip GPG verification during report generation:
flt report --case case001 --no-verify
Verify output hashes
flt verify-output --case case001
Recomputes the SHA256 hash of each log's output block and compares it against the stored value. Reports OK or Mismatch per file.
Verify a signature manually
gpg --verify logs/case001/<logfile>.log.sig
File structure
~/.config/forensic-log-tracker/
├── config.yaml # Runtime configuration (edit this)
├── explanations.yaml # Tool explanation database (extend this)
└── templates/
└── legal.md.j2 # Jinja2 template for legal explanation rendering
<your working directory>/
├── logs/
│ └── <case-id>/ # All case logs, metadata, signatures, and reports
└── output/ # Generated report output
.gitignore
If you are working inside a git repository, make sure your .gitignore includes:
logs/
output/
*.sig
*.log
*.meta.json
License
MIT — free to use, modify, and extend.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forensic_log_tracker-1.0.1.tar.gz.
File metadata
- Download URL: forensic_log_tracker-1.0.1.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24249fe66a9106f08e6874eca6c104d18f1eecb02f436201613bfba711763d13
|
|
| MD5 |
8aafac663f1a841c57653a806c2a7d0e
|
|
| BLAKE2b-256 |
c1b1c69e82d0224a6f5e50e1fb8d1b43595644a1c55d8128d3eae6ff08edec20
|
File details
Details for the file forensic_log_tracker-1.0.1-py3-none-any.whl.
File metadata
- Download URL: forensic_log_tracker-1.0.1-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
743cdf28d895f4d43ea9948b7cd35510c4056eea0184dbc794109d966c518b68
|
|
| MD5 |
4d598ca1a20984ec408d1e638397b8d6
|
|
| BLAKE2b-256 |
1d1b11b62e134f1a747cedd93f0705c7f6daa826e5f02661460ced0ce561fbb8
|