feat(e2e): add distributed E2E test framework with parametric traffic generation
Add run-e2e-test.sh with CLI parameters (--hits, --http-ratio, --dns, --tls, --src-ips, --keep-analysis, --up) for configurable traffic generation. Traffic runs from VM endpoints with multiple source IPs (alias IPs on eth0) to produce distinct sessions for the ML pipeline. Fix curl TLS flags (--tlsv1.2 instead of --tls-v1-2), skip redundant local verification in distributed mode, and fix dashboard is_available() cache that never retried after ClickHouse recovery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -68,12 +68,14 @@ Le programme `bpf/tc_capture.c` est attaché à l'interface réseau via **TC (Tr
|
||||
- Envoyé dans le RingBuffer `rb_tcp_syn` (16 MB)
|
||||
|
||||
**ClientHello TLS** : détection du type 0x16 (Handshake) et sous-type 0x01 (ClientHello).
|
||||
- `bpf_skb_load_bytes()` pour capturer 512 octets du payload
|
||||
- `bpf_skb_load_bytes()` avec tailles en cascade (512 → 256 → 128) pour capturer SNI et extensions
|
||||
- La taille réellement copiée est stockée dans `payload_len`
|
||||
- Envoyé dans le RingBuffer `rb_tls_hello` (16 MB)
|
||||
|
||||
**HTTP en clair (port 80/8080)** : pour les connexions non chiffrées.
|
||||
- SYN/FIN/RST exclus (uniquement les segments porteurs de données)
|
||||
- Jusqu'à 4096 octets via `bpf_skb_load_bytes()`
|
||||
- `bpf_skb_load_bytes()` avec tailles en cascade (256 → 128 → 64)
|
||||
- La taille réellement copiée est stockée dans `payload_len`
|
||||
- Envoyé dans le RingBuffer `rb_http_plain` (32 MB)
|
||||
|
||||
### Uprobe SSL_read — Couche L7
|
||||
@ -124,6 +126,7 @@ Buffer reçu (SSL data ou HTTP plain)
|
||||
| Champ | Description |
|
||||
|-------|-------------|
|
||||
| `src_ip`, `src_port` | Clé de corrélation |
|
||||
| `dst_ip`, `dst_port` | Destination IP et port (extrait du SYN) |
|
||||
| `ttl` | Time To Live initial |
|
||||
| `df_bit` | Don't Fragment bit |
|
||||
| `ip_id` | IP Identification (0 = Linux/VPN/spoofé) |
|
||||
@ -138,7 +141,7 @@ Buffer reçu (SSL data ou HTTP plain)
|
||||
|
||||
| Champ | Description |
|
||||
|-------|-------------|
|
||||
| `tls_version` | Version TLS |
|
||||
| `tls_version` | Version TLS la plus haute annoncée (extrait des SupportedVersions) |
|
||||
| `ciphers` | Liste suites cryptographiques |
|
||||
| `extensions` | Liste extensions TLS |
|
||||
| `elliptic_curves` | Courbes elliptiques supportées |
|
||||
@ -167,7 +170,7 @@ Buffer reçu (SSL data ou HTTP plain)
|
||||
|
||||
| Champ | Description |
|
||||
|-------|-------------|
|
||||
| `h2_header_table_size` | SETTINGS ID 1 (-1 si absent) |
|
||||
| `h2_header_table_size` | SETTINGS ID 1 (`nil` si absent du preface, omis dans le JSON) |
|
||||
| `h2_enable_push` | SETTINGS ID 2 |
|
||||
| `h2_max_concurrent_streams` | SETTINGS ID 3 |
|
||||
| `h2_initial_window_size` | SETTINGS ID 4 |
|
||||
@ -254,7 +257,8 @@ services/ja4ebpf/
|
||||
│ ├── dispatcher/
|
||||
│ │ └── dispatcher.go # Routeur Magic Bytes (ProtoHTTP1/2/Unknown)
|
||||
│ ├── correlation/
|
||||
│ │ └── manager.go # Gestionnaire sessions 256-shard
|
||||
│ │ ├── manager.go # Gestionnaire sessions 256-shard
|
||||
│ │ └── session.go # Structs L3L4, TLSInfo, SessionState
|
||||
│ └── writer/
|
||||
│ └── writer.go # Writer ClickHouse (batch + retry)
|
||||
├── packaging/
|
||||
|
||||
Reference in New Issue
Block a user