ENGINEERING DEEP DIVE · CASE STUDY 01 AUGUST 2026 · ~8 MIN READ

Systems Architecture & Security Tooling

Inside TraceForge: Building a local-first OSINT & DFIR toolkit.

I built TraceForge because my terminal kept turning into a mess of unsaved shell one-liners, open browser decoders, and unorganized evidence files. Here is an honest look at why I built it, how I split workloads between Python and Go, and the practical systems lessons I learned along the way.

The Quick Version (TL;DR)
  • What it is: A local CLI toolkit that handles the boring, repetitive parts of incident triage — hashing evidence, defanging IOCs, dissecting packet dumps, comparing filesystem snapshots, and exporting STIX 2.1 / MISP bundles.
  • Why build it: Existing desktop forensic suites are too heavy for quick CLI work, web decoders risk leaking confidential artifacts, and raw shell one-liners don't maintain cryptographic hash ledgers.
  • The Stack: Python for the CLI interface, case state, and reporting; Go for multi-threaded SHA-256 hashing and log streaming; Bash for system health checks and platform detection.
  • 100% Offline: Runs entirely on your machine with zero telemetry or cloud dependencies.
TABLE OF CONTENTS
01. The Problem I Was Trying to Solve 02. Why Build This When Tools Already Exist? 03. The Architecture: Python + Go + Bash 04. What an Investigation Looks Like 05. The First-Party Analytical Tools 06. The 7 Investigation Modules 07. The 152-Tool Discovery Catalog 08. Making It Work on Android / Termux 09. Responsible Use & Ethics 10. What I Learned Building It
01

The Problem I Was Trying to Solve

Whenever I worked on digital forensics labs or analyzed sample logs from an incident, my desktop would end up covered in throwaway terminal tabs. I would have one tab running tcpdump, another running a half-written Python regex loop to grab IP addresses, and three open browser tabs with online decoders.

It worked, but it had three obvious flaws that kept bothering me:

1. Operational Security & Privacy Risks If you are analyzing sensitive evidence, pasting un-defanged URLs, domain names, or IP addresses into random web decoders can accidentally leak active case details to third-party servers.
2. No Automatic Chain of Custody When you copy raw evidence files between folders manually, it is easy to accidentally touch a timestamp or modify a file. Without automatic SHA-256 hashing the moment a file enters your workspace, you cannot prove the evidence remained untouched.
3. Timestamp Chaos & Format Fatigue Trying to line up Apache access logs, system auth logs, and Wireshark packet captures by hand requires writing custom parsing scripts every single time.

I wanted a single, cohesive CLI tool that lived directly on my terminal, ran entirely offline, and handled these repetitive tasks with proper forensic hygiene.

RELEASE VERSION v1.0.1 (Stable)
DISTRIBUTION PyPI: traceforge-osint
SUPPORTED RUNTIMES macOS · Linux · Termux
DOCUMENTATION Sphinx on ReadTheDocs
02

Why Build This When Existing Tools Already Exist?

Whenever you build something in the security world, the obvious question is: "Why not just use Autopsy, Maltego, CyberChef, or existing bash commands?" Here is my honest thinking on the trade-offs:

Desktop Forensic Suites (Autopsy, FTK) These tools are great for full hard-drive forensics in a courtroom context, but they are massive multi-gigabyte installations with heavy desktop GUIs. When you are on an SSH session, a minimal cloud VM, or a lightweight laptop, you need a quick, scriptable CLI instead.
Web-Based Decoders (CyberChef) CyberChef is a fantastic utility, and I use it often for one-off tasks. But browser tabs cannot manage local evidence vaults, cannot automatically compute SHA-256 ledgers, and cannot run in air-gapped environments without local setup.
Raw Linux One-Liners (`grep`, `awk`, `sha256sum`) You can do almost anything with bash, but you end up rewriting the exact same 10-line awk script every week just to defang IP addresses, calculate directory hashes, and format output into STIX 2.1 JSON.
Cloud OSINT Services Most modern OSINT tools have pivoted to closed-source SaaS platforms with paid credits and user tracking. TraceForge is completely free, open-source, and runs 100% locally.

The Learning Benefit: Beyond the practical utility, building TraceForge myself was the fastest way to truly understand the underlying protocols. Writing regex defangers, packet dissectors, hash ledgers, and STIX schemas from scratch forces you to understand every protocol byte and data structure at a fundamental level.

03

The Architecture: Python + Go + Bash

I didn't want to be dogmatic about using just one language. Each language in TraceForge has a specific job where it shines:

01 · OPERATOR INTERACTION Direct CLI Subcommands · Interactive Rich TTY Terminal · Local-Only Web Dashboard
02 · PYTHON ORCHESTRATION LAYER Case Workspace Engine · 7 Investigation Modules · Threat Intelligence Parsers · STIX 2.1 & MISP Exporters
03 · GO COMPILED FAST PATHS Multi-threaded SHA-256/MD5 hashing · High-throughput IOC regex streaming · Fast filesystem differential diffing
04 · BASH LIFECYCLE HELPERS Platform diagnostics (`doctor`) · Environment repair · 152-tool system package discovery

Python for High-Level Workflow Agility

Python is the glue. It handles the Click CLI commands, the SQLite database for case metadata, the Rich terminal formatting, and the export engines for Markdown, HTML, CSV, and STIX 2.1 bundles. It also makes distribution via PyPI very clean.

Go for Raw I/O & Parallel Hashing

Hashing 50,000 files in a filesystem baseline check in pure Python is noticeably slow because of interpreter overhead. I wrote dedicated Go native routines (traceforge-go-fastpaths). Using goroutines and memory-mapped buffers, the Go binary hashes directories in parallel at raw disk throughput.

Silent Fallback: If the compiled Go binary is not available on a particular machine, TraceForge automatically falls back to standard Python routines without throwing an unhandled exception or crashing the CLI.

04

What an Investigation Actually Looks Like

TraceForge guides the analyst through a clean, reproducible terminal workflow. Click the command tabs below to inspect real lifecycle traces:

traceforge — lifecycle walkthrough
$ traceforge tools ioc-extract ./evidence/auth_failures.log --defang --json
[+] Scanned 4,120 lines in 14ms (via Go native engine)
[+] Extracted 14 unique indicators:
    [IP]     198.51.100.24         → defanged: 198.51.100[.]24
    [IP]     203.0.113.19          → defanged: 203.0.113[.]19
    [DOMAIN] malicious-c2.test     → defanged: malicious-c2[.]test
    [URL]    http://bad.test/drop  → defanged: hxxp://bad[.]test/drop
    [HASH]   e3b0c44298fc1c149afb… → indexed SHA-256

Every case is stored in its own SQLite database and immutable evidence folder, so you can easily archive, compress, or back up an investigation whenever you need to.

05

The First-Party Analytical Tools

TraceForge includes purpose-built tools designed for fast, reliable terminal work:

IOC Extraction & Defanging Regex parsers that identify IPv4, IPv6, MD5, SHA-1, SHA-256, domains, URLs, and cryptocurrency addresses, with automatic defanging (like converting http:// to hxxp:// and bracket-masking dots) to prevent accidental click-throughs.
PCAP Traffic Dissector Inspects packet captures offline to compute TCP handshake anomaly ratios, DNS query histories, HTTP user-agents, and top talking IP pairs without needing Wireshark GUI overhead.
Filesystem Baseline & Diff Engine Takes cryptographic snapshots of directories before executing suspected software. Running traceforge tools diff quickly surfaces newly created files, permission changes, and persistence mechanisms.
Interactive Entity Graphing Compiles indicator relationships into standalone, self-contained HTML/D3 visualization files that open directly in any browser without requiring an internet connection.
06

The 7 Investigation Modules

To keep common investigative tasks organized, TraceForge structures them into 7 modular pipelines:

Module 01: Media & Image Forensics Extracts EXIF metadata, camera serial numbers, lens specifications, GPS coordinates (with decimal degree mapping), and embedded thumbnails.
Module 02: Network Recon & PCAP Triage Dissects offline network captures, maps communication flows, and highlights unencrypted authentication traffic.
Module 03: Identity & Social Research Correlates public platform identifiers and analyzes public profile metadata strictly across authorized open sources.
Module 04: Email & Breach Intelligence Validates email syntax, inspects DNS MX/SPF/DMARC hygiene records, and correlates offline public disclosure databases.
Module 05: Domain & DNS Intelligence Performs non-intrusive DNS record lookups (A, AAAA, MX, TXT, CNAME, SOA), zone transfer checks, and certificate transparency inspections.
Module 06: Document Metadata Harvesting Extracts author usernames, software versions, editing timestamps, and hidden revision histories from PDFs, Office docs, and text files.
Module 07: Defensive OPSEC Audit Inspects local listening ports, active socket bindings, default routes, and outbound gateway IP leakages on the analyst's workstation.
07

The 152-Tool Discovery Catalog

You shouldn't have to remember every single obscure CLI flag or search online to see if a utility is installed. TraceForge includes a built-in catalog of 152 external security utilities categorized across 10 disciplines (Network, OSINT, Forensics, Web, Reverse Engineering, etc.).

The tool queries your system package manager — whether you are on Debian/Ubuntu (apt), Arch Linux (pacman), Fedora (dnf), macOS (brew), or Android (pkg in Termux). It checks if a binary is on your $PATH and shows concise documentation and install commands without blindly running unexpected scripts.

08

Making It Work on Android / Termux

Getting a full forensic CLI to run reliably across macOS, Linux servers, and Android Termux meant dealing with a few real-world systems quirks:

  • Dynamic Environment Prefixes: Android Termux places binaries and libraries under /data/data/com.termux/files/usr/. Hardcoded paths like /tmp or /etc/ fail immediately. TraceForge resolves paths dynamically using os.environ.get('PREFIX') across all file handlers.
  • Cross-Compiled Architecture Binaries: The native Go subroutines are compiled for linux/amd64, linux/arm64, darwin/amd64, and darwin/arm64. TraceForge checks the host architecture at runtime to load the correct binary.
  • Terminal Rendering: Interactive TTY menus and box-drawing characters adapt automatically on minimal mobile terminal emulators to avoid corrupted escape sequences.
09

Ethics & Responsible Use

Strict Authorization Policy

Security tooling carries dual-use responsibility. TraceForge was designed explicitly for authorized digital forensics, defensive incident triage, security research, and educational lab work. The documentation and CLI enforce local processing by default, ensuring tools operate strictly on systems, accounts, networks, and datasets where explicit authorization has been granted.

10

What I Learned Building It

Building TraceForge gave me direct, hands-on experience solving real software engineering problems:

  • Defensive Parsing is Hard: Real-world logs contain broken lines, non-UTF-8 characters, and corrupted archive headers. Building parsers that never crash on bad input requires thorough edge-case handling.
  • Schema Conformance Matters: Implementing STIX 2.1 and MISP JSON exports taught me how to make independent tools cleanly interoperable with enterprise SIEM systems.
  • Documentation is Core Infrastructure: Writing clear documentation on ReadTheDocs with Sphinx helped me clarify API boundaries and maintain a project I am proud to share publicly.

TraceForge continues to evolve as I advance my cybersecurity studies — with upcoming work focused on expanding test coverage, optimizing memory during large entity graph clustering, and writing more forensic lab guides.