[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B8R76NC2BK3YYWC5A9RNBF":3,"skill-same:01M7B8R76NC2BK3YYWC5A9RNBF":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":13,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M7B8R76NC2BK3YYWC5A9RNBF","performing-network-traffic-analysis-with-zeek",null,"Deploy Zeek (formerly Bro) as a passive network security monitor to generate structured logs of protocol metadata (HTTP, DNS, TLS, SSH, SMTP, FTP, and more), write custom detection scripts, and integrate outputs with SIEM platforms. Use when standing up continuous, high-fidelity network traffic monitoring for threat detection, anomaly identification, or forensic investigation beyond what raw PCAP analysis provides.","vikasvardhanv\u002Fjerry_skills","vikasvardhanv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99010657?v=4","01M7B2B0VN78W7529RQX5BR6DZ","01M7B2B0WDNTXJHRK3QNPNWRP6",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-network-traffic-analysis-with-zeek\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-network-traffic-analysis-with-zeek\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-network-traffic-analysis-with-zeek\ndescription: Deploy Zeek (formerly Bro) as a passive network security monitor to generate structured logs of protocol metadata (HTTP, DNS, TLS, SSH, SMTP, FTP, and more), write custom detection scripts, and integrate outputs with SIEM platforms. Use when standing up continuous, high-fidelity network traffic monitoring for threat detection, anomaly identification, or forensic investigation beyond what raw PCAP analysis provides.\ndomain: cybersecurity\nsubdomain: network-security\ntags:\n- zeek\n- network-monitoring\n- traffic-analysis\n- ids\n- nids\n- pcap\n- threat-detection\n- forensics\n- siem-integration\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-03\n- PR.DS-02\nmitre_attack:\n- T1046\n- T1040\n- T1557\n- T1071\n- T1685.002\n---\n\n# Performing Network Traffic Analysis with Zeek\n\n## Overview\n\nZeek (formerly Bro) is an open-source network analysis framework that operates as a passive network security monitor. Unlike traditional signature-based IDS tools, Zeek generates high-fidelity structured logs from observed network traffic, capturing detailed metadata for protocols including HTTP, DNS, TLS, SSH, SMTP, FTP, and dozens more. Zeek's extensible scripting language enables custom detection logic, behavioral analysis, and automated response. This skill covers deploying Zeek, understanding its log architecture, writing custom detection scripts, and integrating outputs with SIEM platforms.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing network traffic analysis with zeek\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Linux server (Ubuntu 22.04+ or CentOS 8+) with 4+ CPU cores and 8GB+ RAM\n- Network TAP or SPAN port mirroring configured for traffic capture\n- Zeek 6.0+ installed (via package manager or source compilation)\n- Root or capture group privileges for packet capture\n- SIEM platform (Splunk, ELK Stack, or QRadar) for log ingestion\n\n## Core Concepts\n\n### Zeek Architecture\n\nZeek operates in two main modes:\n\n1. **Live Capture** - Monitors traffic in real-time on one or more network interfaces\n2. **Offline Analysis** - Processes saved PCAP files for retrospective analysis\n\nThe processing pipeline consists of:\n\n- **Packet Capture Layer** - Reads raw packets from interfaces or PCAP files\n- **Event Engine** - Reassembles TCP streams and generates protocol events\n- **Script Interpreter** - Executes Zeek scripts that process events and generate logs\n- **Log Framework** - Writes structured logs in TSV, JSON, or custom formats\n\n### Log Architecture\n\nZeek generates protocol-specific log files:\n\n| Log File | Description |\n|----------|-------------|\n| `conn.log` | TCP\u002FUDP\u002FICMP connection summaries with duration, bytes, state |\n| `dns.log` | DNS queries and responses with query type, answers, TTL |\n| `http.log` | HTTP requests\u002Fresponses with URIs, user agents, MIME types |\n| `ssl.log` | TLS handshake details including certificate chain, JA3\u002FJA3S |\n| `files.log` | File transfers with MIME types, hashes (MD5, SHA1, SHA256) |\n| `notice.log` | Alerts generated by Zeek detection scripts |\n| `weird.log` | Protocol anomalies and unexpected behaviors |\n| `x509.log` | Certificate details from TLS connections |\n| `smtp.log` | Email metadata including sender, recipient, subject |\n| `ssh.log` | SSH connection details and authentication results |\n| `pe.log` | Portable Executable file metadata |\n| `dpd.log` | Dynamic Protocol Detection failures |\n\n## Workflow\n\n### Step 1: Install and Configure Zeek\n\n```bash\n# Install Zeek on Ubuntu\nsudo apt-get install -y zeek\n\n# Or install from Zeek repository\necho 'deb http:\u002F\u002Fdownload.opensuse.org\u002Frepositories\u002Fsecurity:\u002Fzeek\u002FxUbuntu_22.04\u002F \u002F' | \\\n    sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fzeek.list\nsudo apt-get update && sudo apt-get install -y zeek-lts\n\n# Verify installation\nzeek --version\n```\n\nConfigure the node layout in `\u002Fopt\u002Fzeek\u002Fetc\u002Fnode.cfg`:\n\n```ini\n[manager]\ntype=manager\nhost=localhost\n\n[proxy-1]\ntype=proxy\nhost=localhost\n\n[worker-1]\ntype=worker\nhost=localhost\ninterface=eth0\nlb_method=pf_ring\nlb_procs=4\n\n[worker-2]\ntype=worker\nhost=localhost\ninterface=eth1\nlb_method=pf_ring\nlb_procs=4\n```\n\nConfigure network definitions in `\u002Fopt\u002Fzeek\u002Fetc\u002Fnetworks.cfg`:\n\n```\n# Internal network ranges\n10.0.0.0\u002F8         Private RFC1918\n172.16.0.0\u002F12      Private RFC1918\n192.168.0.0\u002F16     Private RFC1918\n```\n\n### Step 2: Configure Logging and Output\n\nEdit `\u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Flocal.zeek`:\n\n```zeek\n# Load standard detection scripts\n@load base\u002Fprotocols\u002Fconn\n@load base\u002Fprotocols\u002Fdns\n@load base\u002Fprotocols\u002Fhttp\n@load base\u002Fprotocols\u002Fssl\n@load base\u002Fprotocols\u002Fssh\n@load base\u002Fprotocols\u002Fsmtp\n@load base\u002Fprotocols\u002Fftp\n\n# Load file analysis\n@load base\u002Ffiles\u002Fhash-all-files\n@load base\u002Ffiles\u002Fextract-all-files\n\n# Load detection frameworks\n@load base\u002Fframeworks\u002Fnotice\n@load base\u002Fframeworks\u002Fintel\n@load base\u002Fframeworks\u002Ffiles\n@load base\u002Fframeworks\u002Fsoftware\n\n# Load additional protocol analyzers\n@load policy\u002Fprotocols\u002Fssl\u002Fvalidate-certs\n@load policy\u002Fprotocols\u002Fssl\u002Flog-hostcerts-only\n@load policy\u002Fprotocols\u002Fssh\u002Fdetect-bruteforcing\n@load policy\u002Fprotocols\u002Fdns\u002Fdetect-external-names\n@load policy\u002Fprotocols\u002Fhttp\u002Fdetect-sqli\n\n# Enable JA3 fingerprinting\n@load policy\u002Fprotocols\u002Fssl\u002Fja3\n\n# Enable JSON output for SIEM ingestion\n@load policy\u002Ftuning\u002Fjson-logs\n\nredef LogAscii::use_json = T;\n\n# Configure file extraction directory\nredef FileExtract::prefix = \"\u002Fopt\u002Fzeek\u002Fextracted\u002F\";\n\n# Set notice email\nredef Notice::mail_dest = \"soc@example.com\";\n```\n\n### Step 3: Write Custom Detection Scripts\n\nCreate detection scripts for common threats:\n\n**Detect DNS Tunneling** (`\u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Fdetect-dns-tunnel.zeek`):\n\n```zeek\n@load base\u002Fprotocols\u002Fdns\n\nmodule DNSTunnel;\n\nexport {\n    redef enum Notice::Type += {\n        DNS_Tunnel_Suspected\n    };\n\n    # Threshold for suspicious DNS query length\n    const query_len_threshold = 50 &redef;\n\n    # Track query counts per host per domain\n    global dns_query_counts: table[addr, string] of count &default=0 &create_expire=5min;\n\n    # High query volume threshold\n    const query_volume_threshold = 100 &redef;\n}\n\nevent dns_request(c: connection, msg: dns_msg, query: string, qtype: count, qclass: count)\n{\n    if ( |query| > query_len_threshold )\n    {\n        local parts = split_string(query, \u002F\\.\u002F);\n        if ( |parts| > 3 )\n        {\n            local base_domain = cat(parts[|parts|-2], \".\", parts[|parts|-1]);\n            dns_query_counts[c$id$orig_h, base_domain] += 1;\n\n            if ( dns_query_counts[c$id$orig_h, base_domain] > query_volume_threshold )\n            {\n                NOTICE([$note=DNS_Tunnel_Suspected,\n                        $msg=fmt(\"Possible DNS tunneling: %s queries to %s with long query names\",\n                                 c$id$orig_h, base_domain),\n                        $conn=c,\n                        $identifier=cat(c$id$orig_h, base_domain),\n                        $suppress_for=30min]);\n            }\n        }\n    }\n}\n```\n\n**Detect Beaconing Behavior** (`\u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Fdetect-beaconing.zeek`):\n\n```zeek\n@load base\u002Fprotocols\u002Fconn\n\nmodule Beaconing;\n\nexport {\n    redef enum Notice::Type += {\n        C2_Beacon_Detected\n    };\n\n    # Track connection intervals\n    global conn_intervals: table[addr, addr, port] of vector of time &create_expire=1hr;\n\n    const min_connections = 20 &redef;\n    const jitter_threshold = 0.15 &redef;\n}\n\nevent connection_state_remove(c: connection)\n{\n    if ( c$id$resp_p == 80\u002Ftcp || c$id$resp_p == 443\u002Ftcp )\n    {\n        local key = [c$id$orig_h, c$id$resp_h, c$id$resp_p];\n\n        if ( key !in conn_intervals )\n            conn_intervals[key] = vector();\n\n        conn_intervals[key] += network_time();\n\n        if ( |conn_intervals[key]| >= min_connections )\n        {\n            local intervals: vector of interval = vector();\n            local i = 1;\n            while ( i \u003C |conn_intervals[key]| )\n            {\n                intervals += conn_intervals[key][i] - conn_intervals[key][i-1];\n                i += 1;\n            }\n\n            # Calculate mean and standard deviation\n            local sum_val = 0.0;\n            for ( idx in intervals )\n                sum_val += interval_to_double(intervals[idx]);\n\n            local mean_val = sum_val \u002F |intervals|;\n\n            local variance = 0.0;\n            for ( idx in intervals )\n            {\n                local diff = interval_to_double(intervals[idx]) - mean_val;\n                variance += diff * diff;\n            }\n            variance = variance \u002F |intervals|;\n            local stddev = sqrt(variance);\n\n            if ( mean_val > 0 && (stddev \u002F mean_val) \u003C jitter_threshold )\n            {\n                NOTICE([$note=C2_Beacon_Detected,\n                        $msg=fmt(\"Possible C2 beaconing: %s -> %s:%s (interval=%.1fs, jitter=%.2f)\",\n                                 c$id$orig_h, c$id$resp_h, c$id$resp_p,\n                                 mean_val, stddev\u002Fmean_val),\n                        $conn=c,\n                        $identifier=cat(c$id$orig_h, c$id$resp_h),\n                        $suppress_for=1hr]);\n            }\n        }\n    }\n}\n```\n\n### Step 4: Configure Intel Framework\n\nLoad threat intelligence feeds into Zeek:\n\n```zeek\n# In local.zeek\n@load frameworks\u002Fintel\u002Fseen\n@load frameworks\u002Fintel\u002Fdo_notice\n\nredef Intel::read_files += {\n    \"\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-ips.intel\",\n    \"\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-domains.intel\",\n    \"\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-hashes.intel\",\n};\n```\n\nIntel file format (`\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-ips.intel`):\n\n```\n#fields\tindicator\tindicator_type\tmeta.source\tmeta.desc\tmeta.do_notice\n198.51.100.50\tIntel::ADDR\tabuse.ch\tKnown C2 server\tT\n203.0.113.100\tIntel::ADDR\tthreatfeed\tRansomware infrastructure\tT\n```\n\n### Step 5: Deploy and Operate\n\n```bash\n# Deploy Zeek cluster\nsudo \u002Fopt\u002Fzeek\u002Fbin\u002Fzeekctl deploy\n\n# Check cluster status\nsudo \u002Fopt\u002Fzeek\u002Fbin\u002Fzeekctl status\n\n# Process offline PCAP\nzeek -r capture.pcap local.zeek\n\n# View logs\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fconn.log | zeek-cut id.orig_h id.resp_h id.resp_p proto service duration orig_bytes resp_bytes\n\n# Search for specific connections\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fdns.log | zeek-cut query answers | grep -i \"suspicious\"\n\n# Rotate logs\nsudo \u002Fopt\u002Fzeek\u002Fbin\u002Fzeekctl cron\n```\n\n### Step 6: SIEM Integration\n\n**Filebeat configuration for ELK Stack:**\n\n```yaml\nfilebeat.inputs:\n  - type: log\n    enabled: true\n    paths:\n      - \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002F*.log\n    json.keys_under_root: true\n    json.add_error_key: true\n    fields:\n      source: zeek\n    fields_under_root: true\n\noutput.elasticsearch:\n  hosts: [\"https:\u002F\u002Felasticsearch:9200\"]\n  index: \"zeek-%{+yyyy.MM.dd}\"\n\nsetup.template.name: \"zeek\"\nsetup.template.pattern: \"zeek-*\"\n```\n\n## Analysis Techniques\n\n### Connection Analysis\n\n```bash\n# Find top talkers by bytes\ncat conn.log | zeek-cut id.orig_h orig_bytes | sort -t$'\\t' -k2 -rn | head -20\n\n# Find long-duration connections (potential C2)\ncat conn.log | zeek-cut id.orig_h id.resp_h id.resp_p duration | awk '$4 > 3600' | sort -t$'\\t' -k4 -rn\n\n# Find connections with unusual ports\ncat conn.log | zeek-cut id.resp_p proto | sort | uniq -c | sort -rn | head -30\n```\n\n### TLS Analysis\n\n```bash\n# Find self-signed certificates\ncat ssl.log | zeek-cut server_name validation_status | grep \"self signed\"\n\n# Extract JA3 fingerprints for known malware\ncat ssl.log | zeek-cut ja3 server_name | sort | uniq -c | sort -rn\n\n# Find expired certificates\ncat ssl.log | zeek-cut server_name not_valid_after | awk -F'\\t' '$2 \u003C systime()'\n```\n\n## Best Practices\n\n- **TAP Over SPAN** - Use network TAPs instead of SPAN ports to avoid packet loss under load\n- **Worker Scaling** - Assign 1 Zeek worker per 1 Gbps of monitored traffic\n- **AF_PACKET Clusters** - Use AF_PACKET with load balancing for multi-core processing\n- **Log Rotation** - Configure automatic log rotation and archival (default: hourly)\n- **Intel Updates** - Automate threat intelligence feed updates at least daily\n- **Packet Loss Monitoring** - Monitor `capture_loss.log` for dropped packets\n- **Custom Scripts** - Develop organization-specific detections based on threat landscape\n\n## References\n\n- [Zeek Documentation](https:\u002F\u002Fdocs.zeek.org\u002Fen\u002Fmaster\u002F)\n- [Zeek Scripting Reference](https:\u002F\u002Fdocs.zeek.org\u002Fen\u002Fmaster\u002Fscript-reference\u002Findex.html)\n- [Zeek Intel Framework](https:\u002F\u002Fdocs.zeek.org\u002Fen\u002Fmaster\u002Fframeworks\u002Fintel.html)\n- [CISA Zeek Resources](https:\u002F\u002Fwww.cisa.gov\u002Fresources-tools\u002Fservices\u002Fkismet)\n- [Zeek GitHub Repository](https:\u002F\u002Fgithub.com\u002Fzeek\u002Fzeek)\n","# Performing Network Traffic Analysis with Zeek\n\n## Overview\n\nZeek (formerly Bro) is an open-source network analysis framework that operates as a passive network security monitor. Unlike traditional signature-based IDS tools, Zeek generates high-fidelity structured logs from observed network traffic, capturing detailed metadata for protocols including HTTP, DNS, TLS, SSH, SMTP, FTP, and dozens more. Zeek's extensible scripting language enables custom detection logic, behavioral analysis, and automated response. This skill covers deploying Zeek, understanding its log architecture, writing custom detection scripts, and integrating outputs with SIEM platforms.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing network traffic analysis with zeek\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Linux server (Ubuntu 22.04+ or CentOS 8+) with 4+ CPU cores and 8GB+ RAM\n- Network TAP or SPAN port mirroring configured for traffic capture\n- Zeek 6.0+ installed (via package manager or source compilation)\n- Root or capture group privileges for packet capture\n- SIEM platform (Splunk, ELK Stack, or QRadar) for log ingestion\n\n## Core Concepts\n\n### Zeek Architecture\n\nZeek operates in two main modes:\n\n1. **Live Capture** - Monitors traffic in real-time on one or more network interfaces\n2. **Offline Analysis** - Processes saved PCAP files for retrospective analysis\n\nThe processing pipeline consists of:\n\n- **Packet Capture Layer** - Reads raw packets from interfaces or PCAP files\n- **Event Engine** - Reassembles TCP streams and generates protocol events\n- **Script Interpreter** - Executes Zeek scripts that process events and generate logs\n- **Log Framework** - Writes structured logs in TSV, JSON, or custom formats\n\n### Log Architecture\n\nZeek generates protocol-specific log files:\n\n| Log File | Description |\n|----------|-------------|\n| `conn.log` | TCP\u002FUDP\u002FICMP connection summaries with duration, bytes, state |\n| `dns.log` | DNS queries and responses with query type, answers, TTL |\n| `http.log` | HTTP requests\u002Fresponses with URIs, user agents, MIME types |\n| `ssl.log` | TLS handshake details including certificate chain, JA3\u002FJA3S |\n| `files.log` | File transfers with MIME types, hashes (MD5, SHA1, SHA256) |\n| `notice.log` | Alerts generated by Zeek detection scripts |\n| `weird.log` | Protocol anomalies and unexpected behaviors |\n| `x509.log` | Certificate details from TLS connections |\n| `smtp.log` | Email metadata including sender, recipient, subject |\n| `ssh.log` | SSH connection details and authentication results |\n| `pe.log` | Portable Executable file metadata |\n| `dpd.log` | Dynamic Protocol Detection failures |\n\n## Workflow\n\n### Step 1: Install and Configure Zeek\n\n```bash\n# Install Zeek on Ubuntu\nsudo apt-get install -y zeek\n\n# Or install from Zeek repository\necho 'deb http:\u002F\u002Fdownload.opensuse.org\u002Frepositories\u002Fsecurity:\u002Fzeek\u002FxUbuntu_22.04\u002F \u002F' | \\\n    sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fzeek.list\nsudo apt-get update && sudo apt-get install -y zeek-lts\n\n# Verify installation\nzeek --version\n```\n\nConfigure the node layout in `\u002Fopt\u002Fzeek\u002Fetc\u002Fnode.cfg`:\n\n```ini\n[manager]\ntype=manager\nhost=localhost\n\n[proxy-1]\ntype=proxy\nhost=localhost\n\n[worker-1]\ntype=worker\nhost=localhost\ninterface=eth0\nlb_method=pf_ring\nlb_procs=4\n\n[worker-2]\ntype=worker\nhost=localhost\ninterface=eth1\nlb_method=pf_ring\nlb_procs=4\n```\n\nConfigure network definitions in `\u002Fopt\u002Fzeek\u002Fetc\u002Fnetworks.cfg`:\n\n```\n# Internal network ranges\n10.0.0.0\u002F8         Private RFC1918\n172.16.0.0\u002F12      Private RFC1918\n192.168.0.0\u002F16     Private RFC1918\n```\n\n### Step 2: Configure Logging and Output\n\nEdit `\u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Flocal.zeek`:\n\n```zeek\n# Load standard detection scripts\n@load base\u002Fprotocols\u002Fconn\n@load base\u002Fprotocols\u002Fdns\n@load base\u002Fprotocols\u002Fhttp\n@load base\u002Fprotocols\u002Fssl\n@load base\u002Fprotocols\u002Fssh\n@load base\u002Fprotocols\u002Fsmtp\n@load base\u002Fprotocols\u002Fftp\n\n# Load file analysis\n@load base\u002Ffiles\u002Fhash-all-files\n@load base\u002Ffiles\u002Fextract-all-files\n\n# Load detection frameworks\n@load base\u002Fframeworks\u002Fnotice\n@load base\u002Fframeworks\u002Fintel\n@load base\u002Fframeworks\u002Ffiles\n@load base\u002Fframeworks\u002Fsoftware\n\n# Load additional protocol analyzers\n@load policy\u002Fprotocols\u002Fssl\u002Fvalidate-certs\n@load policy\u002Fprotocols\u002Fssl\u002Flog-hostcerts-only\n@load policy\u002Fprotocols\u002Fssh\u002Fdetect-bruteforcing\n@load policy\u002Fprotocols\u002Fdns\u002Fdetect-external-names\n@load policy\u002Fprotocols\u002Fhttp\u002Fdetect-sqli\n\n# Enable JA3 fingerprinting\n@load policy\u002Fprotocols\u002Fssl\u002Fja3\n\n# Enable JSON output for SIEM ingestion\n@load policy\u002Ftuning\u002Fjson-logs\n\nredef LogAscii::use_json = T;\n\n# Configure file extraction directory\nredef FileExtract::prefix = \"\u002Fopt\u002Fzeek\u002Fextracted\u002F\";\n\n# Set notice email\nredef Notice::mail_dest = \"soc@example.com\";\n```\n\n### Step 3: Write Custom Detection Scripts\n\nCreate detection scripts for common threats:\n\n**Detect DNS Tunneling** (`\u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Fdetect-dns-tunnel.zeek`):\n\n```zeek\n@load base\u002Fprotocols\u002Fdns\n\nmodule DNSTunnel;\n\nexport {\n    redef enum Notice::Type += {\n        DNS_Tunnel_Suspected\n    };\n\n    # Threshold for suspicious DNS query length\n    const query_len_threshold = 50 &redef;\n\n    # Track query counts per host per domain\n    global dns_query_counts: table[addr, string] of count &default=0 &create_expire=5min;\n\n    # High query volume threshold\n    const query_volume_threshold = 100 &redef;\n}\n\nevent dns_request(c: connection, msg: dns_msg, query: string, qtype: count, qclass: count)\n{\n    if ( |query| > query_len_threshold )\n    {\n        local parts = split_string(query, \u002F\\.\u002F);\n        if ( |parts| > 3 )\n        {\n            local base_domain = cat(parts[|parts|-2], \".\", parts[|parts|-1]);\n            dns_query_counts[c$id$orig_h, base_domain] += 1;\n\n            if ( dns_query_counts[c$id$orig_h, base_domain] > query_volume_threshold )\n            {\n                NOTICE([$note=DNS_Tunnel_Suspected,\n                        $msg=fmt(\"Possible DNS tunneling: %s queries to %s with long query names\",\n                                 c$id$orig_h, base_domain),\n                        $conn=c,\n                        $identifier=cat(c$id$orig_h, base_domain),\n                        $suppress_for=30min]);\n            }\n        }\n    }\n}\n```\n\n**Detect Beaconing Behavior** (`\u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Fdetect-beaconing.zeek`):\n\n```zeek\n@load base\u002Fprotocols\u002Fconn\n\nmodule Beaconing;\n\nexport {\n    redef enum Notice::Type += {\n        C2_Beacon_Detected\n    };\n\n    # Track connection intervals\n    global conn_intervals: table[addr, addr, port] of vector of time &create_expire=1hr;\n\n    const min_connections = 20 &redef;\n    const jitter_threshold = 0.15 &redef;\n}\n\nevent connection_state_remove(c: connection)\n{\n    if ( c$id$resp_p == 80\u002Ftcp || c$id$resp_p == 443\u002Ftcp )\n    {\n        local key = [c$id$orig_h, c$id$resp_h, c$id$resp_p];\n\n        if ( key !in conn_intervals )\n            conn_intervals[key] = vector();\n\n        conn_intervals[key] += network_time();\n\n        if ( |conn_intervals[key]| >= min_connections )\n        {\n            local intervals: vector of interval = vector();\n            local i = 1;\n            while ( i \u003C |conn_intervals[key]| )\n            {\n                intervals += conn_intervals[key][i] - conn_intervals[key][i-1];\n                i += 1;\n            }\n\n            # Calculate mean and standard deviation\n            local sum_val = 0.0;\n            for ( idx in intervals )\n                sum_val += interval_to_double(intervals[idx]);\n\n            local mean_val = sum_val \u002F |intervals|;\n\n            local variance = 0.0;\n            for ( idx in intervals )\n            {\n                local diff = interval_to_double(intervals[idx]) - mean_val;\n                variance += diff * diff;\n            }\n            variance = variance \u002F |intervals|;\n            local stddev = sqrt(variance);\n\n            if ( mean_val > 0 && (stddev \u002F mean_val) \u003C jitter_threshold )\n            {\n                NOTICE([$note=C2_Beacon_Detected,\n                        $msg=fmt(\"Possible C2 beaconing: %s -> %s:%s (interval=%.1fs, jitter=%.2f)\",\n                                 c$id$orig_h, c$id$resp_h, c$id$resp_p,\n                                 mean_val, stddev\u002Fmean_val),\n                        $conn=c,\n                        $identifier=cat(c$id$orig_h, c$id$resp_h),\n                        $suppress_for=1hr]);\n            }\n        }\n    }\n}\n```\n\n### Step 4: Configure Intel Framework\n\nLoad threat intelligence feeds into Zeek:\n\n```zeek\n# In local.zeek\n@load frameworks\u002Fintel\u002Fseen\n@load frameworks\u002Fintel\u002Fdo_notice\n\nredef Intel::read_files += {\n    \"\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-ips.intel\",\n    \"\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-domains.intel\",\n    \"\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-hashes.intel\",\n};\n```\n\nIntel file format (`\u002Fopt\u002Fzeek\u002Fintel\u002Fmalicious-ips.intel`):\n\n```\n#fields\tindicator\tindicator_type\tmeta.source\tmeta.desc\tmeta.do_notice\n198.51.100.50\tIntel::ADDR\tabuse.ch\tKnown C2 server\tT\n203.0.113.100\tIntel::ADDR\tthreatfeed\tRansomware infrastructure\tT\n```\n\n### Step 5: Deploy and Operate\n\n```bash\n# Deploy Zeek cluster\nsudo \u002Fopt\u002Fzeek\u002Fbin\u002Fzeekctl deploy\n\n# Check cluster status\nsudo \u002Fopt\u002Fzeek\u002Fbin\u002Fzeekctl status\n\n# Process offline PCAP\nzeek -r capture.pcap local.zeek\n\n# View logs\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fconn.log | zeek-cut id.orig_h id.resp_h id.resp_p proto service duration orig_bytes resp_bytes\n\n# Search for specific connections\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fdns.log | zeek-cut query answers | grep -i \"suspicious\"\n\n# Rotate logs\nsudo \u002Fopt\u002Fzeek\u002Fbin\u002Fzeekctl cron\n```\n\n### Step 6: SIEM Integration\n\n**Filebeat configuration for ELK Stack:**\n\n```yaml\nfilebeat.inputs:\n  - type: log\n    enabled: true\n    paths:\n      - \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002F*.log\n    json.keys_under_root: true\n    json.add_error_key: true\n    fields:\n      source: zeek\n    fields_under_root: true\n\noutput.elasticsearch:\n  hosts: [\"https:\u002F\u002Felasticsearch:9200\"]\n  index: \"zeek-%{+yyyy.MM.dd}\"\n\nsetup.template.name: \"zeek\"\nsetup.template.pattern: \"zeek-*\"\n```\n\n## Analysis Techniques\n\n### Connection Analysis\n\n```bash\n# Find top talkers by bytes\ncat conn.log | zeek-cut id.orig_h orig_bytes | sort -t$'\\t' -k2 -rn | head -20\n\n# Find long-duration connections (potential C2)\ncat conn.log | zeek-cut id.orig_h id.resp_h id.resp_p duration | awk '$4 > 3600' | sort -t$'\\t' -k4 -rn\n\n# Find connections with unusual ports\ncat conn.log | zeek-cut id.resp_p proto | sort | uniq -c | sort -rn | head -30\n```\n\n### TLS Analysis\n\n```bash\n# Find self-signed certificates\ncat ssl.log | zeek-cut server_name validation_status | grep \"self signed\"\n\n# Extract JA3 fingerprints for known malware\ncat ssl.log | zeek-cut ja3 server_name | sort | uniq -c | sort -rn\n\n# Find expired certificates\ncat ssl.log | zeek-cut server_name not_valid_after | awk -F'\\t' '$2 \u003C systime()'\n```\n\n## Best Practices\n\n- **TAP Over SPAN** - Use network TAPs instead of SPAN ports to avoid packet loss under load\n- **Worker Scaling** - Assign 1 Zeek worker per 1 Gbps of monitored traffic\n- **AF_PACKET Clusters** - Use AF_PACKET with load balancing for multi-core processing\n- **Log Rotation** - Configure automatic log rotation and archival (default: hourly)\n- **Intel Updates** - Automate threat intelligence feed updates at least daily\n- **Packet Loss Monitoring** - Monitor `capture_loss.log` for dropped packets\n- **Custom Scripts** - Develop organization-specific detections based on threat landscape\n\n## References\n\n- [Zeek Documentation](https:\u002F\u002Fdocs.zeek.org\u002Fen\u002Fmaster\u002F)\n- [Zeek Scripting Reference](https:\u002F\u002Fdocs.zeek.org\u002Fen\u002Fmaster\u002Fscript-reference\u002Findex.html)\n- [Zeek Intel Framework](https:\u002F\u002Fdocs.zeek.org\u002Fen\u002Fmaster\u002Fframeworks\u002Fintel.html)\n- [CISA Zeek Resources](https:\u002F\u002Fwww.cisa.gov\u002Fresources-tools\u002Fservices\u002Fkismet)\n- [Zeek GitHub Repository](https:\u002F\u002Fgithub.com\u002Fzeek\u002Fzeek)\n",{"name":5,"tags":24,"author":34,"domain":35,"license":14,"version":36,"nist_csf":37,"subdomain":42,"description":7,"mitre_attack":43},[25,26,27,28,29,30,31,32,33],"zeek","network-monitoring","traffic-analysis","ids","nids","pcap","threat-detection","forensics","siem-integration","mahipal","cybersecurity","1.0",[38,39,40,41],"PR.IR-01","DE.CM-01","ID.AM-03","PR.DS-02","network-security",[44,45,46,47,48],"T1046","T1040","T1557","T1071","T1685.002","main","1eb986d0b0ecc180291597e08eb5a58288843536","skills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-network-traffic-analysis-with-zeek","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv","2026-08-25 13:16:33",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add vikasvardhanv\u002Fjerry_skills --skill performing-network-traffic-analysis-with-zeek",{"tool":61,"command":62},"bunx","bunx skills add vikasvardhanv\u002Fjerry_skills --skill performing-network-traffic-analysis-with-zeek",{"tool":64,"command":65},"pnpm","pnpm dlx skills add vikasvardhanv\u002Fjerry_skills --skill performing-network-traffic-analysis-with-zeek","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-network-traffic-analysis-with-zeek\u002FSKILL.md",true,[69,73,79],{"path":70,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":15},"LICENSE","许可证",11255,{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fapi-reference.md","REFERENCE","参考文档",1752,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-network-traffic-analysis-with-zeek\u002Freferences\u002Fapi-reference.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fagent.py","SCRIPT","脚本",6839,"https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fcurated_premium_skills\u002FAnthropic-Cybersecurity-Skills\u002Fskills\u002Fperforming-network-traffic-analysis-with-zeek\u002Fscripts\u002Fagent.py",[86,94,101,108,115,122],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7BESR1CJ3H5SP9XM8KYJZ9W","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","MIT","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7BES1YA6R97W7QPMFFM1PED","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7BERNHYGY035AR00VRT03KE","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7BERCK1EAKTWW7R436WAR0J","notebooklm","Browser automation skill for controlling Google's NotebookLM. Use when the user wants anything done in NotebookLM (e.g., 'open NotebookLM', 'check my [name] notebook', 'ask my notebook about X', 'add [source] to NotebookLM', 'generate a Video Overview from my notebook', 'use NotebookLM Studio'). Handles reading and querying notebooks, adding sources (URLs, text, files, YouTube links, synthesized content), generating Studio outputs (Audio\u002FVideo Overviews, Mind Maps, Reports incl. Briefing Doc\u002FStudy Guide\u002FFAQ, Flashcards, Quiz, slide decks, infographics — discover the exact set from the live Studio panel; the UI evolves fast), and creating new notebooks. Requires browser automation environment — fails gracefully when unavailable.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fnotebooklm\u002Fskills\u002Fnotebooklm\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7BEQZAZAQRTXFJRY7RHV3TY","litreview","Academic literature orientation skill that searches papers via free keyless APIs (PubMed E-utilities + OpenAlex) by default — with the Consensus MCP as an optional enhancement lane when connected — builds a strategic search plan using PICO (default) or SPIDER \u002F Decomposition \u002F hybrid as fallbacks, and synthesizes findings into a formatted Word (.docx) research guide. Grill-me intake (research question specificity + framework hint + tentative depth) before the recon search; a second forcing checkpoint after Phase 2 confirms framework + sub-areas + depth before searches consume budget. Configurable depth (5\u002F10\u002F20 queries) controls coverage vs. speed. Output is a 'launching pad' — an orientation guide that lets a researcher dive in confidently, not a finished review. Use when the user starts literature-oriented research (e.g., 'litreview on [topic]', 'literature review on [topic]', 'I'm starting a literature review on X', 'I'm writing a paper on X', 'help me research X', 'I'm doing research on X', 'can you help me research X'). Do NOT use for single one-off paper searches wanting a quick list — that's a plain PubMed\u002FOpenAlex (or Consensus) query.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Flitreview\u002Fskills\u002Flitreview\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M7BEQKJ45K31QK5VRAQSVJCJ","grants","NIH grant research skill for clinical researchers. Grill-me intake (research idea + career stage + preliminary data + environment + submission posture + known institute targets) locks down the funding strategy before any search runs. Runs a 5-facet Consensus positioning analysis (with draft Significance\u002FInnovation language), maps the research to the right NIH institutes and study sections via RePORTER, finds NOSIs and funded overlap, and produces an editable Word document (.docx) with budget\u002Fscope-aware mechanism recommendations, submission timelines, and a mandatory program officer recommendation. Use when the user asks about research funding or makes any grant-related request (e.g., 'grants for [topic]', 'find grants for my research idea', 'what grants match my research', 'help me find NIH funding', 'grant opportunities for my research'). NIH-only scope — non-NIH funders (PCORI, DOD CDMRP, VA, foundations) are out of scope and flagged at intake.","https:\u002F\u002Fgithub.com\u002Fvikasvardhanv\u002Fjerry_skills\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrants\u002Fskills\u002Fgrants\u002FSKILL.md",[],[]]