analyzing-network-packets-with-scapy
यह क्या करती है
यह टूल Scapy नाम के प्रोग्राम से नेटवर्क ट्रैफ़िक की जांच करता है। यह डेटा पैकेट बना सकता है, भेज सकता है और उनका विश्लेषण कर सकता है, ताकि नेटवर्क के काम करने का तरीका समझा जा सके और संदिग्ध गतिविधि का पता लगाया जा सके।
कब इस्तेमाल करें
- ✓जब किसी नेटवर्क सुरक्षा समस्या की जांच करनी हो।
- ✓जब किसी नेटवर्क की सुरक्षा टेस्ट करनी हो और उसकी कमजोरियां ढूंढनी हों।
- ✓जब नेटवर्क ट्रैफ़िक रिकॉर्ड करने वाली फ़ाइलों का विश्लेषण करना हो।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-network-packets-with-scapy/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस नेटवर्क ट्रैफ़िक फ़ाइल का विश्लेषण करें और बताएं कि इसमें कुछ असामान्य लग रहा है या नहीं।”
हर हफ़्ते 5 नई skills, 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
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।