Skip to content
Back to skills

Red Implementing Network Traffic Baselining

ASecurity

Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern…

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
securitypythongosecurity

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add bitbytelabio/arsenal --skill red-implementing-network-traffic-baselining --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Red Implementing Network Traffic Baselining?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Red Implementing Network Traffic Baselining
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bitbytelabio-red-implementing-network-traffic-baselining/badge)](https://www.skillsdirectory.com/skills/bitbytelabio-red-implementing-network-traffic-baselining)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: red-implementing-network-traffic-baselining
description: Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern…
domain: red
category: evasion
hide: true
license: Apache-2.0
metadata:
  manifest_entry: src/corpus/red-implementing-network-traffic-baselining/SKILL.md
---
# Implementing Network Traffic Baselining

## Overview

Network traffic baselining establishes normal communication patterns by analyzing historical NetFlow/IPFIX data to create statistical profiles of expected behavior. This skill uses Python pandas to compute hourly and daily traffic distributions, per-host byte/packet counts, protocol ratios, and top-N talker profiles. Anomalies are detected using z-score thresholds and IQR (interquartile range) outlier methods, enabling SOC analysts to identify deviations such as data exfiltration spikes, beaconing patterns, and unusual port usage.


## When to Use

- When deploying or configuring implementing network traffic baselining capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation

## Common Misconfigurations & Verification

- **Z-score assumes normality:** network volume is heavy-tailed and diurnal, so a global z-score flags every business-hours peak and misses off-hours exfil. Baseline per hour-of-day/day-of-week and prefer IQR/MAD for skewed data rather than one mean/stddev over all time.
- **Baseline window too short or polluted:** under ~7 days, or a window that already contains the incident, bakes anomalies into "normal." Confirm the training period is clean and long enough to cover weekly cycles.
- **Sampled NetFlow skews volumes:** sampled exports (e.g. 1:1000) and **active-timeout flow splitting** make one long transfer look like many small flows. Normalize for sampling rate and account for `flowDuration` before summing bytes/packets.
- **Aggregation hides per-host spikes:** baselining only total throughput masks a single host's exfil; profile per-source-IP too.

**Verification:** validate the detector against ground truth before relying on it — inject a synthetic spike (a host sending 10x its baseline bytes in one hour) and confirm it surfaces with a high z-score/IQR flag, and confirm a normal diurnal peak does **not**. Spot-check that flagged flows are reproducible in the raw NetFlow (matching `srcip`, `bytes`, timestamp). A model that fires on every daily peak, or stays silent when you inject a known spike, is mis-tuned — not validating a quiet network.

## Prerequisites

- NetFlow v5/v9 or IPFIX flow data exported as CSV or JSON
- Python 3.8+ with pandas and numpy libraries
- Historical flow data (minimum 7 days recommended for baseline)

## Steps

1. Ingest NetFlow/IPFIX records from CSV or JSON exports
2. Compute hourly and daily traffic volume distributions (bytes, packets, flows)
3. Build per-source-IP baseline profiles with mean, median, standard deviation
4. Calculate protocol and port distribution baselines
5. Apply z-score anomaly detection to identify statistical outliers
6. Flag flows exceeding IQR-based thresholds as potential anomalies
7. Generate baseline report with anomaly alerts

## Expected Output

JSON report containing traffic baselines (hourly/daily profiles), per-host statistics, detected anomalies with z-scores, and top talker rankings with deviation indicators.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.