Wiretap — Enterprise integrations / Intégrations entreprise

EN: Step-by-step recipes for wiring Wiretap into a SOC stack — Wazuh, Splunk, Graylog/Loki, Ansible, Docker/Kubernetes — all free and self-hosted, matching Wiretap's local-first posture. Wiretap emits no telemetry of its own; the only outbound connections are the ones you configure below.

FR : Recettes pas-à-pas pour brancher Wiretap dans une stack SOC — Wazuh, Splunk, Graylog/Loki, Ansible, Docker/Kubernetes — gratuites et auto-hébergées, dans l'esprit local-first de Wiretap. Wiretap n'émet aucune télémétrie propre ; les seules connexions sortantes sont celles configurées ci-dessous.


1. SIEM output / Sortie SIEM

Wiretap ships three native formats for alert forwarding:

Setting / Réglage Values / Valeurs Effect / Effet
syslog_addr host:514 or tcp://host:514 Enables syslog forwarding (UDP default, TCP with the tcp:// prefix)
syslog_format rfc3164 (default) Classic BSD syslog — readable by every collector
cef CEF:0|Wiretap|… — ArcSight/Wazuh/Splunk auto-parse src, dst, dpt, cs1 (process)…
webhook_url + webhook_enabled URL Generic JSON POST (or Discord/Slack/Telegram auto-detected payloads)
GET /forensics/export?format=… json, csv, stix, ecs One-shot forensic bundles — ecs emits newline-delimited Elastic Common Schema

Set them in the UI (Settings → Security) or in wiretap.toml:

syslog_addr = "siem.example.com:514"
syslog_format = "cef"

2. Wazuh

  1. Enable a syslog listener on the Wazuh manager (/var/ossec/etc/ossec.conf):

xml <remote> <connection>syslog</connection> <port>514</port> <protocol>udp</protocol> <allowed-ips>your-agent-subnet</allowed-ips> </remote>

  1. Point each Wiretap agent at it — Ansible:

yaml wiretap_syslog_addr: "wazuh.example.com:514" wiretap_syslog_format: "cef"

  1. Wazuh's CEF decoder picks the CEF:0|Wiretap|… messages up; alert severity maps to syslog PRI (critical→2, warning→4, info→6).

3. Splunk

  1. Settings → Data Inputs → UDP → new input on 514, sourcetype syslog (or a TCP input for tcp://… senders).
  2. syslog_format = "cef" gives you src, dst, dpt, cs1Label fields for free; for dashboards, poll GET /forensics/export?format=ecs on a schedule through a scripted input and let the JSON auto-extract.

4. Graylog / Loki

  • Graylog: System → Inputs → Syslog UDP, bind 514. CEF extension fields land as message fields.
  • Loki/Grafana: point syslog_addr at a promtail syslog target or scrape /forensics/export?format=ecs with a cron → loki push job.

5. Declarative configuration (Security-as-Code)

The backend applies one file at startup — $WIRETAP_CONFIG, else wiretap.toml/wiretap.json in the data dir. Every key it declares overrides the UI/DB value, so the file is the fleet source of truth:

syslog_addr = "siem.example.com:514"
syslog_format = "cef"
kill_switch_enabled = true
ask_enabled = false          # headless servers
gossip_peers = ["sec-01:8000"]
ports = [80, 443]

See packaging/wiretap.toml.example for the full vocabulary.

6. Ansible / Puppet / Salt / GPO

  • Ansible — ready-made role in deploy/ansible/:

bash ansible-playbook -i inventory deploy/ansible/site.yml

It installs /opt/wiretap, the venv, /etc/wiretap/wiretap.toml and the hardened systemd unit, then enables wiretap.service.

  • Puppet / SaltStack — community skeletons in deploy/puppet/ and deploy/salt/ (label help wanted): the same three primitives — copy the backend tree, render wiretap.toml, manage wiretap.service.

  • Windows GPO — deploy/gpo/Install-Wiretap.ps1 performs the silent install (ProgramData config, venv, SYSTEM scheduled task on 127.0.0.1) for GPO startup scripts or Intune win32 packaging. Ask-on-connect on Windows additionally needs the signed WFP callout — see docs/SIGNING.md.

7. Docker & Kubernetes

  • Single host: docker compose up — network_mode: host + cap_add: NET_RAW/NET_ADMIN already configured in docker-compose.yml.
  • Fleet console: deploy/helm/wiretap — mode: collector runs a ClusterIP Deployment that merges every configured agent's audit into GET /remote/fleet; mode: agent renders a host-network DaemonSet with NET_RAW/NET_ADMIN.

bash helm install wiretap ./deploy/helm/wiretap \ --set token=$(openssl rand -hex 32) \ --set config.gossip_peers='["agent-1:8000","agent-2:8000"]'

8. Sigma rules & YARA-L

POST /alerts/rules/sigma accepts a Sigma detection YAML and compiles the supported subset (field→value selections, |contains/|startswith/ |endswith/|re/|cidr/|gt/|lt/|all, 1 of/all of conditions) into Wiretap custom rules — alert-only, skipped reasons returned for anything outside the subset. Fields map to what a packet sensor sees (DestinationIp→remote_ip, Image→process_name, Domain→host, …).

YARA-L for Google SecOps/Chronicle: GET /alerts/rules/yaral exports all custom rules (including Sigma-imported ones) as a .yar file — the Sigma→YARA-L path is covered transitively.

9. Remote agents (wiretap-agent/1)

agent/ ships a zero-dependency Rust daemon (~1 MB single binary) that watches the host socket table (/proc/net/*, Linux) and pushes newly observed outbound flows to POST /ingest/events. It observes sockets — no payloads/SNI (that's the local capture's job); pid/process attribution works on Linux via the /proc/*/fd inode walk and reports 0 elsewhere until the Windows/macOS backends land. Transport: HTTP, same trust-domain model as gossip_peers. A wiretap-agent.service unit lives in deploy/systemd/; CI compiles and tests the binary on Linux, macOS and Windows on every agent/** push.

Per-agent enrollment

Each deployed agent should carry its OWN credential — a stolen token can only impersonate that one agent, and revocation is per-name:

# EN: mint on the collector (master token), returned once
curl -X POST http://collector:8000/ingest/enroll \
  -H "X-Wiretap-Token: <master>" -d '{"name": "edge-01"}'
# → {"token": "sagt_…"} — put it in the agent's WIRETAP_TOKEN

curl -X POST http://collector:8000/ingest/revoke \
  -H "X-Wiretap-Token: <master>" -d '{"name": "edge-01"}'

curl http://collector:8000/ingest/agents -H "X-Wiretap-Token: <master>"

The ingest endpoint accepts X-Wiretap-Agent: sagt_… (enrolled name is authoritative — the body's host field can't override it) or the master X-Wiretap-Token for local/small deployments. Only token hashes are stored, so a leaked settings dump can't replay credentials.

10. Threat-intel feeds (free)

POST /firewall/blocklist imports multiple shapes:

  • kind: "domain" — hosts/domain lists (StevenBlack, EasyList…) → domain firewall rules;
  • kind: "ip" — IP feeds (Blocklist.de, NetAPI compromised-IP…) → ip rules; private/reserved/loopback addresses are never imported.
  • kind: "threatfox" (or threatfox_ip, threatfox_domain) — abuse.ch ThreatFox C2 indicators (CSV/JSON, CC0 / Public Domain), parsed into ip and domain rules. Supports malware family filtering (malware: "cobalt_strike"), confidence threshold (min_confidence: 75), and threat type gating (threat_type: "botnet_cc"). Since 2026-10-21 abuse.ch retired the keyless exports (HTTP 410): pass auth_key: "<your free abuse.ch Auth-Key>" — sent as the Auth-Key header, never logged. Without it the presets import nothing.
  • preset: "threatfox" — built-in preset with safe defaults. Discover all presets via GET /firewall/presets.
  • preset: "netapi_compromised" — keyless ip preset: NetAPI honeypot category A addresses (malware infection attempts and payload servers) seen in the last 48 h, regenerated hourly, CC BY 4.0 (https://netapi.com/compromised-ips/).

path: reads a local file (fully offline); url: is an explicit, audited opt-in fetch (remote_fetch: true in the response). Cap at max_entries ≤ 5000 — giant feeds belong in a resolver.

Opt-in API providers (AbuseIPDB / OTX / VirusTotal) stay available via ti_provider + ti_api_key — nothing calls out until you set a key.

Scheduled refresh (ti_feeds)

A background worker re-imports feeds on their own clock — no restart, hot firewall reload. Configure it declaratively:

ti_feeds = [
  # ThreatFox C2 export (abuse.ch, CC0) — needs a free abuse.ch Auth-Key
  # since 2026-10-21; the key is sent as a header, never logged.
  { preset = "threatfox", action = "block", hours = 12, min_confidence = 75,
    auth_key = "<your abuse.ch Auth-Key>" },
  # NetAPI honeypot malware sources (CC BY 4.0), keyless
  { preset = "netapi_compromised", action = "block", hours = 12 },
  { url  = "https://lists.blocklist.de/lists/all.txt",
    kind = "ip", action = "block", hours = 24 },
  { path = "/etc/wiretap/corp-domains.txt",
    kind = "domain", action = "sinkhole", hours = 6 },
]

Each entry runs through the same importer as POST /firewall/blocklist — dedupe against existing rules, path: stays fully offline, url: is the same audited opt-in. Last-fetch state persists across restarts (ti_feeds_state); ≤64 feeds, ≤5000 rules per refresh — giant feeds belong in a resolver, not here.

11. Passive TLS fingerprinting & C2 detection (JA3 / JA4)

EN: Wiretap parses TLS ClientHello packets passively in real time without injecting any active network probes or terminating TLS sessions. On every outbound TLS handshake observed by the sniffer:

  1. JA3 Fingerprint: computes the classic MD5 digest over SSLVersion,Cipher,SSLExtension,EllipticCurve,EllipticCurvePointFormat (excluding GREASE values per RFC 8701).
  2. JA4 Fingerprint: generates standard JA4 strings (t{version}{sni_flag}{num_ciphers}{num_exts}{alpn}_{ciphers_hash}_{exts_hash}) distinguishing TCP/QUIC, domain vs IP SNIs, and sorting ciphers/extensions.
  3. C2 Lookup & Alerting: matches observed fingerprints against a local offline database (backend/detection/c2_fingerprints.json) containing public indicators for Cobalt Strike, Sliver, Havoc, Mythic, Metasploit, AsyncRAT, and other adversary simulation frameworks. Matches immediately emit a C2_SUSPECT alert with process, PID, and command-line context.
  4. Custom Rules: create alerting or kill-switch rules matching on field: "ja3" or field: "ja4" via POST /alerts/rules or Sigma/YARA-L.
  5. API Inspection: inspect loaded fingerprints at runtime with GET /c2/fingerprints or trigger an in-memory reload with POST /c2/fingerprints/reload.

FR : Wiretap analyse passivement les paquets TLS ClientHello en temps réel sans injecter de sondes réseau actives ni interrompre le chiffrement TLS. Sur chaque négociation TLS sortante observée par le sniffer :

  1. Empreinte JA3 : calcule l'empreinte MD5 canonique sur SSLVersion,Cipher,SSLExtension,EllipticCurve,EllipticCurvePointFormat (en filtrant les valeurs GREASE selon le RFC 8701).
  2. Empreinte JA4 : génère les chaînes JA4 normalisées (t{version}{sni_flag}{num_ciphers}{num_exts}{alpn}_{ciphers_hash}_{exts_hash}) distinguant TCP/QUIC, SNI domaine vs IP, et triant suites et extensions.
  3. Recherche C2 & Alertes : compare les empreintes observées à une base locale hors-ligne (backend/detection/c2_fingerprints.json) contenant des indicateurs publics pour Cobalt Strike, Sliver, Havoc, Mythic, Metasploit, AsyncRAT, etc. Les correspondances lèvent instantanément une alerte C2_SUSPECT avec le contexte processus, PID et ligne de commande.
  4. Règles personnalisées : créez des règles d'alerte ou de coupure sur field: "ja3" ou field: "ja4" via POST /alerts/rules ou Sigma/YARA-L.
  5. Inspection API : consultez les empreintes chargées avec GET /c2/fingerprints ou rechargez la base en mémoire via POST /c2/fingerprints/reload.

12. Headless / daemon mode

The GUI is optional: the backend is the whole product. Run it bare (uvicorn api.main:app), under the shipped systemd unit, or in the container — every feature above works without the frontend. WIRETAP_DEMO=1 still gives a no-root synthetic feed for training rooms and CTFs.