detecting-network-anomalies-with-zeek
यह क्या करती है
यह टूल आपके कंप्यूटर के नेटवर्क ट्रैफिक पर नज़र रखता है और संदिग्ध या असामान्य गतिविधि ढूँढता है। यह कनेक्शन, इंटरनेट एक्सेस और फ़ाइल ट्रांसफ़र की विस्तृत रिपोर्ट बनाता है, जिससे खतरों की पहचान करने में मदद मिलती है।
कब इस्तेमाल करें
- ✓रियल-टाइम में नेटवर्क सुरक्षा पर नज़र रखने के लिए।
- ✓पिछली सुरक्षा घटनाओं की जाँच करने के लिए।
- ✓किसी खास खतरे को पकड़ने के लिए अपने नियम बनाने के लिए।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-network-anomalies-with-zeek/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“Zeek सेट करो ताकि वह नेटवर्क पर नज़र रखे और कोई संदिग्ध कनेक्शन दिखे तो मुझे अलर्ट करे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
Zeek को नेटवर्क के किसी रणनीतिक बिंदु पर इंस्टॉल किया जाता है और वह सारे ट्रैफिक का निष्क्रिय रूप से विश्लेषण करता है। यह विस्तृत लॉग बनाता है, जिनसे असामान्यताओं और खतरों की पहचान की जा सकती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Detecting Network Anomalies with Zeek
When to Use
- Deploying passive network security monitoring at key network choke points for continuous visibility
- Generating structured connection, DNS, HTTP, SSL, and file transfer logs for SIEM ingestion and threat hunting
- Writing custom Zeek scripts to detect organization-specific threats, policy violations, or beaconing behavior
- Performing retrospective analysis on network metadata to investigate security incidents
- Complementing IDS solutions with protocol-level metadata analysis that signature-based tools may miss
Do not use as a replacement for inline IDS/IPS that can actively block traffic, for monitoring encrypted payloads without TLS inspection, or on endpoints where host-based agents are more appropriate.
Prerequisites
- Zeek 6.0+ installed from source or package manager (
zeek --version) - Network interface configured on a span port, network tap, or virtual switch mirror for passive capture
- Sufficient disk storage for log files (estimate 1-5 GB/day per 100 Mbps of monitored traffic)
- Familiarity with Zeek's scripting language for writing custom detections
- Log aggregation system (Splunk, Elastic, Graylog) for centralized analysis
Workflow
Step 1: Install and Configure Zeek
# Install Zeek on Ubuntu/Debian
sudo apt install -y zeek
# Or install from source for latest version
git clone --recursive https://github.com/zeek/zeek
cd zeek && ./configure --prefix=/opt/zeek && make -j$(nproc) && sudo make install
export PATH=/opt/zeek/bin:$PATH
# Configure the monitoring interface
sudo vi /opt/zeek/etc/node.cfg
# /opt/zeek/etc/node.cfg
[zeek]
type=standalone
host=localhost
interface=eth1
# Configure local network definitions
sudo vi /opt/zeek/etc/networks.cfg
# /opt/zeek/etc/networks.cfg
10.0.0.0/8 Internal
172.16.0.0/12 Internal
192.168.0.0/16 Internal
# Disable NIC offloading for accurate packet capture
sudo ethtool -K eth1 rx off tx off gro off lro off tso off gso off
# Deploy Zeek
sudo zeekctl deploy
# Verify Zeek is running
sudo zeekctl status
Step 2: Understand and Navigate Zeek Logs
# Zeek generates structured log files in /opt/zeek/logs/current/
ls /opt/zeek/logs/current/
# Key log files:
# conn.log - All network connections (TCP, UDP, ICMP)
# dns.log - DNS queries and responses
# http.log - HTTP requests and responses
# ssl.log - SSL/TLS handshake details
# files.log - File transfers observed on the network
# notice.log - Alerts from Zeek detection scripts
# weird.log - Protocol anomalies and errors
# x509.log - X.509 certificate details
# smtp.log - SMTP email transactions
# ssh.log - SSH connection details
# View connection log with zeek-cut for column selection
cat /opt/zeek/logs/current/conn.log | zeek-cut ts id.orig_h id.orig_p id.resp_h id.resp_p proto service duration orig_bytes resp_bytes
# View DNS log
cat /opt/zeek/logs/current/dns.log | zeek-cut ts id.orig_h query qtype_name answers
# View HTTP log
cat /opt/zeek/logs/current/http.log | zeek-cut ts id.orig_h host uri method status_code user_agent
Step 3: Write Custom Detection Scripts
# Create a custom detection script directory
sudo mkdir -p /opt/zeek/share/zeek/site/custom-detections
Create a script for detecting DNS tunneling:
# /opt/zeek/share/zeek/site/custom-detections/dns-tunneling.zeek
@load base/frameworks/notice
module DNSTunneling;
export {
redef enum Notice::Type += {
DNS_Tunneling_Detected,
DNS_Long_Query
};
# Threshold: number of unique queries per source in time window
const query_threshold: count = 200 &redef;
const time_window: interval = 5min &redef;
const max_query_length: count = 50 &redef;
}
# Track query counts per source IP
global dns_query_counts: table[addr] of count &create_expire=5min &default=0;
event dns_request(c: connection, msg: dns_msg, query: string, qtype: count, qclass: count)
{
local src = c$id$orig_h;
# Check for unusually long domain queries (base64-encoded data)
if ( |query| > max_query_length )
{
NOTICE([
$note=DNS_Long_Query,
$msg=fmt("Unusually long DNS query from %s: %s (%d chars)", src, query, |query|),
$src=src,
$identifier=cat(src, query)
]);
}
# Track query volume per source
dns_query_counts[src] += 1;
…
अक्सर पूछे जाने वाले सवाल
'network anomalies' क्या हैं?
ये ट्रैफिक के वे पैटर्न हैं जो सामान्य से हटकर होते हैं और दुर्भावनापूर्ण गतिविधि का संकेत हो सकते हैं, जैसे घुसपैठ की कोशिश या खतरनाक सर्वर से संपर्क।
क्या Zeek खतरनाक ट्रैफिक को ब्लॉक कर सकता है?
नहीं, Zeek सिर्फ़ देखता और रिपोर्ट करता है। वह ट्रैफिक को आगे जाने से सक्रिय रूप से नहीं रोकता। यह दूसरे सुरक्षा टूल्स के साथ मिलकर काम करने वाला टूल है।
क्या Zeek इस्तेमाल करने के लिए मुझे एक्सपर्ट होना चाहिए?
बुनियादी सेटअप और रिपोर्ट समझने के लिए नहीं। लेकिन अपने खुद के डिटेक्शन नियम बनाने के लिए Zeek की स्क्रिप्टिंग भाषा की जानकारी ज़रूरी है।
जानकारी
लेखक का मूल विवरण
Deploy and configure Zeek (formerly Bro) to passively analyze network traffic, generate structured connection/DNS/HTTP/SSL/file logs, detect anomalous behavior, and write custom scripts for organization-specific threats. Use for passive monitoring at network choke points, feeding SIEM/threat hunting with protocol metadata, or retrospective log analysis during incident response; not a substitute fo
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7853
- लाइसेंस
- 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
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।