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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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
scapylibrary 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
- Read and parse pcap/pcapng files with
rdpcap()for offline analysis - Extract protocol layers (IP, TCP, UDP, DNS, HTTP) and field values
- Compute traffic statistics: top talkers, protocol distribution, port frequency
- Detect SYN flood patterns by analyzing TCP flag ratios
- Identify DNS exfiltration indicators via query length and entropy analysis
- Craft custom probe packets for authorized network testing
- 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.
인기도
- GitHub 스타
- 35k
- 순위
- #7636
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.