[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71AFHDNBDD2G3THDVWNN10Y":3,"skill-same:01M71AFHDNBDD2G3THDVWNN10Y":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":72},"01M71AFHDNBDD2G3THDVWNN10Y","cyber-analyzing-dns-logs-for-exfiltration",null,"Analyzes DNS query logs to detect data exfiltration via DNS tunneling, DGA domain communication, and covert C2 channels using entropy analysis, query volume anomalies, and subdomain length detection in SIEM platforms. Use when SOC teams need to identify DNS-based threats that bypass traditional network security controls.","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-analyzing-dns-logs-for-exfiltration\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"dns","exfiltration","logs","analyzing dns logs for exfiltration","analyzing","for","cyber analyzing dns logs for exfiltration","communication","subdomain","siem","dga","analysis","soc","query","when","false","cybersecurity","entropy","volume","network security","2026-11-10 10:12:30",false,"---\nname: cyber-analyzing-dns-logs-for-exfiltration\ndescription: \"Analyzes DNS query logs to detect data exfiltration via DNS tunneling, DGA domain communication, and covert C2 channels using entropy analysis, query volume anomalies, and subdomain length detection in SIEM platforms. Use when SOC teams need to identify DNS-based threats that bypass traditional network security controls.\"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: analyzing-dns-logs-for-exfiltration | description: 'Analyzes DNS query logs to detect data exfiltration via DNS tunneling, |   DGA domain communication, and covert C2 channels using entropy analysis, query volume |   anomalies, and subdomain length detection in SIEM platforms. Use when SOC teams |   need to identify DNS-based threats that bypass traditional network security controls. |  |   ' | domain: cybersecurity | subdomain: soc-operations | tags: | - soc | - dns | - exfiltration | - d\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Analyzing DNS Logs for Exfiltration\n\n## When to Use\n\nUse this skill when:\n- SOC teams suspect data exfiltration through DNS tunneling to bypass firewall\u002Fproxy controls\n- Threat intelligence indicates adversaries using DNS-based C2 channels (e.g., Cobalt Strike DNS beacon)\n- UEBA detects anomalous DNS query volumes from specific hosts\n- Malware analysis reveals DNS-over-HTTPS (DoH) or DNS tunneling capabilities\n\n**Do not use** for standard DNS troubleshooting or availability monitoring — this skill focuses on security-relevant DNS abuse detection.\n\n## Prerequisites\n\n- DNS query logging enabled (Windows DNS Server, Bind, Infoblox, or Cisco Umbrella)\n- DNS logs ingested into SIEM (Splunk with `Stream:DNS`, `dns` sourcetype, or Zeek DNS logs)\n- Passive DNS data for historical domain resolution analysis\n- Baseline of normal DNS behavior (query volume, domain distribution, TXT record frequency)\n- Python with `math` and `collections` libraries for entropy calculation\n\n## Workflow\n\n### Step 1: Detect DNS Tunneling via Subdomain Length Analysis\n\nDNS tunneling encodes data in subdomain labels, creating unusually long queries:\n\n```spl\nindex=dns sourcetype=\"stream:dns\" query_type IN (\"A\", \"AAAA\", \"TXT\", \"CNAME\", \"MX\")\n| eval domain_parts = split(query, \".\")\n| eval subdomain = mvindex(domain_parts, 0, mvcount(domain_parts)-3)\n| eval subdomain_str = mvjoin(subdomain, \".\")\n| eval subdomain_len = len(subdomain_str)\n| eval tld = mvindex(domain_parts, -1)\n| eval registered_domain = mvindex(domain_parts, -2).\".\".tld\n| where subdomain_len > 50\n| stats count AS queries, dc(query) AS unique_queries,\n        avg(subdomain_len) AS avg_subdomain_len,\n        max(subdomain_len) AS max_subdomain_len,\n        values(src_ip) AS sources\n  by registered_domain\n| where queries > 20\n| sort - avg_subdomain_len\n| table registered_domain, queries, unique_queries, avg_subdomain_len, max_subdomain_len, sources\n```\n\n### Step 2: Detect High-Entropy Domain Queries (DGA Detection)\n\nDomain Generation Algorithms produce random-looking domains:\n\n```spl\nindex=dns sourcetype=\"stream:dns\"\n| eval domain_parts = split(query, \".\")\n| eval sld = mvindex(domain_parts, -2)\n| eval sld_len = len(sld)\n| eval char_count = sld_len\n| eval vowels = len(replace(sld, \"[^aeiou]\", \"\"))\n| eval consonants = len(replace(sld, \"[^bcdfghjklmnpqrstvwxyz]\", \"\"))\n| eval digits = len(replace(sld, \"[^0-9]\", \"\"))\n| eval vowel_ratio = if(char_count > 0, vowels \u002F char_count, 0)\n| eval digit_ratio = if(char_count > 0, digits \u002F char_count, 0)\n| where sld_len > 12 AND (vowel_ratio \u003C 0.2 OR digit_ratio > 0.3)\n| stats count AS queries, dc(query) AS unique_domains, values(src_ip) AS sources\n  by query\n| where unique_domains > 10\n| sort - queries\n```\n\n**Python-based Shannon Entropy Calculation for DNS queries:**\n\n```python\nimport math\nfrom collections import Counter\n\ndef shannon_entropy(text):\n    \"\"\"Calculate Shannon entropy of a string\"\"\"\n    if not text:\n        return 0\n    counter = Counter(text.lower())\n    length = len(text)\n    entropy = -sum(\n        (count \u002F length) * math.log2(count \u002F length)\n        for count in counter.values()\n    )\n    return round(entropy, 4)\n\n# Test with examples\nnormal_domain = \"google\"           # Low entropy\ndga_domain = \"x8kj2m9p4qw7n\"      # High entropy\ntunnel_subdomain = \"aGVsbG8gd29ybGQ.evil.com\"  # Base64 encoded data\n\nprint(f\"Normal: {shannon_entropy(normal_domain)}\")     # ~2.25\nprint(f\"DGA:    {shannon_entropy(dga_domain)}\")         # ~3.70\nprint(f\"Tunnel: {shannon_entropy(tunnel_subdomain)}\")   # ~3.50\n\n# Threshold: entropy > 3.5 for subdomain = likely tunneling\u002FDGA\n```\n\n**Splunk implementation of entropy scoring:**\n\n```spl\nindex=dns sourcetype=\"stream:dns\"\n| eval domain_parts = split(query, \".\")\n| eval check_string = mvindex(domain_parts, 0)\n| eval check_len = len(check_string)\n| where check_len > 8\n| eval chars = split(check_string, \"\")\n| stats count AS total_chars, dc(chars) AS unique_chars by query, src_ip, check_string, check_len\n| eval entropy_estimate = log(unique_chars, 2) * (unique_chars \u002F check_len)\n| where entropy_estimate > 3.5\n| stats count AS high_entropy_queries, dc(query) AS unique_queries by src_ip\n| where high_entropy_queries > 50\n| sort - high_entropy_queries\n```\n\n### Step 3: Detect Anomalous DNS Query Volume\n\nIdentify hosts generating abnormal DNS traffic:\n\n```spl\nindex=dns sourcetype=\"stream:dns\" earliest=-24h\n| bin _time span=1h\n| stats count AS queries, dc(query) AS unique_domains by src_ip, _time\n| eventstats avg(queries) AS avg_queries, stdev(queries) AS stdev_queries by src_ip\n| eval z_score = (queries - avg_queries) \u002F stdev_queries\n| where z_score > 3 OR queries > 5000\n| sort - z_score\n| table _time, src_ip, queries, unique_domains, avg_queries, z_score\n```\n\n**Detect TXT record abuse (common tunneling method):**\n\n```spl\nindex=dns sourcetype=\"stream:dns\" query_type=\"TXT\"\n| stats count AS txt_queries, dc(query) AS unique_txt_domains,\n        values(query) AS domains by src_ip\n| where txt_queries > 100\n| eval suspicion = case(\n    txt_queries > 1000, \"CRITICAL — Likely DNS tunneling\",\n    txt_queries > 500, \"HIGH — Possible DNS tunneling\",\n    txt_queries > 100, \"MEDIUM — Unusual TXT volume\"\n  )\n| sort - txt_queries\n| table src_ip, txt_queries, unique_txt_domains, suspicion\n```\n\n### Step 4: Detect Known DNS Tunneling Tools\n\nSearch for signatures of common DNS tunneling tools:\n\n```spl\nindex=dns sourcetype=\"stream:dns\"\n| eval query_lower = lower(query)\n| where (\n    match(query_lower, \"\\.dnscat\\.\") OR\n    match(query_lower, \"\\.dns2tcp\\.\") OR\n    match(query_lower, \"\\.iodine\\.\") OR\n    match(query_lower, \"\\.dnscapy\\.\") OR\n    match(query_lower, \"\\.cobalt.*\\.beacon\") OR\n    query_type=\"NULL\" OR\n    (query_type=\"TXT\" AND len(query) > 100)\n  )\n| stats count by src_ip, query, query_type\n| sort - count\n```\n\n**Detect DNS over HTTPS (DoH) bypassing local DNS:**\n\n```spl\nindex=proxy OR index=firewall\ndest IN (\"1.1.1.1\", \"1.0.0.1\", \"8.8.8.8\", \"8.8.4.4\",\n         \"9.9.9.9\", \"149.112.112.112\", \"208.67.222.222\")\ndest_port=443\n| stats sum(bytes_out) AS total_bytes, count AS connections by src_ip, dest\n| where connections > 100 OR total_bytes > 10485760\n| eval alert = \"Possible DoH bypass — DNS queries sent over HTTPS to public resolver\"\n| sort - total_bytes\n```\n\n### Step 5: Correlate DNS Findings with Endpoint Data\n\nCross-reference suspicious DNS with process data:\n\n```spl\nindex=dns src_ip=\"192.168.1.105\" query=\"*.evil-tunnel.com\" earliest=-24h\n| stats count AS dns_queries, earliest(_time) AS first_query, latest(_time) AS last_query\n  by src_ip, query\n| join src_ip [\n    search index=sysmon EventCode=3 DestinationPort=53 Computer=\"WORKSTATION-042\"\n    | stats count AS connections, values(Image) AS processes by SourceIp\n    | rename SourceIp AS src_ip\n  ]\n| table src_ip, query, dns_queries, first_query, last_query, processes\n```\n\n### Step 6: Calculate Data Exfiltration Volume Estimate\n\nEstimate data volume encoded in DNS queries:\n\n```spl\nindex=dns src_ip=\"192.168.1.105\" query=\"*.evil-tunnel.com\" earliest=-24h\n| eval domain_parts = split(query, \".\")\n| eval encoded_data = mvindex(domain_parts, 0)\n| eval encoded_bytes = len(encoded_data)\n| eval decoded_bytes = encoded_bytes * 0.75  -- Base64 decoding factor\n| stats sum(decoded_bytes) AS total_bytes_estimated, count AS total_queries,\n        earliest(_time) AS first_seen, latest(_time) AS last_seen\n| eval estimated_kb = round(total_bytes_estimated \u002F 1024, 1)\n| eval estimated_mb = round(total_bytes_estimated \u002F 1048576, 2)\n| eval duration_hours = round((last_seen - first_seen) \u002F 3600, 1)\n| eval rate_kbps = round(estimated_kb \u002F (duration_hours * 3600) * 8, 2)\n| table total_queries, estimated_mb, duration_hours, rate_kbps, first_seen, last_seen\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **DNS Tunneling** | Technique encoding data within DNS queries\u002Fresponses to exfiltrate data or establish C2 channels through DNS |\n| **DGA** | Domain Generation Algorithm — malware technique generating pseudo-random domain names for C2 resilience |\n| **Shannon Entropy** | Mathematical measure of randomness in a string — high entropy (>3.5) in domain names indicates DGA or tunneling |\n| **TXT Record Abuse** | Using DNS TXT records (designed for text data) as a high-bandwidth channel for data tunneling |\n| **DNS over HTTPS (DoH)** | DNS queries encrypted over HTTPS (port 443), bypassing traditional DNS monitoring |\n| **Passive DNS** | Historical record of DNS resolutions showing which IPs a domain resolved to over time |\n\n## Tools & Systems\n\n- **Splunk Stream**: Network traffic capture add-on providing parsed DNS query data for SIEM analysis\n- **Zeek (Bro)**: Network security monitor generating detailed DNS transaction logs for analysis\n- **Cisco Umbrella (OpenDNS)**: Cloud DNS security platform blocking malicious domains and logging query data\n- **Infoblox DNS Firewall**: DNS-layer security providing RPZ-based blocking and detailed query logging\n- **Farsight DNSDB**: Passive DNS database for historical domain resolution lookups and infrastructure mapping\n\n## Common Scenarios\n\n- **Cobalt Strike DNS Beacon**: Detect periodic TXT queries with encoded payloads to C2 domain\n- **Data Exfiltration**: Large volumes of unique subdomain queries encoding stolen data in Base64\u002Fhex\n- **DGA Malware**: Detect DNS queries to algorithmically generated domains (high entropy, no web content)\n- **DNS-over-HTTPS Bypass**: Employee using DoH to bypass corporate DNS filtering and monitoring\n- **Slow Drip Exfiltration**: Low-volume DNS tunneling staying below threshold alerts (requires baseline comparison)\n\n## Output Format\n\n```\nDNS EXFILTRATION ANALYSIS — WORKSTATION-042\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nPeriod:       2024-03-14 to 2024-03-15\nSource:       192.168.1.105 (WORKSTATION-042, Finance Dept)\n\nFindings:\n  [CRITICAL] DNS tunneling detected to evil-tunnel[.]com\n    Query Volume:       12,847 queries in 18 hours\n    Avg Subdomain Len:  63 characters (normal: \u003C20)\n    Avg Entropy:        3.82 (threshold: 3.5)\n    Query Types:        TXT (89%), A (11%)\n    Estimated Data:     ~4.7 MB exfiltrated via DNS\n    Rate:               0.58 kbps (slow drip pattern)\n\n  [HIGH] DGA-like domains resolved\n    Unique DGA Domains: 247 domains resolved\n    Pattern:            15-char random alphanumeric.xyz TLD\n    Entropy Range:      3.6 - 4.1\n\nProcess Attribution:\n  Process:   svchost_update.exe (masquerading — not legitimate svchost)\n  PID:       4892\n  Parent:    explorer.exe\n  Hash:      SHA256: a1b2c3d4... (VT: 34\u002F72 malicious — Cobalt Strike beacon)\n\nContainment:\n  [DONE] Host isolated via EDR\n  [DONE] Domain evil-tunnel[.]com added to DNS sinkhole\n  [DONE] Incident IR-2024-0448 created\n```\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Analyzing DNS Logs for Exfiltration\n\n## When to Use\n\nUse this skill when:\n- SOC teams suspect data exfiltration through DNS tunneling to bypass firewall\u002Fproxy controls\n- Threat intelligence indicates adversaries using DNS-based C2 channels (e.g., Cobalt Strike DNS beacon)\n- UEBA detects anomalous DNS query volumes from specific hosts\n- Malware analysis reveals DNS-over-HTTPS (DoH) or DNS tunneling capabilities\n\n**Do not use** for standard DNS troubleshooting or availability monitoring — this skill focuses on security-relevant DNS abuse detection.\n\n## Prerequisites\n\n- DNS query logging enabled (Windows DNS Server, Bind, Infoblox, or Cisco Umbrella)\n- DNS logs ingested into SIEM (Splunk with `Stream:DNS`, `dns` sourcetype, or Zeek DNS logs)\n- Passive DNS data for historical domain resolution analysis\n- Baseline of normal DNS behavior (query volume, domain distribution, TXT record frequency)\n- Python with `math` and `collections` libraries for entropy calculation\n\n## Workflow\n\n### Step 1: Detect DNS Tunneling via Subdomain Length Analysis\n\nDNS tunneling encodes data in subdomain labels, creating unusually long queries:\n\n```spl\nindex=dns sourcetype=\"stream:dns\" query_type IN (\"A\", \"AAAA\", \"TXT\", \"CNAME\", \"MX\")\n| eval domain_parts = split(query, \".\")\n| eval subdomain = mvindex(domain_parts, 0, mvcount(domain_parts)-3)\n| eval subdomain_str = mvjoin(subdomain, \".\")\n| eval subdomain_len = len(subdomain_str)\n| eval tld = mvindex(domain_parts, -1)\n| eval registered_domain = mvindex(domain_parts, -2).\".\".tld\n| where subdomain_len > 50\n| stats count AS queries, dc(query) AS unique_queries,\n        avg(subdomain_len) AS avg_subdomain_len,\n        max(subdomain_len) AS max_subdomain_len,\n        values(src_ip) AS sources\n  by registered_domain\n| where queries > 20\n| sort - avg_subdomain_len\n| table registered_domain, queries, unique_queries, avg_subdomain_len, max_subdomain_len, sources\n```\n\n### Step 2: Detect High-Entropy Domain Queries (DGA Detection)\n\nDomain Generation Algorithms produce random-looking domains:\n\n```spl\nindex=dns sourcetype=\"stream:dns\"\n| eval domain_parts = split(query, \".\")\n| eval sld = mvindex(domain_parts, -2)\n| eval sld_len = len(sld)\n| eval char_count = sld_len\n| eval vowels = len(replace(sld, \"[^aeiou]\", \"\"))\n| eval consonants = len(replace(sld, \"[^bcdfghjklmnpqrstvwxyz]\", \"\"))\n| eval digits = len(replace(sld, \"[^0-9]\", \"\"))\n| eval vowel_ratio = if(char_count > 0, vowels \u002F char_count, 0)\n| eval digit_ratio = if(char_count > 0, digits \u002F char_count, 0)\n| where sld_len > 12 AND (vowel_ratio \u003C 0.2 OR digit_ratio > 0.3)\n| stats count AS queries, dc(query) AS unique_domains, values(src_ip) AS sources\n  by query\n| where unique_domains > 10\n| sort - queries\n```\n\n**Python-based Shannon Entropy Calculation for DNS queries:**\n\n```python\nimport math\nfrom collections import Counter\n\ndef shannon_entropy(text):\n    \"\"\"Calculate Shannon entropy of a string\"\"\"\n    if not text:\n        return 0\n    counter = Counter(text.lower())\n    length = len(text)\n    entropy = -sum(\n        (count \u002F length) * math.log2(count \u002F length)\n        for count in counter.values()\n    )\n    return round(entropy, 4)\n\n# Test with examples\nnormal_domain = \"google\"           # Low entropy\ndga_domain = \"x8kj2m9p4qw7n\"      # High entropy\ntunnel_subdomain = \"aGVsbG8gd29ybGQ.evil.com\"  # Base64 encoded data\n\nprint(f\"Normal: {shannon_entropy(normal_domain)}\")     # ~2.25\nprint(f\"DGA:    {shannon_entropy(dga_domain)}\")         # ~3.70\nprint(f\"Tunnel: {shannon_entropy(tunnel_subdomain)}\")   # ~3.50\n\n# Threshold: entropy > 3.5 for subdomain = likely tunneling\u002FDGA\n```\n\n**Splunk implementation of entropy scoring:**\n\n```spl\nindex=dns sourcetype=\"stream:dns\"\n| eval domain_parts = split(query, \".\")\n| eval check_string = mvindex(domain_parts, 0)\n| eval check_len = len(check_string)\n| where check_len > 8\n| eval chars = split(check_string, \"\")\n| stats count AS total_chars, dc(chars) AS unique_chars by query, src_ip, check_string, check_len\n| eval entropy_estimate = log(unique_chars, 2) * (unique_chars \u002F check_len)\n| where entropy_estimate > 3.5\n| stats count AS high_entropy_queries, dc(query) AS unique_queries by src_ip\n| where high_entropy_queries > 50\n| sort - high_entropy_queries\n```\n\n### Step 3: Detect Anomalous DNS Query Volume\n\nIdentify hosts generating abnormal DNS traffic:\n\n```spl\nindex=dns sourcetype=\"stream:dns\" earliest=-24h\n| bin _time span=1h\n| stats count AS queries, dc(query) AS unique_domains by src_ip, _time\n| eventstats avg(queries) AS avg_queries, stdev(queries) AS stdev_queries by src_ip\n| eval z_score = (queries - avg_queries) \u002F stdev_queries\n| where z_score > 3 OR queries > 5000\n| sort - z_score\n| table _time, src_ip, queries, unique_domains, avg_queries, z_score\n```\n\n**Detect TXT record abuse (common tunneling method):**\n\n```spl\nindex=dns sourcetype=\"stream:dns\" query_type=\"TXT\"\n| stats count AS txt_queries, dc(query) AS unique_txt_domains,\n        values(query) AS domains by src_ip\n| where txt_queries > 100\n| eval suspicion = case(\n    txt_queries > 1000, \"CRITICAL — Likely DNS tunneling\",\n    txt_queries > 500, \"HIGH — Possible DNS tunneling\",\n    txt_queries > 100, \"MEDIUM — Unusual TXT volume\"\n  )\n| sort - txt_queries\n| table src_ip, txt_queries, unique_txt_domains, suspicion\n```\n\n### Step 4: Detect Known DNS Tunneling Tools\n\nSearch for signatures of common DNS tunneling tools:\n\n```spl\nindex=dns sourcetype=\"stream:dns\"\n| eval query_lower = lower(query)\n| where (\n    match(query_lower, \"\\.dnscat\\.\") OR\n    match(query_lower, \"\\.dns2tcp\\.\") OR\n    match(query_lower, \"\\.iodine\\.\") OR\n    match(query_lower, \"\\.dnscapy\\.\") OR\n    match(query_lower, \"\\.cobalt.*\\.beacon\") OR\n    query_type=\"NULL\" OR\n    (query_type=\"TXT\" AND len(query) > 100)\n  )\n| stats count by src_ip, query, query_type\n| sort - count\n```\n\n**Detect DNS over HTTPS (DoH) bypassing local DNS:**\n\n```spl\nindex=proxy OR index=firewall\ndest IN (\"1.1.1.1\", \"1.0.0.1\", \"8.8.8.8\", \"8.8.4.4\",\n         \"9.9.9.9\", \"149.112.112.112\", \"208.67.222.222\")\ndest_port=443\n| stats sum(bytes_out) AS total_bytes, count AS connections by src_ip, dest\n| where connections > 100 OR total_bytes > 10485760\n| eval alert = \"Possible DoH bypass — DNS queries sent over HTTPS to public resolver\"\n| sort - total_bytes\n```\n\n### Step 5: Correlate DNS Findings with Endpoint Data\n\nCross-reference suspicious DNS with process data:\n\n```spl\nindex=dns src_ip=\"192.168.1.105\" query=\"*.evil-tunnel.com\" earliest=-24h\n| stats count AS dns_queries, earliest(_time) AS first_query, latest(_time) AS last_query\n  by src_ip, query\n| join src_ip [\n    search index=sysmon EventCode=3 DestinationPort=53 Computer=\"WORKSTATION-042\"\n    | stats count AS connections, values(Image) AS processes by SourceIp\n    | rename SourceIp AS src_ip\n  ]\n| table src_ip, query, dns_queries, first_query, last_query, processes\n```\n\n### Step 6: Calculate Data Exfiltration Volume Estimate\n\nEstimate data volume encoded in DNS queries:\n\n```spl\nindex=dns src_ip=\"192.168.1.105\" query=\"*.evil-tunnel.com\" earliest=-24h\n| eval domain_parts = split(query, \".\")\n| eval encoded_data = mvindex(domain_parts, 0)\n| eval encoded_bytes = len(encoded_data)\n| eval decoded_bytes = encoded_bytes * 0.75  -- Base64 decoding factor\n| stats sum(decoded_bytes) AS total_bytes_estimated, count AS total_queries,\n        earliest(_time) AS first_seen, latest(_time) AS last_seen\n| eval estimated_kb = round(total_bytes_estimated \u002F 1024, 1)\n| eval estimated_mb = round(total_bytes_estimated \u002F 1048576, 2)\n| eval duration_hours = round((last_seen - first_seen) \u002F 3600, 1)\n| eval rate_kbps = round(estimated_kb \u002F (duration_hours * 3600) * 8, 2)\n| table total_queries, estimated_mb, duration_hours, rate_kbps, first_seen, last_seen\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **DNS Tunneling** | Technique encoding data within DNS queries\u002Fresponses to exfiltrate data or establish C2 channels through DNS |\n| **DGA** | Domain Generation Algorithm — malware technique generating pseudo-random domain names for C2 resilience |\n| **Shannon Entropy** | Mathematical measure of randomness in a string — high entropy (>3.5) in domain names indicates DGA or tunneling |\n| **TXT Record Abuse** | Using DNS TXT records (designed for text data) as a high-bandwidth channel for data tunneling |\n| **DNS over HTTPS (DoH)** | DNS queries encrypted over HTTPS (port 443), bypassing traditional DNS monitoring |\n| **Passive DNS** | Historical record of DNS resolutions showing which IPs a domain resolved to over time |\n\n## Tools & Systems\n\n- **Splunk Stream**: Network traffic capture add-on providing parsed DNS query data for SIEM analysis\n- **Zeek (Bro)**: Network security monitor generating detailed DNS transaction logs for analysis\n- **Cisco Umbrella (OpenDNS)**: Cloud DNS security platform blocking malicious domains and logging query data\n- **Infoblox DNS Firewall**: DNS-layer security providing RPZ-based blocking and detailed query logging\n- **Farsight DNSDB**: Passive DNS database for historical domain resolution lookups and infrastructure mapping\n\n## Common Scenarios\n\n- **Cobalt Strike DNS Beacon**: Detect periodic TXT queries with encoded payloads to C2 domain\n- **Data Exfiltration**: Large volumes of unique subdomain queries encoding stolen data in Base64\u002Fhex\n- **DGA Malware**: Detect DNS queries to algorithmically generated domains (high entropy, no web content)\n- **DNS-over-HTTPS Bypass**: Employee using DoH to bypass corporate DNS filtering and monitoring\n- **Slow Drip Exfiltration**: Low-volume DNS tunneling staying below threshold alerts (requires baseline comparison)\n\n## Output Format\n\n```\nDNS EXFILTRATION ANALYSIS — WORKSTATION-042\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nPeriod:       2024-03-14 to 2024-03-15\nSource:       192.168.1.105 (WORKSTATION-042, Finance Dept)\n\nFindings:\n  [CRITICAL] DNS tunneling detected to evil-tunnel[.]com\n    Query Volume:       12,847 queries in 18 hours\n    Avg Subdomain Len:  63 characters (normal: \u003C20)\n    Avg Entropy:        3.82 (threshold: 3.5)\n    Query Types:        TXT (89%), A (11%)\n    Estimated Data:     ~4.7 MB exfiltrated via DNS\n    Rate:               0.58 kbps (slow drip pattern)\n\n  [HIGH] DGA-like domains resolved\n    Unique DGA Domains: 247 domains resolved\n    Pattern:            15-char random alphanumeric.xyz TLD\n    Entropy Range:      3.6 - 4.1\n\nProcess Attribution:\n  Process:   svchost_update.exe (masquerading — not legitimate svchost)\n  PID:       4892\n  Parent:    explorer.exe\n  Hash:      SHA256: a1b2c3d4... (VT: 34\u002F72 malicious — Cobalt Strike beacon)\n\nContainment:\n  [DONE] Host isolated via EDR\n  [DONE] Domain evil-tunnel[.]com added to DNS sinkhole\n  [DONE] Incident IR-2024-0448 created\n```\n",{"hide":49,"name":5,"source":50,"license":15,"description":7,"authorized_lab":45,"origin_frontmatter":51},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","name: analyzing-dns-logs-for-exfiltration | description: 'Analyzes DNS query logs to detect data exfiltration via DNS tunneling, |   DGA domain communication, and covert C2 channels using entropy analysis, query volume |   anomalies, and subdomain length detection in SIEM platforms. Use when SOC teams |   need to identify DNS-based threats that bypass traditional network security controls. |  |   ' | domain: cybersecurity | subdomain: soc-operations | tags: | - soc | - dns | - exfiltration | - d","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-analyzing-dns-logs-for-exfiltration",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-14 03:05:17",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":49},[62,65,68],{"tool":63,"command":64},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-analyzing-dns-logs-for-exfiltration",{"tool":66,"command":67},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-analyzing-dns-logs-for-exfiltration",{"tool":69,"command":70},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-analyzing-dns-logs-for-exfiltration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-analyzing-dns-logs-for-exfiltration\u002FSKILL.md",[],[74,97,120,150,177,196],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":44},"01M71CG1AME5WC0A79AE65WT0X","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[82,83,84,85,86,87,88,89,90,91,92,38,93,94,95,96],"zoom out","zoom","with","harness","how","section","re","true","understand","use","perspective","you","code","it","context",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":44},"01M71CFY9ATD0BAXV6B14HFG7C","yuri-shura","6-perspective adversarial review for high-stakes turns (architecture decisions, refactor planning, deployment review) — fans out architect, adversary (7-vector attack), maintainer, ops, product, and security perspectives in parallel, then consolidates. Use when user says 'review this decision', '\u002Fshura', 'adversarial review', 'what could go wrong', 'architecture review', or 'deployment review'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-shura\u002FSKILL.md",[],[104,105,85,106,107,29,108,109,110,111,112,91,113,38,114,115,116,117,118,119],"yuri shura","parallel","architecture review","planning","deployment","vector","strategic review","decision","strategic","ops","workflow","decisions","architecture","review","perspectives","adversarial",{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":131,"publishedAt":44},"01M71CFTTYW1HA2MNX38EV1GJ5","yuri-sales-intelligence","Unified sales and outreach skill generating cold outreach openers, social selling sequences, objection rebuttals, and ad creative for any paid platform — multi-persona aware, adapting tone and offer frame to buyer type. Use when user says 'write a cold email', 'outreach sequence', 'objection handling', 'ad copy', or 'sales pitch'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-sales-intelligence\u002FSKILL.md",[126],{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000005","邮件与沟通","SCENARIO","使用场景",[132,133,134,135,136,137,138,139,140,38,141,142,143,144,145,146,147,29,148,149],"intelligence","sales intelligence","yuri sales intelligence","sales","cold","paid","social","persona","pitch","cold email","ad creative","write","sequences","sequence","platform","email","cold outreach","frame",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":162,"publishedAt":44},"01M71CFQMBFTFADJNGP0Z2WCYK","yuri-code-intelligence","Unified code quality intelligence layer that diagnoses code smells (Long Method, Feature Envy, design pattern issues), prescribes targeted Fowler refactoring techniques, and reviews code for security, performance, and clarity. Use when user says 'review this code', 'refactor this', 'what's wrong with this method', 'code smells', or 'clean this up'.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-code-intelligence\u002FSKILL.md",[156,159],{"categoryNo":157,"categoryName":158,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":160,"categoryName":161,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师",[163,94,164,132,85,165,166,167,29,168,169,170,171,172,173,174,175,176,91,38],"yuri code intelligence","code intelligence","reviews","code quality","feature","performance","code review","long","up","issues","clean","techniques","improve","design",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":44},"01M71CFP32RT6GD3GKNHCJP8VP","yuri-adw","Invoke when user asks to run the ADW loop \u002F agentic engineering loop \u002F software factory workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fyuri-adw\u002FSKILL.md",[],[184,185,186,187,188,189,190,191,192,38,193,114,194,195],"yuri adw","run","engineering loop","software factory","software","agentic engineering","factory","loop","invoke","engineering","agentic","user",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":78,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":214,"publishedAt":44},"01M71CFK4VPEKY6A73237P7RSN","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[202,205,208,211],{"categoryNo":203,"categoryName":204,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":206,"categoryName":207,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":209,"categoryName":210,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":212,"categoryName":213,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000036","内容创作者",[215,216,217,38,114,218,85,219,108,91,220],"writing","writing skills","new","work","editing","Existing"]