analyzing-network-packets-with-scapy

analyzing-network-packets-with-scapy is a skill for Claude Code from killvxk/cybersecurity-skills-zh. It costs 55 tokens per session (519 once invoked), scanned A, original, Apache-2.0.

A guide to using Scapy, a Python library for creating, capturing, reading, and examining network packets. Packets are the small units of data sent between computers over a network.

In plain words
What is it for?
Use it to examine TCP, UDP, ICMP, DNS, HTTP, and other packet data; calculate traffic statistics; test network protocols; and produce JSON findings.
Why use it?
It provides a way to inspect network traffic and look for unusual patterns during authorised security work. It can analyse saved packet-capture files as well as constructed test traffic.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cybersecurity-skills-zh plugin — 58 skills shipped together

Good fit Use it to examine TCP, UDP, ICMP, DNS, HTTP, and other packet data; calculate traffic statistics; test network protocols; and produce JSON findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-network-packets-with-scapy
Clone the repo
git clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zh

Made for: Claude Code.

Or install cybersecurity-skills-zh, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyzing-network-packets-with-scapy

README.md
[![agentmods](https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy/github.svg)](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy)
Your own site
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-network-packets-with-scapy

Your own site · 80×15
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-network-packets-with-scapy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 519 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.00519
Opus 5 $0.00028 $0.00260
Sonnet 5 $0.00011 $0.00104
Haiku 4.5 $0.00006 $0.00052

Measured 10d ago against content hash 02d877c8a9c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

analyzing-network-packets-with-scapy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/analyzing-network-packets-with-scapy/SKILL.md · 44 lines

What it actually says

使用 Scapy 分析网络数据包

概述

Scapy 是一个 Python 数据包操作库,可在精细的协议层级构造、发送、嗅探和解析网络数据包。本技能涵盖将 Scapy 用于安全相关任务,包括 TCP/UDP/ICMP 数据包构造、pcap 文件分析、协议字段提取、SYN 扫描实现、DNS 查询分析,以及检测异常流量模式(如异常分片数据包或格式错误的头部)。

前置条件

  • Python 3.8+ 并安装 scapy 库(pip install scapy
  • 原始套接字操作(嗅探、发送)需要 root/管理员权限
  • Windows 系统需要 Npcap,Linux 系统需要 libpcap 进行数据包捕获
  • 获得在目标网络上执行数据包操作的授权

步骤

  1. 使用 rdpcap() 读取和解析 pcap/pcapng 文件进行离线分析
  2. 提取协议层(IP、TCP、UDP、DNS、HTTP)及字段值
  3. 计算流量统计:最活跃主机、协议分布、端口频率
  4. 通过分析 TCP 标志比例检测 SYN 洪水(SYN flood)模式
  5. 通过查询长度和熵分析识别 DNS 外泄指标
  6. 为授权网络测试构造自定义探测数据包
  7. 将发现导出为结构化 JSON 报告

预期输出

JSON 报告,包含数据包统计、协议分布、最活跃源/目标 IP、检测到的异常(SYN 洪水、DNS 隧道(DNS tunneling)指标、分片攻击),以及按流的摘要。

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 44 lines · 55 tokens per session scan A 02d877c8a9c7

Subscribe to this mod's changes

analyzing-network-packets-with-scapy is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (44 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 519 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-network-packets-with-scapy

Use Scapy to craft, send, sniff, and dissect TCP/UDP/ICMP/DNS packets, analyze pcap files, implement SYN scans, and detect anomalous traffic such as fragmented or malformed packets. Use when performing authorized network reconnaissance, protocol-level forensic analysis, or building traffic anomaly detection during…

mukul975/Anthropic-Cybersecurity-Skills · 75 tokens

analyzing-network-packets-with-scapy

Craft, send, sniff, and dissect network packets using Scapy for protocol analysis, network reconnaissance, and traffic anomaly detection in authorized security testing.

autohandai/community-skills · 39 tokens

analyzing-network-packets-with-scapy

Craft, send, sniff, and dissect network packets using Scapy for protocol analysis, network reconnaissance, and traffic anomaly detection in authorized security testing.

26zl/cybersec-toolkit · 39 tokens

analyzing-network-packets-with-scapy

Craft, send, sniff, and dissect network packets using Scapy for protocol analysis, network reconnaissance, and traffic anomaly detection in authorized security testing.

pinkpixel-dev/skills-collection-1 · 39 tokens

analyzing-network-packets-with-scapy

Craft, send, sniff, and dissect network packets using Scapy for protocol analysis, network reconnaissance, and traffic anomaly detection in authorized security testing.

marysatasselshaped667/skills-collection-1 · 39 tokens

analyzing-network-packets-with-scapy

Craft, send, sniff, and dissect network packets using Scapy for protocol analysis, network reconnaissance, and traffic anomaly detection in authorized security testing.

Mikaru0Mystic/sectinel · 39 tokens