Skip to content

Ingest and Policy Guide

Evan Newman edited this page Nov 30, 2026 · 1 revision

Ingest and policy guide


Telemetry ingest adapters (src/oodatap/ingest/)

oodatap.ingest.load_events(path, fmt="auto", policy=None, ssl_log=None) automatically detects input formats via detect_format(path) (checking binary magic headers, text signatures/JSON keys, then file extensions) and normalizes records into sorted TlsBurstEvent and ActionEvent objects.

Adapter (--format) Supported formats & details
pcap / pcapng (ingest/pcap.py) Pure-Python binary parser (zero libpcap/Npcap). Classic .pcap (LE/BE, µs/ns magic) and Wireshark .pcapng (SHB, IDB with if_tsresol option 9 & if_tsoffset option 14, EPB, SPB). Link layers: Ethernet (DLT_EN10MB=1) + single 802.1Q VLAN (0x8100), Linux SLL (113), Raw IP (101). IPv4 & IPv6 (walking extension headers 0, 43, 44, 60), TCP & UDP. Extracts TLS ClientHello (0x16/0x01) SNI and TLS Application Data (0x17) record counts/bytes.
zeek (ingest/zeek.py) Reads Zeek conn.log in either JSON lines or TSV (#separator + #fields). Automatically discovers a sibling ssl.log (or explicit --ssl-log) to correlate uid -> server_name SNI.
suricata (ingest/suricata.py) Reads Suricata eve.json, indexing event_type == "tls" (flow_id -> tls.sni) and converting event_type == "flow" records (bytes_toserver, bytes_toclient, pkts_toclient, ISO timestamps).
jsonl (ingest/jsonl.py) Canonical OodaTap newline-delimited JSON (kind: "tls_burst" | "action"), validated via Pydantic v2.

Packet vs. flow-log extraction behavior

  • Packet captures (.pcap / .pcapng):
    • Flows matching external TLS ((saw_tls or dst_port == 443) to non-internal IP) or internal known LLM endpoints become TlsBurstEvent streams by merging consecutive client packets within 0.25s into uplink bursts followed by server downlink bursts.
    • Non-TLS flows become ActionEvent records; long-lived connections split into separate turns when a client packet follows a server reply after >= 0.35s.
  • Flow logs (Zeek & Suricata):
    • Because flow summaries aggregate total duration and bytes instead of per-packet bursts, zeek.py and suricata.py approximate burst timing from flow duration (up_end = ts + min(0.08, duration * 0.1), ttft = min(max(0.2, duration * 0.35), max(0.0, duration - 0.05))). Multi-turn HTTP keep-alive sessions inside one flow record are not split at packet granularity.

Policy configuration (policies/default_policy.yaml, src/oodatap/policy.py)

Pass a custom policy file via -p / --policy (or oodatap.policy.load_policy(path)).

internal_cidrs:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - fc00::/7
  - fe80::/10

llm_domains:
  - api.openai.com
  - api.anthropic.com
  - generativelanguage.googleapis.com
  - openrouter.ai
  - api.groq.com
  - api.together.xyz
  - api.mistral.ai
  - api.deepseek.com
  - bedrock-runtime.
  - openai.azure.com

llm_ports: [11434, 8000, 4000, 1234]   # Ollama, vLLM, LiteLLM, LM Studio

sensitive_lateral_ports:
  - 22     # SSH
  - 88     # Kerberos
  - 135    # MSRPC
  - 139    # NetBIOS
  - 389    # LDAP
  - 445    # SMB
  - 636    # LDAPS
  - 1433   # MSSQL
  - 2375   # Docker daemon
  - 3306   # MySQL
  - 3389   # RDP
  - 5432   # PostgreSQL
  - 5985   # WinRM
  - 5986   # WinRM TLS
  - 6443   # Kubernetes API
  - 8200   # Vault
  - 9200   # Elasticsearch

dev_allowlist:
  cidrs: [127.0.0.0/8, "::1/128"]
  hosts: [10.0.10.50]                  # Internal dev artifact/git server
  ports: [3000, 5173, 8081, 9418]      # Local dev servers & git protocol
  approved_dev_hosts: []               # Developer workstation IPs

scoring:
  weights:
    sawtooth: 0.30
    coupler: 0.45
    kinematics: 0.25
  alert_threshold: 0.58
  suspicious_threshold: 0.40
  min_turns_for_sawtooth: 4
  min_actions_for_coupling: 4
  max_obs_lag_seconds: 2.5
  max_dispatch_lag_seconds: 2.2
  fanout_window_seconds: 0.20

How actions are classified (PolicyConfig.classify_action)

  1. DEV_LOCAL (is_sensitive_lateral = False): Destination matches dev_allowlist.hosts, loopback, dev_allowlist.cidrs, or (dst_port in dev_allowlist.ports on an internal IP).
  2. EAST_WEST_INTERNAL: Destination matches internal_cidrs. Flagged is_sensitive_lateral = True when dst_port is in sensitive_lateral_ports or resolved protocol is in {smb, ldap, ldaps, ssh, winrm, winrm_tls, rdp, kerberos, k8s_api, vault, postgres, mysql, mssql}.
  3. EXTERNAL_BENIGN: All other destinations.

Production tuning tip: Before wiring alerts into a production SIEM, populate internal_cidrs, dev_allowlist.hosts (internal Git/CI/artifact hosts), and dev_allowlist.approved_dev_hosts (known developer workstations running coding agents). Even approved dev hosts still alert immediately if they execute sensitive lateral actions (sensitive_count > 0).


Current technical boundaries

  • Offline / batch analysis: Reads full capture or log files into memory rather than streaming live sockets.
  • Per-packet TLS framing: inspect_tls_app_data parses TLS records (<= 18,432 B) within individual TCP segments without full TCP stream reassembly (falling back to raw payload_len if a TLS record splits across segments).
  • HTTP/2 & QUIC: Assumes half-duplex TCP TLS turn alternation; HTTP/2 multiplexing and QUIC/HTTP/3 UDP framing are on the roadmap.
  • VLAN / PCAPNG edge cases: Supports a single 802.1Q VLAN tag (0x8100); PCAPNG Simple Packet Blocks (SPB) emit timestamp 0.0.
  • Encrypted ClientHello (ECH) / custom proxies: Unknown HTTPS endpoints still score structurally via sawtooth + coupling, but omit the +0.07 known-LLM endpoint bonus.