pcap-analysis

Analyze PCAP files to extract network statistics and detect traffic patterns.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill pcap-analysis-generalreasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pcap-analysis
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/dapt-intrusion-detection/environment/skills/pcap-analysis
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill pcap-analysis-generalreasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scapy, and includes scripts (resource) components.

What problem does it solve?

PCAP data is dense and manual analysis is time-consuming; this Skill provides a set of validated Python utilities to streamline extracting traffic statistics, protocol distributions, and topology metrics from packet captures.

Core Features & Use Cases

  • Packet loading and protocol filtering: load PCAPs and split traffic into IP/TCP/UDP/ICMP/ARP streams for targeted analysis.
  • Graph and flow metrics: compute unique-source/destination degrees, bidirectional flow counts, and per-flow summaries to characterize network topology.
  • Detection helpers: leverage built-in detectors for port scans, DoS patterns, and beaconing using calibrated thresholds to aid security investigations.
  • Use Case: security analysts can quickly verify whether a PCAP contains anomalous traffic by running the detectors and comparing graph-centric metrics to baselines.

Quick Start

Load a sample PCAP and run the helper functions to generate initial statistics.

Frequently Asked Questions about pcap-analysis

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

FAQPage Schema
How do I analyze PCAP files to detect network intrusions like port scans or DoS attacks?

To analyze PCAP files for network intrusions, you load packet captures and run built-in detectors to identify port scans, DoS patterns, and beaconing using calibrated thresholds. This extracts traffic statistics and IP/TCP/UDP protocol distributions to flag anomalous network behavior.

Can I use Python and Scapy to extract network statistics from a PCAP file?

Yes, you can use Python with Scapy to extract network statistics from a PCAP file. Validated utilities load packets, filter traffic into IP/TCP/UDP/ICMP/ARP streams, and compute graph metrics and inter-arrival time statistics for targeted network analysis.

What is the best way to compute graph metrics and flow summaries from packet captures?

The best way to compute graph metrics and flow summaries from packet captures is using dedicated Python utilities that calculate unique-source/destination degrees and bidirectional flow counts. This characterizes network topology and provides per-flow summaries for performance analysis.

Does this network analysis approach support splitting traffic by protocol for targeted security monitoring?

Yes, this network analysis approach supports splitting traffic by protocol for targeted security monitoring. It loads PCAPs and separates traffic into distinct IP, TCP, UDP, ICMP, and ARP streams, allowing analysts to verify anomalous traffic patterns against established baselines.

How do inter-arrival time statistics help with anomaly detection in enterprise network traffic?

Inter-arrival time statistics help with anomaly detection in enterprise network traffic by characterizing communication timing patterns. Computing IAT statistics alongside graph metrics allows security analysts to detect beaconing and verify whether a PCAP contains anomalous traffic by comparing results to baselines.