implementing-network-traffic-baselining

Build network traffic baselines from NetFlow/IPFIX data using pandas statistical analysis.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-network-traffic-baselining
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-network-traffic-baselining
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/network-security/implementing-network-traffic-baselining
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-network-traffic-baselining

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy.

What problem does it solve?

Security teams struggle to distinguish normal network behavior from threats like data exfiltration or beaconing because they lack a statistical definition of "normal" traffic. This Skill builds traffic baselines from historical NetFlow/IPFIX data so deviations can be detected with z-score and IQR methods.

Core Features & Use Cases

  • Traffic Profiling: Computes hourly and daily distributions of bytes, packets, and flows, plus per-source-IP statistics and protocol/port ratios.
  • Anomaly Detection: Applies z-score thresholds and IQR outlier detection to flag exfiltration spikes, beaconing, and unusual port usage.
  • Baseline Reporting: Generates a JSON report with hourly/daily profiles, per-host statistics, anomaly z-scores, and top-talker rankings.
  • Use Case: A SOC analyst exports 30 days of NetFlow records, runs the baseline, and identifies a workstation sending 10x its normal byte volume during off-hours — a potential exfiltration event.

Quick Start

Analyze my exported NetFlow CSV data to build hourly and per-host traffic baselines and flag any anomalies using z-score and IQR thresholds.

Frequently Asked Questions about implementing-network-traffic-baselining

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a network traffic baseline from NetFlow data?

Ingest NetFlow v5/v9 or IPFIX records from CSV or JSON exports into pandas, then compute hourly and daily distributions of bytes, packets, and flows. Build per-source-IP profiles with mean, median, and standard deviation, and apply z-score or IQR thresholds to flag outliers.

How to detect network anomalies with z-score and IQR in Python?

Use pandas and numpy to compute per-host and per-time-window statistics, then flag flows whose values exceed a z-score threshold or fall outside the IQR-based outlier range. Baseline per hour-of-day and day-of-week rather than globally to avoid false positives on diurnal peaks.

How much NetFlow data is needed for traffic baselining?

A minimum of 7 days of historical flow data is recommended so the baseline covers full weekly cycles. Shorter windows, or windows containing an active incident, bake anomalies into the definition of normal and degrade detection accuracy.

Why does z-score anomaly detection flag normal traffic peaks?

Network volume is heavy-tailed and diurnal, so a single global mean and standard deviation flags every business-hours peak. Baseline per hour-of-day and day-of-week, and prefer IQR or MAD methods for skewed distributions instead of one global z-score.

Does sampled NetFlow affect traffic baseline accuracy?

Yes. Sampled exports such as 1:1000 skew byte and packet volumes, and active-timeout flow splitting makes one long transfer appear as many small flows. Normalize for the sampling rate and account for flowDuration before summing bytes and packets.