mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-06-29 19:43:27 +00:00
Compare commits
No commits in common. "4cf7c8519138b4023f7dfd0a7e9646dfe79d8c8c" and "0a05bed0280b72544b18ef637f1c94eecb00770d" have entirely different histories.
4cf7c85191
...
0a05bed028
|
|
@ -1,14 +1,3 @@
|
|||
secubox-toolbox (2.7.19-1~bookworm1) bookworm; urgency=medium
|
||||
|
||||
* #728 blacklist-sync confidence gate: enforce a threat_intel IP only when
|
||||
corroborated by >= SECUBOX_BL_MIN_CONSENSUS sources (default 2) OR carried by
|
||||
a curated high-trust feed (weight >= SECUBOX_BL_MIN_WEIGHT, default 80).
|
||||
Arming all ~45k aggregated-feed IPs (mostly noisy single-source) risked
|
||||
blocking legit traffic; this enforces the high-confidence ~2k set. CrowdSec
|
||||
local decisions + DNS-guard stay always-enforced. Tunable via env.
|
||||
|
||||
-- Gerald KERMA <devel@cybermind.fr> Wed, 24 Jun 2026 16:30:00 +0000
|
||||
|
||||
secubox-toolbox (2.7.18-1~bookworm1) bookworm; urgency=medium
|
||||
|
||||
* #519/#522 fix(blacklist-sync): the DNS-guard domain loop aborted the whole
|
||||
|
|
|
|||
|
|
@ -37,18 +37,11 @@ fi
|
|||
TMP4=$(mktemp); TMP6=$(mktemp)
|
||||
trap 'rm -f "$TMP4" "$TMP6"' EXIT
|
||||
|
||||
# Source 1 : threat-intel IPs from the toolbox SQLite (ioc_type='ip').
|
||||
# Confidence gate (#728): aggregated public feeds carry lots of noisy
|
||||
# single-source entries (e.g. blocklist.de) — arming all of them risks blocking
|
||||
# legitimate traffic. Enforce an IP only when corroborated by >= MIN_CONSENSUS
|
||||
# distinct sources OR carried by a curated high-trust feed (weight >= MIN_WEIGHT).
|
||||
# CrowdSec local decisions (Source 2) and DNS-guard domains are always enforced.
|
||||
TI_MIN_CONSENSUS="${SECUBOX_BL_MIN_CONSENSUS:-2}"
|
||||
TI_MIN_WEIGHT="${SECUBOX_BL_MIN_WEIGHT:-80}"
|
||||
# Source 1 : threat-intel C2 IPs (feodo / threatfox / sslbl) from the
|
||||
# toolbox SQLite. ioc_type='ip'.
|
||||
if [ -r "$TOOLBOX_DB" ] && command -v sqlite3 >/dev/null 2>&1; then
|
||||
sqlite3 "$TOOLBOX_DB" \
|
||||
"SELECT ioc FROM threat_intel WHERE ioc_type='ip' GROUP BY ioc \
|
||||
HAVING COUNT(DISTINCT source) >= $TI_MIN_CONSENSUS OR MAX(weight) >= $TI_MIN_WEIGHT;" \
|
||||
"SELECT DISTINCT ioc FROM threat_intel WHERE ioc_type='ip';" \
|
||||
2>/dev/null >> "$TMP4.raw" || true
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,103 +0,0 @@
|
|||
# ThreatMesh 🛰️
|
||||
|
||||
[EN](ThreatMesh) | **[FR](ThreatMesh-FR)** | **🔴 BOOT · 🛡️ SÉCURITÉ** | renseignement de menace souverain
|
||||
|
||||
> Votre réseau de vigilance de quartier pour l'internet — *listes gratuites + astuces des voisins, sans chef central, sans paywall, impossible à bannir.*
|
||||
|
||||

|
||||
|
||||
ThreatMesh est la couche SecuBox qui **bloque automatiquement les adresses
|
||||
internet malveillantes connues** — née après que l'API centrale de CrowdSec
|
||||
(CAPI) a blacklisté l'IP de notre box puis fait payer le déblocage. Elle
|
||||
remplace cette dépendance centrale par des **listes publiques auto-sourcées**
|
||||
plus un **partage d'astuces pair-à-pair** entre vos propres box. Vous possédez
|
||||
toute la chaîne, de bout en bout.
|
||||
|
||||
---
|
||||
|
||||
## 🏘️ L'idée simple
|
||||
|
||||
Voyez votre SecuBox comme une **maison avec un concierge malin**. Le concierge
|
||||
tient une seule liste « à ne pas laisser entrer », alimentée par deux flux, et
|
||||
refuse tout ce qui y figure.
|
||||
|
||||
```
|
||||
LISTES « RECHERCHÉ » GRATUITES VOS AUTRES BOX (mesh)
|
||||
(bulletins publics) (voisins qui s'échangent des astuces)
|
||||
\ /
|
||||
\ /
|
||||
▼ ▼
|
||||
┌──────────────────────────────────┐
|
||||
│ LE CONCIERGE — une liste de │
|
||||
│ blocage, ne croit que les bonnes │
|
||||
│ pistes │
|
||||
└──────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
🚪 une mauvaise adresse frappe → REFUSÉE
|
||||
```
|
||||
|
||||
1. **📋 Listes de surveillance gratuites** — toutes les 6 h la box récupère des
|
||||
listes publiques « ces IP sont dangereuses » (C2 de malware, réseaux
|
||||
détournés, attaquants connus). Gratuit, sans inscription, sans compte.
|
||||
2. **🤝 Astuces des voisins (mesh)** — quand *votre* box attrape un attaquant,
|
||||
elle prévient vos *autres* box via le mesh chiffré SecuBox (WireGuard). Sans
|
||||
intermédiaire.
|
||||
3. **🛡️ Le concierge agit** — chaque astuce atterrit dans une seule liste de
|
||||
blocage et la box refuse le trafic vers/depuis ces adresses au pare-feu
|
||||
(nftables).
|
||||
|
||||
---
|
||||
|
||||
## 🆚 Pourquoi souverain
|
||||
|
||||
| Avant (CrowdSec CAPI) | Maintenant (ThreatMesh) |
|
||||
|------------------------|-------------------------|
|
||||
| La liste centrale d'une entreprise | **La vôtre**, depuis des sources ouvertes |
|
||||
| Ils peuvent **bannir votre IP** | **Personne ne peut vous exclure** |
|
||||
| **Payer** pour être débanni | **Gratuit, pour toujours** |
|
||||
| Vous dépendez d'eux | **Vous possédez toute la chaîne** |
|
||||
|
||||
Le moteur de détection hors-ligne de CrowdSec (LAPI) est conservé — seul le flux
|
||||
central toxique (CAPI) est abandonné.
|
||||
|
||||
---
|
||||
|
||||
## 🔍 Sous le capot
|
||||
|
||||
| Étape | Composant | Rôle |
|
||||
|-------|-----------|------|
|
||||
| **Feeds** | `secubox-threatfeed` (timer, 6 h) | tire des listes gratuites — feodo, sslbl, FireHOL, Spamhaus DROP, blocklist.de, CINS, ET-compromised, DShield — dans la table partagée `threat_intel` |
|
||||
| **Mesh** | `secubox-threatmesh` (service) | diffuse les décisions détectées localement aux pairs du mesh via WireGuard ; ingère les décisions des pairs (`mesh:<node>`), comptées par consensus ; port `:8780` verrouillé au mesh par nftables |
|
||||
| **Application** | `secubox-blacklist-sync` | vide `threat_intel` → ensembles de drop nft `blacklist_v4/v6` |
|
||||
| **Visualiser** | tableau de bord `/threatmesh/` + `/api/v1/threatmesh/decisions` (compatible bouncer CrowdSec) | statut, sources, pairs, IP à plus fort consensus |
|
||||
|
||||
### 🎯 La porte de confiance (zéro carpet-bomb de faux positifs)
|
||||
|
||||
Les feeds publics agrégés contiennent beaucoup d'entrées bruyantes à source
|
||||
unique. ThreatMesh **n'applique le blocage** que si une IP est **corroborée par
|
||||
≥ 2 sources** *ou* provient d'un **feed curé de haute confiance** (poids ≥ 80).
|
||||
Le reste reste *visible mais non bloqué*. Les décisions locales de CrowdSec et le
|
||||
DNS-guard sont toujours appliqués.
|
||||
|
||||
Réglage via variables d'env sur `secubox-blacklist-sync` :
|
||||
|
||||
```
|
||||
SECUBOX_BL_MIN_CONSENSUS=2 # sources qui doivent concorder (plus bas = plus de couverture)
|
||||
SECUBOX_BL_MIN_WEIGHT=80 # niveau de confiance qui contourne la règle de consensus
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 En un coup d'œil
|
||||
|
||||
- **~45 000** IP dangereuses connues (rafraîchies toutes les 6 h)
|
||||
- **~3 000** IP de haute confiance bloquées activement au pare-feu
|
||||
- Le partage mesh s'active tout seul dès qu'une seconde SecuBox rejoint le mesh
|
||||
- **0** compte externe · **0** paywall · **0** moyen pour un tiers de vous couper
|
||||
|
||||
> *Ils nous ont bloqués et ont demandé de l'argent pour débloquer. Alors on a construit le nôtre — et maintenant personne ne peut nous couper.* 🔓
|
||||
|
||||
---
|
||||
|
||||
*Voir aussi : [[Anti-Track]] · [[Architecture]] · `secubox-threatmesh` (#728)*
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
# ThreatMesh 🛰️
|
||||
|
||||
**[EN](ThreatMesh)** | [FR](ThreatMesh-FR) | **🔴 BOOT · 🛡️ SECURITY** | sovereign threat-intel
|
||||
|
||||
> Your own neighborhood watch for the internet — *free feeds + neighbor tips, no central boss, no paywall, can't be banned.*
|
||||
|
||||

|
||||
|
||||
ThreatMesh is the SecuBox layer that automatically **blocks known-bad internet
|
||||
addresses** on its own — built after CrowdSec's central API (CAPI) IP-blocklisted
|
||||
our box and paywalled the un-blocking. It replaces that central dependency with
|
||||
**self-sourced public lists** plus **peer-to-peer tip sharing** between your own
|
||||
boxes. You own the whole thing end to end.
|
||||
|
||||
---
|
||||
|
||||
## 🏘️ The simple idea
|
||||
|
||||
Think of your SecuBox as a **house with a smart doorman**. The doorman keeps one
|
||||
"do not let in" list, fed by two streams, and turns away anything on it.
|
||||
|
||||
```
|
||||
FREE "WANTED" LISTS YOUR OTHER BOXES (mesh)
|
||||
(public bulletins) (neighbors swapping tips)
|
||||
\ /
|
||||
\ /
|
||||
▼ ▼
|
||||
┌──────────────────────────────────┐
|
||||
│ THE DOORMAN — one block list, │
|
||||
│ only trusts solid tips │
|
||||
└──────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
🚪 bad address knocks → DROPPED
|
||||
```
|
||||
|
||||
1. **📋 Free watch-lists** — every 6 h the box pulls public "these IPs are
|
||||
dangerous" lists (malware C2, hijacked networks, known attackers). Free, no
|
||||
sign-up, no account.
|
||||
2. **🤝 Neighbor tips (mesh)** — when *your* box catches an attacker it tells your
|
||||
*other* boxes over the encrypted SecuBox mesh (WireGuard). No middleman.
|
||||
3. **🛡️ The doorman acts** — every tip lands in one block-list and the box
|
||||
refuses traffic to/from those addresses at the firewall (nftables).
|
||||
|
||||
---
|
||||
|
||||
## 🆚 Why sovereign
|
||||
|
||||
| Before (CrowdSec CAPI) | Now (ThreatMesh) |
|
||||
|------------------------|------------------|
|
||||
| One company's central list | **Your own**, from open sources |
|
||||
| They can **ban your IP** | **No one can lock you out** |
|
||||
| **Pay** to get un-banned | **Free, forever** |
|
||||
| You depend on them | **You own the whole pipeline** |
|
||||
|
||||
CrowdSec's offline detection engine (LAPI) is kept — only the toxic central feed
|
||||
(CAPI) is dropped.
|
||||
|
||||
---
|
||||
|
||||
## 🔍 Under the hood
|
||||
|
||||
| Stage | Component | What it does |
|
||||
|-------|-----------|--------------|
|
||||
| **Feeds** | `secubox-threatfeed` (timer, 6 h) | pulls free lists — feodo, sslbl, FireHOL, Spamhaus DROP, blocklist.de, CINS, ET-compromised, DShield — into the shared `threat_intel` table |
|
||||
| **Mesh** | `secubox-threatmesh` (service) | gossips locally-detected decisions to mesh peers over WireGuard; ingests peer decisions (`mesh:<node>`), consensus-counted; port `:8780` locked to the mesh by nftables |
|
||||
| **Enforce** | `secubox-blacklist-sync` | drains `threat_intel` → nft `blacklist_v4/v6` drop sets |
|
||||
| **See it** | `/threatmesh/` dashboard + `/api/v1/threatmesh/decisions` (CrowdSec-bouncer-compatible) | status, sources, peers, top-consensus IPs |
|
||||
|
||||
### 🎯 The confidence gate (no false-positive carpet-bomb)
|
||||
|
||||
Aggregated public feeds carry many noisy single-source entries. ThreatMesh
|
||||
**only enforces** an IP that is **corroborated by ≥ 2 sources** *or* comes from a
|
||||
**curated high-trust feed** (weight ≥ 80). The rest stay *visible but not
|
||||
blocked*. CrowdSec local decisions + DNS-guard are always enforced.
|
||||
|
||||
Tune via env on `secubox-blacklist-sync`:
|
||||
|
||||
```
|
||||
SECUBOX_BL_MIN_CONSENSUS=2 # sources that must agree (lower = more coverage)
|
||||
SECUBOX_BL_MIN_WEIGHT=80 # trust level that bypasses the consensus rule
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 At a glance
|
||||
|
||||
- **~45 000** dangerous IPs known (refreshed every 6 h)
|
||||
- **~3 000** high-confidence IPs actively dropped at the firewall
|
||||
- Mesh sharing lights up automatically when a second SecuBox joins the mesh
|
||||
- **0** external accounts · **0** paywall · **0** ways for a third party to switch you off
|
||||
|
||||
> *They blocked us and asked for money to unblock. So we built our own — and now nobody can switch us off.* 🔓
|
||||
|
||||
---
|
||||
|
||||
*See also: [[Anti-Track]] · [[Architecture]] · `secubox-threatmesh` (#728)*
|
||||
|
|
@ -41,7 +41,6 @@
|
|||
### 🟣 MIND — Modules
|
||||
|
||||
* [[Anti-Track]] 🛡️ bloque · empoisonne · anonymise
|
||||
* [[ThreatMesh]] 🛰️ blocklist souveraine (feeds + mesh, sans CAPI) | [FR](ThreatMesh-FR)
|
||||
* [[MODULES-EN|Modules]] 🇬🇧
|
||||
* [[MODULES-FR]] 🇫🇷
|
||||
* [[MODULES-DE]] 🇩🇪
|
||||
|
|
|
|||
|
|
@ -7,5 +7,3 @@ Local image assets referenced by wiki pages.
|
|||
| File | Used by | Notes |
|
||||
|------|---------|-------|
|
||||
| `anti-track-v2-poster.png` | [[Anti-Track]] | Comic-style hero poster (Bloque · Empoisonne · Anonymise). Portrait, ~1024×1536. |
|
||||
| `threatmesh-poster.png` | [[ThreatMesh]] | Neighborhood-watch hero poster (sovereign threat-intel — free feeds + mesh, no CAPI). Portrait, ~1024×1536. |
|
||||
| `threatmesh-poster-fr.png` | [[ThreatMesh-FR]] | Version FR de l'affiche ThreatMesh (vigilance de quartier). Portrait, ~1024×1536. |
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 MiB |
Loading…
Reference in New Issue
Block a user