Chuyển đến nội dung
Skillpedia
Phân tích và bảng tính35k · #7636

analyzing-network-packets-with-scapy

Skill này làm gì

Công cụ này dùng chương trình Scapy để kiểm tra lưu lượng mạng. Nó có thể tạo, gửi và phân tích các gói dữ liệu để hiểu cách mạng hoạt động và phát hiện hoạt động đáng ngờ.

Khi nào nên dùng

  • ✓Khi điều tra một vấn đề bảo mật mạng.
  • ✓Khi kiểm tra bảo mật mạng và tìm lỗ hổng.
  • ✓Khi phân tích các file ghi lại lưu lượng mạng.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-network-packets-with-scapy/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Phân tích file lưu lượng mạng này và cho tôi biết có gì bất thường không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Scapy cho phép máy tính “nhìn thấy” các gói dữ liệu di chuyển trên mạng. Nó có thể đọc các gói này, trích xuất thông tin quan trọng và thậm chí tạo gói mới để kiểm tra mạng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

Câu hỏi thường gặp

Tôi có cần là chuyên gia mạng để dùng không?

Không cần, nhưng hiểu các khái niệm mạng cơ bản sẽ giúp bạn đọc kết quả. Công cụ giúp đơn giản hóa việc phân tích gói tin.

Gói tin mạng (packet) là gì?

Đây là các đơn vị dữ liệu nhỏ đi qua internet hoặc mạng nội bộ, giống như những lá thư được gửi qua bưu điện.

Mục đích của việc phân tích lưu lượng mạng là gì?

Đây là để hiểu dữ liệu đang di chuyển thế nào, tìm vấn đề, đảm bảo an toàn và kiểm tra xem mạng có hoạt động đúng không.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7636
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự