detecting-exfiltration-over-dns-with-zeek
यह क्या करती है
यह टूल DNS लॉग्स का विश्लेषण करता है ताकि ऐसा संदिग्ध ट्रैफ़िक मिल सके जिसमें चोरी किया गया डेटा छिपा हो सकता है। संभावित हमलों की पहचान के लिए यह डोमेन नामों और क्वेरी की संख्या में असामान्य पैटर्न देखता है।
कब इस्तेमाल करें
- ✓जांच करना कि DNS का इस्तेमाल करके इंटरनेट पर डेटा तो नहीं चुराया जा रहा।
- ✓ऐसा असामान्य इंटरनेट ट्रैफ़िक देखना जो हमला हो सकता है।
- ✓नेटवर्क लॉग्स में छिपी हुई दुर्भावनापूर्ण गतिविधि खोजना।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-exfiltration-over-dns-with-zeek/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे DNS लॉग्स का विश्लेषण करो और बताओ कि क्या DNS क्वेरी में छिपाकर डेटा चुराने की कोई कोशिश हुई है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल DNS रिकॉर्ड की जांच करता है और बहुत लंबे डोमेन नाम या बेतरतीब अक्षरों के क्रम (high entropy) ढूंढता है। यह यह भी गिनता है कि एक ही सोर्स से कितनी अलग-अलग क्वेरी आ रही हैं और क्वेरी की संख्या असामान्य है या नहीं, यह भी जांचता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Detecting Exfiltration over DNS with Zeek
Overview
DNS tunneling and exfiltration is a technique used by attackers to bypass firewalls and DLP controls by encoding stolen data into DNS query subdomains. Legitimate DNS queries have predictable entropy and length patterns, while exfiltration queries contain encoded data with high Shannon entropy, unusually long subdomain labels, and high volumes of unique subdomains per parent domain.
This skill analyzes Zeek dns.log files (TSV format) to detect exfiltration indicators. The agent computes Shannon entropy for each subdomain component, identifies queries exceeding the 63-character DNS label limit, counts unique subdomains per parent domain, and flags domains that exceed configurable thresholds. These techniques detect tools like dnscat2, iodine, dns2tcp, and custom DNS tunneling implementations.
When to Use
- When investigating security incidents that require detecting exfiltration over dns with zeek
- 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.9 or later with math and collections modules (stdlib)
- Zeek dns.log files in TSV format with standard field headers
- Network capture data processed by Zeek 5.0+ or later
- Understanding of DNS protocol structure and query types
Steps
Parse Zeek dns.log headers: Read the TSV file, extract the
#fieldsheader line to identify column positions forts,id.orig_h,query,qtype_name,rcode_name, andanswers.Extract and decompose queries: For each DNS query, split the FQDN into subdomain labels and parent domain. Skip queries to known safe domains and internal zones.
Compute Shannon entropy: Calculate the information entropy of each subdomain label. Legitimate subdomains typically have entropy below 3.5, while encoded/encrypted data produces entropy above 4.0.
Detect long labels: Flag DNS labels exceeding 52 characters (approaching the 63-character maximum). Long labels are a strong indicator of data tunneling.
Count unique subdomains per domain: Track how many distinct subdomains each parent domain receives. Domains with more than 50 unique subdomains within the log window are suspicious.
Identify query volume anomalies: Calculate queries-per-minute per source IP per domain. Exfiltration tools generate sustained high-volume query streams that differ from normal browsing.
Score and rank domains: Combine entropy, label length, uniqueness count, and query volume into a composite risk score. Rank domains by score and output the top suspicious domains.
Generate detection report: Produce a JSON report with flagged domains, their evidence indicators, originating source IPs, and recommended response actions.
Expected Output
{
"analysis_summary": {
"total_queries_analyzed": 145832,
"unique_domains": 3421,
"flagged_domains": 3,
"entropy_threshold": 3.5
},
"flagged_domains": [
{
"domain": "data.evil-c2.com",
"unique_subdomains": 892,
"avg_entropy": 4.72,
"max_label_length": 61,
"source_ips": ["10.0.1.45"],
"risk_score": 9.4,
"indicators": ["high_entropy", "long_labels", "high_subdomain_count"]
}
]
}
अक्सर पूछे जाने वाले सवाल
'entropy' का इस संदर्भ में क्या मतलब है?
Entropy बताता है कि कोई डोमेन नाम कितना बेतरतीब या अनुमान से परे है। सामान्य नाम अनुमान लगाने लायक होते हैं, जबकि छिपाया गया डेटा ज़्यादा बेतरतीब दिखता है।
'DNS लॉग्स' क्या होते हैं?
ये इंटरनेट की एक फ़ोनबुक जैसे होते हैं, जो वेबसाइट के नाम (जैसे google.com) को उन संख्यात्मक पतों में बदलते हैं जिन्हें कंप्यूटर समझते हैं। यह टूल उसी फ़ोनबुक की बातचीत का विश्लेषण करता है।
'data exfiltration' का क्या मतलब है?
किसी सिस्टम या नेटवर्क से जानकारी चुराकर बाहर भेजना, जिसे अक्सर इस तरह छिपाया जाता है कि पकड़ में न आए।
जानकारी
लेखक का मूल विवरण
Detect DNS-based data exfiltration by analyzing Zeek dns.log for high-entropy subdomains, oversized TXT/NULL records, and anomalous query volume or patterns. Use when investigating suspected DNS tunneling, covert C2 over DNS, or data exfiltration hidden in DNS queries against network traffic captured by Zeek.
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7829
- लाइसेंस
- 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 आउटपुट के साथ।