How garo10/mobitriage works
1. High-level shape
TinyCheck is split into two separate product surfaces:
- a capture/reporting kiosk for end users, and
- an admin backend for configuration and IoC management.
Each surface has its own Vue.js frontend and Python/Flask backend, with a shared Python analysis library under analysis/.
2. User-facing capture plane
The kiosk plane is server/frontend plus app/frontend.
- server/frontend/app/blueprints/* exposes Flask endpoints for device/network setup, capture, saving captures, analysis, and updates.
- app/frontend/src/views/* is the browser UI for selecting Wi‑Fi, creating an AP, running captures, and showing reports.
This is the flow a non-technical user follows on the TinyCheck device.
3. Admin/configuration plane
The management plane is server/backend plus app/backend.
- server/backend/app/blueprints/* provides APIs for configuration, IoCs, whitelist handling, and MISP integration.
- app/backend/src/views/* is the admin UI for editing configuration, managing database-backed settings, and curating IoCs/whitelists.
This plane is used to tune detection and reduce false positives.
4. Traffic capture and analysis pipeline
The main runtime pipeline is:
- a target device joins the TinyCheck network/AP,
- traffic is captured by the frontend server,
- logs/artifacts are passed into the analysis/ package,
- analysis produces a report for the UI.
The analysis package contains dedicated engines for Zeek and Suricata, plus log parsing and report generation.
5. Analysis subsystem
analysis/ is a reusable Python module with:
- parsezeeklogs.py for Zeek log ingestion,
- zeekengine.py and suricataengine.py for detection logic,
- report.py for packaging results,
- locale files for report/UI text.
This is the core detection layer that turns network artifacts into human-readable findings.
6. IoC and whitelist management
The backend plane maintains detection inputs:
- assets/iocs.json and assets/whitelist.json ship default indicator and allow-list content,
- server/backend/app/classes/iocs.py and whitelist.py manage those datasets,
- server/backend/app/blueprints/ioc.py and whitelist.py expose APIs/UI actions,
- server/backend/app/blueprints/misp.py integrates external threat intel.
The whitelist boundary is important: it suppresses known-benign traffic to keep reports actionable.
7. Persistence layer
The repo includes assets/scheme.sql and server/backend/app/db/models.py, indicating a structured database-backed configuration store.
The backend service owns persisted state such as configuration, curated indicators, and whitelist records.
The frontend capture plane appears to consume this configuration rather than own it.
8. External tools and services
Several external components materially shape the architecture:
- Zeek and Suricata for packet/log analysis,
- MISP as a threat-intelligence source,
- hostapd/Wi‑Fi interfaces for ephemeral access point creation,
- optional deployment patterns like standalone/kiosk and network-accessed modes.
These are not just dependencies; they define how TinyCheck attaches to devices and how detections are produced.
9. UI structure
Both web apps are independent Vue builds with their own routing, assets, fonts, and i18n/locales.
- app/frontend focuses on the guided user flow.
- app/backend focuses on admin workflows.
The duplicated locale structure suggests both surfaces are localized separately but share a similar language set.
10. Operational scripts and deployment
Top-level scripts such as install.sh, update.sh, uninstall.sh, and kiosk.sh indicate the project is meant to be installed as a device/appliance rather than deployed as a generic web service.
The repo is therefore closer to a localized security appliance than a single monolithic app.
11. Recommended architecture diagram boundaries
A faithful diagram should show:
- Browser UI for capture/reporting
- Capture/analysis Flask service
- Browser UI for admin/configuration
- Admin/configuration Flask service
- Shared analysis engine
- Persistent config/IoC/whitelist store
- External analysis/intel sources: Zeek, Suricata, MISP
The key data flow is from captured device traffic → analysis engines → report, while the key control flow is from admin curation → config/IoC updates → detection tuning.
Main entry points: backend Admin API · analysis.py Analysis entry · frontend Capture API · iocs.py IoC manager
Components 23
Capture kiosk
User-facing capture and reporting surface
- Capture UI · Guided kiosk interface for Wi-Fi, capture, and reporting
app/frontend - Capture API · Endpoints for device setup, capture, save, analysis, and updates
server/frontend
Admin backend
Configuration and IoC management surface
- Admin UI · Administrative interface for configuration and indicator management
app/backend - Admin API · Backend endpoints for config, IoCs, whitelist, and MISP
server/backend - IoC manager · Curates indicator datasets
server/backend/app/classes/iocs.py - Whitelist manager · Maintains allow-list data
server/backend/app/classes/whitelist.py - MISP client · Integrates external threat intelligence
server/backend/app/classes/misp.py - IoC API · API surface for IoC workflows
server/backend/app/blueprints/ioc.py - Whitelist API · API surface for whitelist workflows
server/backend/app/blueprints/whitelist.py - Config API · API surface for configuration management
server/backend/app/blueprints/config.py - MISP API · API surface for threat-intel sync
server/backend/app/blueprints/misp.py
Analysis core
Shared detection and report generation layer
- Analysis entry · Top-level orchestration for analysis execution
analysis/analysis.py - Zeek logs · Ingests and normalizes Zeek output
analysis/classes/parsezeeklogs.py - Zeek engine · Zeek-based detection logic
analysis/classes/zeekengine.py - Suricata engine · Suricata-based detection logic
analysis/classes/suricataengine.py - Report · Formats findings for the UI
analysis/classes/report.py
Persistent data
Packaged defaults and stored configuration data
- Config model · Structured persisted configuration and state
server/backend/app/db/models.py - Defaults · Seed indicator and whitelist content shipped with the repo
assets
Device ops
Installation and appliance startup scripts
- Device scripts · Install, kiosk, update, and uninstall scripts for appliance deployment
install.sh
External systems
Third-party tools and integration points
- Zeek · Packet and log analysis engine
- Suricata · IDS engine used for detection signals
- MISP · Threat-intelligence source
- Wi-Fi AP · Access-point and wireless interface layer for device onboarding
server/frontend/app/assets/hostapd.conf
Connections 27
- Capture UI → Capture API: user actions · Kiosk UI drives capture and reporting workflows
- Capture API → Analysis entry: send artifacts · Capture service passes logs and artifacts into analysis
- Analysis entry → Zeek logs: parse · Normalize Zeek logs before detection
- Analysis entry → Zeek engine: zeek detect · Run Zeek-based detection logic
- Analysis entry → Suricata engine: suricata detect · Run Suricata-based detection logic
- Zeek logs → Zeek: input · Consumes Zeek-generated logs
- Zeek engine → Zeek: signals · Uses Zeek as an analysis source
- Suricata engine → Suricata: signals · Uses Suricata as an analysis source
- Analysis entry → Report: render · Package findings into a report
- Report → Capture UI: display · Report is presented in the kiosk UI
- Admin UI → Admin API: admin actions · Admin UI manages configuration and indicators
- Admin API → Config API: config · Configuration workflows exposed by backend API
- Admin API → IoC API: ioc · IoC management workflows exposed by backend API
- Admin API → Whitelist API: allow-list · Whitelist management workflows exposed by backend API
- Admin API → MISP API: intel sync · Threat-intelligence integration exposed by backend API
- Config API → Config model: persist · Backend stores structured configuration state
- IoC API → IoC manager: manage · IoC blueprint delegates dataset operations
- Whitelist API → Whitelist manager: manage · Whitelist blueprint delegates dataset operations
- MISP API → MISP client: sync · MISP blueprint delegates intel synchronization
- IoC manager → Defaults: seed · Loads packaged IoC defaults
- Whitelist manager → Defaults: seed · Loads packaged whitelist defaults
- IoC manager → Config model: store · Curated IoCs are persisted in backend storage
- Whitelist manager → Config model: store · Curated whitelist entries are persisted in backend storage
- MISP client → MISP: fetch · Pulls external threat-intelligence data
- Capture API → Wi-Fi AP: ap setup · Creates or manages the device access point
- Device scripts → Capture API: deploy · Scripts boot the capture service in appliance mode
- Device scripts → Admin API: deploy · Scripts boot the admin service in appliance mode