本文へスキップ
Skillpedia
分析とスプレッドシート35k · #7636

analyzing-network-packets-with-scapy

できること

このツールは、Scapyというプログラムを使ってネットワークトラフィックを調べます。データパケットの作成、送信、分析ができ、ネットワークの仕組みを理解したり、不審な動きを検出したりするのに役立ちます。

使う場面

  • ✓ネットワークのセキュリティ問題を調査するとき。
  • ✓ネットワークのセキュリティをテストし、脆弱性を探すとき。
  • ✓ネットワークトラフィックを記録したファイルを分析するとき。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-network-packets-with-scapy/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-network-packets-with-scapy/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このネットワークトラフィックのファイルを分析して、普段と違う点がないか教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

Scapyを使うと、コンピューターはネットワーク上を流れるデータパケットを「見る」ことができます。パケットを読み取って重要な情報を取り出したり、ネットワークをテストするために新しいパケットを作成したりすることもできます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Analyzing Network Packets with Scapy

Overview

Scapy is a Python packet manipulation library that enables crafting, sending, sniffing, and dissecting network packets at granular protocol layers. This skill covers using Scapy for security-relevant tasks including TCP/UDP/ICMP packet crafting, pcap file analysis, protocol field extraction, SYN scan implementation, DNS query analysis, and detecting anomalous traffic patterns such as unusually fragmented packets or malformed headers.

When to Use

  • When investigating security incidents that require analyzing network packets with scapy
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Python 3.8+ with scapy library installed (pip install scapy)
  • Root/administrator privileges for raw socket operations (sniffing, sending)
  • Npcap (Windows) or libpcap (Linux) for packet capture
  • Authorization to perform packet operations on target network

Steps

  1. Read and parse pcap/pcapng files with rdpcap() for offline analysis
  2. Extract protocol layers (IP, TCP, UDP, DNS, HTTP) and field values
  3. Compute traffic statistics: top talkers, protocol distribution, port frequency
  4. Detect SYN flood patterns by analyzing TCP flag ratios
  5. Identify DNS exfiltration indicators via query length and entropy analysis
  6. Craft custom probe packets for authorized network testing
  7. Export findings as structured JSON report

Expected Output

JSON report containing packet statistics, protocol distribution, top source/destination IPs, detected anomalies (SYN floods, DNS tunneling indicators, fragmentation attacks), and per-flow summaries.

よくある質問

これを使うのに、ネットワークの専門家である必要はありますか?

いいえ。ただし、ネットワークの基本的な概念を理解していると、結果を解釈しやすくなります。このツールはパケット分析を簡単にしてくれます。

ネットワークの「パケット」とは何ですか?

インターネットやローカルネットワークを流れる小さなデータの単位で、郵便で送られる手紙のようなものです。

ネットワークトラフィックを分析する目的は何ですか?

データの流れを把握し、問題を見つけ、セキュリティを確保し、ネットワークが正しく機能しているかを確認するために使われます。

詳細

作者による元の説明

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 security testing.

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#7636
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル