Go to file
CyberMind-FR bc5c222550 fix(toolbox): R3 verification page on kbin reads wrong source IP (ref #498)
Screenshot from the iPhone showed mitm-wg's R3 banner header firing
correctly (SHA1 visible) but the verification card body reading
"Hors tunnel R3 — tu accèdes à kbin via Internet direct". The detection
chain was wrong in two places :

1. mitm-wg proxied upstream WITHOUT propagating the WG peer IP.  By the
   time the request landed at the toolbox FastAPI (after looping
   wg-toolbox → mitm-wg → HAProxy → nginx) it carried the box's own IP
   as the source.

2. The toolbox FastAPI's R3 check read request.client.host — which is
   the proxy peer (unix socket) not the real client. Even when XFF was
   set by nginx the code ignored it.

3. The verification page JS probes http://10.99.0.1:8088/qr/splash.png
   to detect tunnel state. That address is on the wlan AP iface which
   is linkdown in normal operation — packets from the WG subnet had no
   reply path (rp_filter symmetry violation) and the image always
   failed to load, so JS concluded "off tunnel" no matter what.

Fixes :

  - New mitmproxy addon `inject_xff.py` loaded FIRST in mitm-wg launch.
    Sets `X-Forwarded-For` carrying flow.client_conn.peername plus
    sentinel headers `X-Through-R3-Tunnel: 1` and `X-R3-Peer: <ip>` so
    downstream backends can detect tunnel state cheaply.
  - `secubox_toolbox/api.py` : new `_client_ip(request)` helper that
    prefers `X-R3-Peer` > leftmost XFF > raw socket peer. Splash and
    `_resolve()` both use it now.
  - `nftables.d/secubox-toolbox-wg.nft` : adds DNAT
    iif wg-toolbox dst 10.99.0.1 tcp dport 8088 → 10.99.1.1:8088 so
    the JS probe lands on the captive portal even when wlan is down.
  - `systemd/secubox-toolbox.service.d/20-bind-all.conf` : binds the
    captive portal uvicorn on 0.0.0.0:8088 (was 10.99.0.1:8088, only
    reachable on wlan). The DNAT above + this bind together let WG
    peers hit the verification probe successfully.

Live on gk2 : `http://10.99.1.1:8088/qr/splash.png` returns 200,
mitm-wg launches with inject_xff first in the addon chain, refresh of
kbin.gk2.secubox.in verification page now follows the "Tunnel R3 actif"
path.
2026-06-07 07:55:57 +02:00
.claude docs: WIP + HISTORY entries for Phase 7.D ASGI consolidation (ref #498) 2026-06-06 16:44:42 +02:00
.gitea/workflows ci: mirror .github/workflows -> .gitea/workflows (closes #177) (#178) 2026-05-17 10:56:49 +02:00
.github/workflows fix(ci): collect+upload kernel .deb on failure (linux-image often built before headers fail) 2026-06-02 14:17:22 +02:00
.superpowers/brainstorm/1465198-1777214258
.vscode fix(eye-remote): Prevent duplicate IP on USB composite gadget 2026-05-07 04:54:38 +02:00
apt feat(secubox): complete meta-script generator Tasks 14-17 2026-05-11 05:32:29 +02:00
board fix(kernel): drop signed-regdb requirement (FR enforced userspace, unblocks cross-arm64 build) 2026-06-02 13:13:57 +02:00
cache/repo
cmd/secubox fix(apt): Use binary keyring URL so apt accepts the signed-by= source (ref #89) 2026-05-12 12:23:02 +02:00
common feat(secubox-toolbox): DPI classifier 57→147 patterns + fix R3 metrics aggregation (ref #496) 2026-06-06 06:55:10 +02:00
config feat(config): Add metablogizer flat config (165 sites) 2026-05-06 17:42:30 +02:00
daemon
docs feat(secubox-toolbox): 3 QR code endpoints + splash QR display + 9th dashboard widget (device fingerprint) + README poster integration (ref #495 #497) 2026-06-05 11:24:03 +02:00
doctrine/opad docs(opad): add doctrine documents (OPAD.md, CSPN.matrix.md, OPAD-OPERATIONS.md) 2026-05-12 09:30:16 +02:00
hardware feat(eye-remote): Add display state machine with splash and fallback modes 2026-04-28 14:48:00 +02:00
image feat(image): add WiFi firmware blobs + regulatory DB to live-USB 2026-06-02 13:00:27 +02:00
kernel-build revert(kernel): drop DTS patch 004 USB3-on-mPCIe (WLE900VX QCA9880 PCIe backhaul installed, closes #465) 2026-06-02 17:47:26 +02:00
packages fix(toolbox): R3 verification page on kbin reads wrong source IP (ref #498) 2026-06-07 07:55:57 +02:00
profiles feat(secubox): complete meta-script generator Tasks 14-17 2026-05-11 05:32:29 +02:00
prototypes feat(ui): Universal hybrid-skin theme with global status/menu bars 2026-05-08 16:42:51 +02:00
redroid
remote-ui fix(eye-square): relocate firstboot.sh out of /usr/local/sbin/ (closes #207) (#208) 2026-05-19 06:53:31 +02:00
repo fix(repo): Dearmor GPG key on import in install.sh (ref #80) 2026-05-12 10:09:09 +02:00
schemas feat(opad): add JSON Schema for 3-prong profile 2026-05-12 08:58:10 +02:00
scripts fix(build): scripts/build-packages.sh — auto-discover packages instead of hardcoded list 2026-05-27 10:24:16 +02:00
templates
tests Mail Phase 2 — Rspamd migration (closes #153) (#160) 2026-05-18 08:21:23 +02:00
tools feat(tow-boot): Add Tow-Boot with eMMC boot support for MOCHAbin 2026-05-03 16:58:25 +02:00
vm feat(eye-remote): Add display state machine with splash and fallback modes 2026-04-28 14:48:00 +02:00
wiki docs: codify dual-vhost MUST for modules with a real web UI 2026-05-24 10:06:56 +02:00
.cache-lint-allowlist.toml feat(scripts): add check-dashboard-cache.py lint + CI (closes #147) (#148) 2026-05-18 08:21:20 +02:00
.gitignore feat(webext): avatar personas — selectable login bundles + one-click Become (ref #409) 2026-05-28 14:13:20 +02:00
build-eye-remote-full.sh feat(eye-remote): v2.3.0 - Auto-fallback dashboard with splash 2026-04-28 16:39:59 +02:00
CLAUDE.md docs: add multi-agent worktree workflow doctrine to CLAUDE.md (ref #83) 2026-05-12 10:05:09 +02:00
HOWTO-grammar.md docs: codify the SecuBox CTL grammar (closes #216) (#217) 2026-05-19 08:01:08 +02:00
LICENCE-CMSD-1.0.md license: Add CMSD-1.0 (CyberMind Source-Disclosed) license 2026-05-06 09:49:17 +02:00
LICENSE-CMSD-1.0.en.md license: Add CMSD-1.0 (CyberMind Source-Disclosed) license 2026-05-06 09:49:17 +02:00
LICENSING.md license: Add CMSD-1.0 (CyberMind Source-Disclosed) license 2026-05-06 09:49:17 +02:00
PROMPT_SYSTEM.md
pytest.ini fix(auth): consolidate sessions/audit file constants, harden _DATA_DIR.mkdir, fix pytest.ini footgun (ref #120) 2026-05-13 09:25:08 +02:00
README.md docs: Phase 7.A.2 + 7.B wrap-up — HISTORY/WIP/TODO/README + wiki + FAQ (ref #498) 2026-06-05 17:29:37 +02:00
REPORT-2026-04-10.md
secubox.conf.example feat(core): SSO-lite session cookie + /auth/verify for nginx auth_request (ref #400) 2026-05-28 10:09:49 +02:00
setup-dev.sh
TOOLS.md

SecuBox

SecuBox OS - Network Security Appliance

Your Network Security Appliance — Plug, Protect, Peace of Mind

Release Packages Live USB Installer License: CMSD-1.0


📡 VILLAGE3B — Cabine Numérique Gondwana ToolBoX

Poster grand public VILLAGE3B

Diagnostic compromission iPhone gratuit · Anonyme · Open Source

3 niveaux d'opt-in (R0 bypass complet, R1 analyse passive ✓ recommandée, R2 TLS-break + bandeau). Rapport téléchargeable avec 9 widgets metrics : 🌐 connexions · 📡 hôtes · OK 2xx · 🔒 cert-pinning · 📺 apps · 🍪 trackers · 🌍 pays · 🎯 score · 📱 device. Conformité CSPN ANSSI + LCEN. Aucune donnée externe.


License — CyberMind Source-Disclosed (CMSD-1.0)

Source disclosed, rights reserved.

This software is released under the CyberMind Source-Disclosed License v1.0 — a source-available license designed for transparency and security auditability while preserving all commercial rights.

What you CAN do What you CANNOT do
Read and study the source code Use in production (any environment)
Compile for isolated testing/audit Redistribute or create derivatives
Publish security research results Integrate into other products
Quote in academic/journalistic contexts Provide as hosted service (SaaS)

ANSSI CSPN Ready: The license explicitly authorizes audits by accredited security labs (CESTI, CC equivalents) without prior authorization.

See LICENCE-CMSD-1.0.md (French, authoritative) or LICENSE-CMSD-1.0.en.md (English, informative).

Metric Value
Packages 139 .deb packages
Migration 131/139 modules migrated
APIs FastAPI + JWT auth
![Arch](https://img.shields.io/badge/Architecture-amd64_ _arm64-orange)

SecuBox transforms any compatible device into a complete network security appliance with VPN, firewall, intrusion detection, and web dashboard — all preconfigured and ready to use.

Status (2026-06-02) — Versioning is dev alpha. The current line (v2.13.x) is all-in-the-pipe working — partly efficient, partly modules-integration-ready, partly upgradeable, first-point POC. Design philosophy : KISS. SecuBox aims to be a full operating system for a security tool — a Swiss army knife + modular OS appliance. See the wiki Use-Cases page for scenario-by-scenario tweaks.


Latest Releases

Latest stable All releases Downloads

v2.13.x — Main system line (2026-05-29 → ongoing)

The current release line. v2.13.4 unblocked the arm64 APT publish (chain #425 / #427 / #431). v2.13.10 produced the first working rpi400 kiosk image (chain #433 / #436). v2.13.11 mass-masks non-essential services so the kiosk boots on a 4 GB Pi 400 (#442). v2.13.12 enables the X cursor on the kiosk for salon-ready operator visibility (#444).

Target File Notes
VirtualBox / QEMU / KVM (amd64) secubox-vm-x64-bookworm.img.gz service cascade in VBox is a known limit, #422
Live USB / amd64 PC secubox-live-amd64-bookworm.img.gz validated in VBox, boots to kiosk login
MOCHAbin (Marvell Armada 7040) secubox-mochabin-bookworm.img.gz primary appliance target
Raspberry Pi 400 / Pi 4 secubox-rpi-arm64-bookworm.img.gz kiosk-by-default since v2.13.10
Installer ISO (any amd64 host) secubox-installer-amd64-bookworm.iso.gz dual format .iso + .img
APT repository https://apt.secubox.in/ signed arm64 + amd64 since v2.13.4
SHA256SUMS SHA256SUMS verify every download

All artefacts are attached to the latest release page — links above are illustrative ; the shield at the top of this section follows the latest stable tag automatically.

v2.2.1-eye-remote — Round display (2026-05-11)

Side-line image for the Pi Zero W round-display dashboard. Not part of the main v2.x.y line — refreshed independently when the kiosk stack moves.

Target Download
Pi Zero W + HyperPixel 2.1 Round secubox-eye-remote-2.2.1.img.xz

Verifying downloads

Every release attaches a SHA256SUMS file alongside the artifacts. Verify before flashing:

sha256sum -c SHA256SUMS 2>&1 | grep -v 'OK$' || echo "all hashes match"

For the amd64 VirtualBox target there's a turn-key tester bundle under output/ci-vm-x64-25983593168/ — drop-in verify.sh + raw_to_vdi.py (no qemu-img/VBoxManage needed) + step-by-step README.md. Boot in 4 commands; see output/ci-vm-x64-25983593168/FIX-PXE.md if the VBox EFI ever lands on the PXE screen.

→ See all releases on GitHub


What You Get

  • VPN Server — WireGuard with QR codes for mobile devices
  • Intrusion Detection — CrowdSec IDS/IPS with automatic threat blocking
  • WAF Active Enforcement — mitm pattern detection → CrowdSec → nft kernel drop (~12s round-trip). Plus pre-mitm rate-limit (slowloris kill) and nginx honeypot routes. See wiki.
  • R3 Portable Tunnel — WireGuard + transparent mitm so the cabine's privacy analysis follows you anywhere (4G, public WiFi). Multi-OS install guide here.
  • Network Monitoring — Real-time traffic analysis and bandwidth control
  • Web Dashboard — Modern dark-themed interface accessible from any browser
  • Automatic Updates — Security patches applied automatically

Quick Start

Option 1: VirtualBox (Try It Now)

Download and run in VirtualBox — no hardware required:

# Download the image
wget https://github.com/CyberMind-FR/secubox-deb/releases/latest/download/secubox-live-amd64-bookworm.img.gz

# Extract
gunzip secubox-live-amd64-bookworm.img.gz

# Create VM (requires VBoxManage)
./scripts/create-secubox-vm.sh secubox-live-amd64-bookworm.img

Access: Open https://localhost:9443 in your browser Login: admin / secubox

Option 2: Live USB (Any PC)

Boot from USB on any x86_64 computer:

# Download
wget https://github.com/CyberMind-FR/secubox-deb/releases/latest/download/secubox-live-amd64-bookworm.img.gz

# Flash to USB (replace /dev/sdX with your USB device)
zcat secubox-live-amd64-bookworm.img.gz | sudo dd of=/dev/sdX bs=4M status=progress

Boot from USB, then access the dashboard at https://<device-ip>/

Option 3: Dedicated Hardware

For 24/7 operation, flash to dedicated hardware:

Device Best For Image
Raspberry Pi 4/5 Home use secubox-rpi-arm64-*.img.gz
ESPRESSObin Small office secubox-espressobin-v7-*.img.gz
MOCHAbin Enterprise secubox-mochabin-*.img.gz
Any x86_64 PC Repurposed hardware secubox-live-amd64-*.img.gz

Features

Security Dashboard

Central control panel showing system health, active threats, and quick actions.

VPN (WireGuard)

Create VPN connections with one click. Scan QR codes on mobile devices.

Intrusion Detection (CrowdSec)

Automatic threat detection and IP blocking with community threat intelligence.

Network Control

  • Bandwidth management (QoS)
  • Device access control
  • Deep packet inspection
  • Virtual hosts with SSL

System Management

  • Service control
  • Log viewer
  • Automatic backups
  • Easy updates

CTL Grammar — modular tools box

Copyright spiritual concept · Gérald Kerma · 1991

Each SecuBox module exposes its capability through three surfaces — a web UI, a FastAPI API, and a CTL command (/usr/sbin/<module>ctl). The CTL is the grammar of the system: each verb is a sentence addressed to a specific layer of the operator's expressive control over their own infrastructure.

Layer Verb
ROUTING haproxyctl vhost add/remove
INTERCEPTION mitmproxyctl route add/remove/list
REPLICATION giteactl repo mirror add/remove
IDENTITY giteactl user add/remove
CI EXECUTION giteactl runner add/remove/list
PUBLISHING publishctl post / dropletctl publish / metablogizerctl site
EMANCIPATE metablogizerctl tor expose/revoke
HOSTING streamlitctl app deploy/.../info
DEV WORKBENCH streamforgectl project create/.../templates
OPS MONITORING healthctl check/list/status/alert

Composing the verbs expresses end-to-end workflows in three lines of shell. See docs/grammar.md for the conceptual frame and the layered architecture map.

To add a 9th verb, follow HOWTO-grammar.md — the six-step recipe takes about an hour for a Bash CTL.


Eye Remote — External Dashboard

SecuBox Eye Remote

A standalone round display that connects to SecuBox via USB OTG, showing real-time metrics with a cyberpunk 3D visualization.

Feature Description
Hardware Raspberry Pi Zero W + HyperPixel 2.1 Round (480×480)
Connection USB OTG composite gadget (network + serial)
Display 3D rotating cube + rainbow ring metrics
Metrics CPU, Memory, Disk, Temperature, WiFi RSSI

Quick Start

# Download Eye Remote image
wget https://github.com/CyberMind-FR/secubox-deb/releases/download/v2.2.1-eye-remote/secubox-eye-remote-2.2.1.img.xz

# Flash to SD card
xzcat secubox-eye-remote-2.2.1.img.xz | sudo dd of=/dev/sdX bs=4M status=progress
  1. Insert SD in Pi Zero W with HyperPixel display
  2. Connect USB DATA port (middle) to SecuBox
  3. Dashboard appears automatically (~60s boot)

SSH: pi@10.55.0.2 (password: raspberry)

📖 Full documentation: remote-ui/round/README.md


Default Credentials

Service Username Password
Web Dashboard admin secubox
SSH root secubox

Change these immediately after first login!


Support


License

CMSD-1.0 (CyberMind Source-Disclosed License) © 2026 CyberMind · Gérald Kerma See LICENCE-CMSD-1.0.md for terms.


Technical Reference (Click to Expand)

Architecture

OpenWrt / LuCI                   →    Debian bookworm
─────────────────────────────────────────────────────────
RPCD shell backend               →    FastAPI + Uvicorn (Unix socket)
UCI config /etc/config/          →    TOML /etc/secubox/secubox.conf
luci-app-*/htdocs/ (JS/CSS/HTML) →    Conservé + XHR réécrits
OpenWrt packages (.ipk)          →    Paquets Debian (.deb)
opkg                             →    apt + repo apt.secubox.in

Supported Hardware

Board SoC RAM Network Profile
MOCHAbin Armada 7040 Quad 1.8GHz 4 GB 2× SFP+ 10GbE + 4× GbE Pro
ESPRESSObin v7 Armada 3720 Dual 1.2GHz 12 GB WAN + 2× LAN DSA Lite
ESPRESSObin Ultra Armada 3720 Dual 1.2GHz 2 GB WAN PoE + 4× LAN + Wi-Fi Lite+
Raspberry Pi 4/400 BCM2711 Quad 1.5-1.8GHz 2-8 GB GbE + USB Lite
Raspberry Pi 5 BCM2712 Quad 2.4GHz 4-8 GB GbE + USB Full
VM x86_64 Any 2+ GB Virtio/NAT Full

Packages (126 modules)

Core: secubox-core, secubox-hub, secubox-portal, secubox-system

Security: secubox-crowdsec, secubox-wireguard, secubox-auth, secubox-nac, secubox-waf, secubox-users

Network: secubox-netmodes, secubox-dpi, secubox-qos, secubox-vhost, secubox-haproxy

Monitoring: secubox-netdata, secubox-mediaflow, secubox-cdn

DNS/Email: secubox-dns, secubox-mail, secubox-webmail

Publishing: secubox-droplet, secubox-streamlit, secubox-metablogizer, secubox-publish

API Reference

All modules expose REST APIs at /api/v1/<module>/

# Login
curl -X POST https://localhost/api/v1/portal/login \
  -H 'Content-Type: application/json' \
  -d '{"username":"admin","password":"secubox"}'

# Use token
curl https://localhost/api/v1/hub/status \
  -H 'Authorization: Bearer <token>'

Key Endpoints:

  • GET /api/v1/hub/dashboard — Dashboard data
  • GET /api/v1/crowdsec/decisions — Active bans
  • POST /api/v1/crowdsec/ban — Ban IP
  • GET /api/v1/wireguard/peers — VPN peers
  • GET /api/v1/wireguard/qrcode/{peer} — Peer QR code

Configuration

Main config: /etc/secubox/secubox.conf (TOML)

[general]
hostname = "secubox"
timezone = "Europe/Paris"

[auth]
jwt_secret = "your-secret-key"
session_timeout = 86400

[network]
wan_interface = "eth0"
lan_interface = "eth1"

Development

# Setup
bash setup-dev.sh && source .venv/bin/activate

# Run module API
cd packages/secubox-crowdsec
uvicorn api.main:app --reload --port 8001

# Build package
dpkg-buildpackage -us -uc -b

# Build image
sudo bash image/build-image.sh --board vm-x64 --vdi

UI Design Guidelines

Color Palette (Cyberpunk/Hermetic):

Variable Color Usage
--cosmos-black #0a0a0f Background
--gold-hermetic #c9a84c Accents, titles
--cinnabar #e63946 Alerts, errors
--matrix-green #00ff41 Success
--void-purple #6e40c9 Links
--cyber-cyan #00d4ff Info, hover
--text-primary #e8e6d9 Main text

Typography: Cinzel (titles), IM Fell English (body), JetBrains Mono (code)

Documentation