SIEM Configuration for Behavioral Log Collection

Author

K19G

Updated

October 31, 2026

SIEM Configuration for Behavioral Log Collection

Security Information and Event Management (SIEM) systems and User and Entity Behavior Analytics (UEBA) engines serve as the central nervous system for enterprise network forensics. However, traditional SIEM architectures configured solely for compliance—collecting static log dumps without schema normalization or real-time enrichment—fail under behavioral forensic requirements.

A behavior-driven SIEM must ingest hundreds of thousands of events per second, map divergent data sources into a unified behavioral ontology, enrich streams with contextual metadata (GeoIP, ASN, Active Directory identity, asset criticality), and execute continuous statistical baselining.

┌────────────────────────────────────────────────────────────────────────┐
│                        Raw Telemetry Sources                           │
│   (Firewalls, NetFlow, Zeek, DNS, Kerberos, Kubernetes Audit Logs)     │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ Streaming Ingestion (Kafka / Vector)
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│               Schema Normalization (ECS / OCSF Standard)               │
│         Maps all source/destination fields to uniform taxonomy         │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ Real-Time Streaming Enrichment
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                      Contextual Enrichment Tier                        │
│    [ MaxMind GeoIP ]  [ ASN / BGP Route ]  [ LDAP User / Peer Group ]  │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ Enriched Log Stream
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│                   UEBA & Machine Learning Baselining                   │
│   (Peer Group Clustering, Rolling Gaussian Windows, Anomaly Scoring)   │
└───────────────────────────────────┬────────────────────────────────────┘
                                    │ Anomaly Threshold Exceeded
                                    ▼
┌────────────────────────────────────────────────────────────────────────┐
│             SOAR Playbook Execution (Evidence Quarantine)              │
└────────────────────────────────────────────────────────────────────────┘

Schema Standardization: ECS and OCSF

Disparate network appliances format telemetry inconsistently. A Cisco ASA emits src_ip, Zeek emits id.orig_h, and a Linux firewall emits SRC. Behavioral algorithms cannot correlate activity across systems without schema unification.

The industry relies on two primary open standards: 1. Elastic Common Schema (ECS): Hierarchical taxonomy mapping network, host, and cloud fields. 2. Open Cybersecurity Schema Framework (OCSF): Vendor-agnostic, extensible ontology defining discrete event classes and semantic attributes.

Standard ECS Network Mapping

Every network connection event must resolve into these core ECS keys:

ECS Field Type Description
@timestamp Date (ISO 8601) Microsecond-accurate event occurrence timestamp
source.ip IP Originating IPv4 or IPv6 address
source.port Integer Originating layer-4 port
destination.ip IP Target IPv4 or IPv6 address
destination.port Integer Target layer-4 port
network.transport Keyword tcp, udp, icmp, gre
network.bytes Long Total bytes transferred across the flow
user.name Keyword Authenticated identity associated with the session

Real-Time Enrichment Pipelines

Raw network logs lack operational context. A log stating that 10.10.4.15 sent \(500\text{ MB}\) to 198.51.100.4 is semantically ambiguous. Is 10.10.4.15 a developer’s workstation or a payment processor? Is 198.51.100.4 an AWS S3 bucket or a bulletproof host in a hostile jurisdiction?

Stream processors (Logstash, Vector, or Kafka Streams) must enrich events before indexing:

# Vector.dev transform pipeline for real-time network log enrichment
transforms:
  normalize_and_enrich:
    type: "remap"
    inputs: ["raw_syslog"]
    source: |
      # Parse raw JSON
      . = parse_json!(.message)
      
      # Rename to ECS
      .source.ip = .src_ip
      .destination.ip = .dst_ip
      .destination.port = to_int!(.dst_port)

      # Contextual GeoIP & ASN lookup
      .geo = get_enrichment_table_record!("geoip_table", {"ip": .destination.ip})
      
      # Correlate source IP with internal asset inventory
      .asset = get_enrichment_table_record!("asset_cmdb", {"ip": .source.ip})
      
      # Tag high-value asset communications
      if .asset.tier == "Tier-0" && .geo.country_code != "US" {
        .event.risk_score = 85.0
        .event.category = ["security_anomaly"]
      }

Configuring UEBA for Network Baselines

User and Entity Behavior Analytics (UEBA) transforms static log searches into statistical probability engines. UEBA maintains rolling statistical baselines for every entity:

1. Rolling Gaussian Baseline Formulation

For any network metric \(x\) (e.g., hourly egress bytes for host \(h\)), the engine calculates the rolling mean \(\mu\) and standard deviation \(\sigma\) over an observation window \(W\) (typically 30 days):

\[\mu_W = \frac{1}{|W|} \sum_{t \in W} x_t, \quad \sigma_W = \sqrt{\frac{1}{|W|} \sum_{t \in W} (x_t - \mu_W)^2}\]

The \(Z\)-score for a newly observed value \(x_{\text{now}}\) is:

\[Z = \frac{x_{\text{now}} - \mu_W}{\sigma_W}\]

When \(|Z| > 3.5\) (exceeding \(3.5\) standard deviations from the entity’s established mean), the UEBA engine flags a statistical anomaly.

2. Peer-Group Clustering

To prevent false alarms when an entire engineering team runs large backups simultaneously, entities are dynamically grouped using \(k\)-means clustering or hierarchical agglomerative clustering over behavioral feature vectors:

\[\mathbf{f}_h = [\text{mean\_daily\_conns}, \, \text{mean\_egress\_bytes}, \, \text{unique\_dst\_ips}, \, \text{off\_hours\_ratio}]\]

An anomaly is registered only when an entity diverges significantly from the centroid of its assigned peer cluster.


SOAR Integration and Automated Playbooks

Once a behavioral anomaly is scored above an actionable threshold (e.g., \(\text{CBS} \ge 80\)), manual intervention is too slow to stop lateral movement. Security Orchestration, Automation, and Response (SOAR) platforms automate immediate defensive containment:

[ UEBA Alert: CBS >= 85 ] ───> [ SOAR Playbook Triggered ]
                                       │
            ┌──────────────────────────┼──────────────────────────┐
            ▼                          ▼                          ▼
  [ 1. Isolate Host ]        [ 2. Capture PCAP ]       [ 3. Snapshot State ]
  Inject quarantine VLAN      Trigger 15-min rolling    Dump memory and
  via 802.1X / SDN API        ring buffer export        active socket table

Python SOAR Action: Automated Micro-Quarantine via SDN Controller

import requests, json

def quarantine_host_via_sdn(switch_ip, port_id, host_mac):
    """
    Automated SOAR playbook step: Move compromised switch port to Quarantine VLAN 999
    """
    url = f"https://sdn-controller.internal/api/v1/switches/{switch_ip}/ports/{port_id}"
    payload = {
        "vlan_id": 999,
        "description": f"AUTO-QUARANTINE: Behavioral anomaly on MAC {host_mac}",
        "admin_state": "up"
    }
    headers = {"Authorization": "Bearer SOAR_TOKEN_SECRET", "Content-Type": "application/json"}
    response = requests.patch(url, data=json.dumps(payload), headers=headers, verify=True)
    if response.status_code == 200:
        print(f"[+] Successfully quarantined host {host_mac} on port {port_id}")
    else:
        raise RuntimeError(f"[-] Failed to execute quarantine: {response.text}")

Chapter Summary

  • Modern behavioral forensics requires strict schema normalization using standards like ECS or OCSF.
  • Real-time streaming enrichment (GeoIP, ASN, asset criticality, Active Directory context) provides the semantic metadata needed for accurate anomaly scoring.
  • UEBA baselines establish dynamic normal profiles via rolling Gaussian windows and peer-group clustering, suppressing false alarms.
  • SOAR integration automates immediate, surgical containment actions (SDN micro-quarantine, targeted PCAP export) before an intruder completes lateral staging.