Zeek (formerly Bro) คืออะไร?
Zeek (เดิมชื่อ Bro) เป็น Open Source Network Traffic Analysis (NTA) Framework ที่พัฒนาตั้งแต่ปี 1995 ที่ Lawrence Berkeley National Laboratory ใช้สำหรับ Network Security Monitoring (NSM) ระดับ Enterprise
ไม่ใช่ IDS/IPS แบบดั้งเดิม (Signature-based) แต่เป็น Protocol Analyzer ที่แปลง Network Traffic เป็น Structured Logs (High-fidelity Transaction Logs)
🏆 ทำไม Zeek ถือว่าเป็น NSM Tool ที่ดีที่สุด? (Key Strengths)
| ความสามารถ | รายละเอียด |
|---|---|
| Deep Protocol Analysis | Parse 35+ Protocols (HTTP, DNS, SSL/TLS, SSH, SMB, Kerberos, NTP, DHCP, SQL, RDP, SMTP, IMAP, POP3, Modbus, DNP3, MQTT, เป็นต้น) 400+ Fields |
| Extensible Scripting Language | Zeek Script (Event-driven, Turing-complete) เขียน Detection Logic เองได้ ไม่ผูกติด Signature Vendor |
| High Performance | Multi-threaded (Zeek 5.0+), Cluster Mode (Manager/Logger/Workers/Proxies) รองรับ 100Gbps+ |
| Structured Logs (JSON/TSV) | Log เหมาะสำหรับ SIEM (Splunk, Elastic, Sentinel, Kafka) และ Threat Hunting (SQL-like Queries) |
| File Extraction & Analysis | Extract Files จาก HTTP, SMTP, SMB, FTP → Hash, YARA Scan, Send to Sandbox (CAPE, VirusTotal) |
| SSL/TLS Decryption | รองรับ Key Log Files, RSA Key Decryption, JA3 Fingerprinting |
| Integration Ecosystem | Security Onion, Corelight, Elastic Fleet, Splunk Connect, Kafka, MISP, OpenCTI, Grafana |
| Open Source & Free | BSD License, ไม่มี Vendor Lock-in, Community Active, Commercial Support (Corelight) |
🔍 Zeek vs Snort/Suricata (IDS/IPS) - ความแตกต่างสำคัญ
| ด้าน | Zeek (Bro) | Snort / Suricata |
|---|---|---|
| Paradigm | Policy-based / Protocol Analysis (NSM) | Rule-based / Signature Matching (IDS/IPS) |
| Primary Output | Structured Logs (conn.log, http.log, dns.log, ssl.log, files.log, ...) | Alerts (Unified2, Eve JSON) |
| Detection | Behavioral, Anomaly, Protocol Violations, Custom Scripts | Signature Matching (Rules), Some Anomaly |
| Traffic Handling | Passive (Tap/SPAN) - No Inline Blocking | Passive (IDS) หรือ Inline (IPS - Block) |
| Use Case | Visibility, Threat Hunting, Forensics, Long-term Analytics | Real-time Blocking, Compliance, Known Threats |
| Scripting | Zeek Script (Powerful, Complex) | Lua (Suricata) / Rule Syntax (Limited) |
💡 Best Practice: รัน ทั้งคู่ Zeek (Visibility/Logs) + Suricata (IDS/IPS Alerts) บน Sensor เดียวกัน (Security Onion ทำให้ง่าย)
📦 Security Onion: All-in-One NSM Platform
- Distro (Ubuntu-based) รวม: Zeek, Suricata, Wazuh (HIDS), Elastic Stack (SIEM), Kibana, Stenographer (Full PCAP), Arkime, FleetDM, SO-ELK
- Setup Wizard:
sudo soup→ Deploy Sensor/Server/Import Node ในไม่กี่นาที - เหมาะสำหรับ: Home Lab, SMB, Enterprise (Cluster Mode)
☁️ Zeek ใน Cloud และ Hybrid Environments
- Cloud Sensors: Zeek บน EC2/GCE/Azure VMs Mirror Traffic (VPC Traffic Mirroring, GCP Packet Mirroring, Azure Traffic Analytics)
- Corelight Sensors: Appliance/SaaS Managed Zeek (Enterprise Grade)
- Zeek + Cloud Logs: Correlate Network Logs (Zeek) กับ Cloud Logs (CloudTrail, VPC Flow Logs, Azure NSG Flow Logs)
💰 ค่าใช้จ่าย (Cost)
- Zeek Core: Free (Open Source)
- Hardware: Sensor Specs: 32-64GB RAM, 16-32 Cores, 2-10TB NVMe, 10G/25G/100G NICs (Intel X710/XL710, Mellanox)
- Commercial Support: Corelight (Appliance/SaaS), Sensors starting ~$20k-$50k+/yr
🛠️ เริ่มต้นใช้ Zeek (Quick Start)
# Ubuntu 22.04
sudo apt update && sudo apt install -y zeek
# Configure Interface (Monitor Mode / SPAN Port)
sudo zeekctl deploy
# Submit PCAP for Testing
zeek -r sample.pcap local
# Logs in /usr/local/zeek/logs/ (conn.log, http.log, dns.log, ssl.log, ...)
❓ คำถามที่พบบ่อย
❓ Zeek เป็น SIEM ไหม?
❌ ไม่ Zeek = Network Traffic Analyzer (Producer) สร้าง Logs SIEM = Consumer/Analyzer (Splunk, Elastic, Sentinel) รับ Logs จาก Zeek มา Correlate, Alert, Dashboard
❓ Bro เปลี่ยนชื่อ Zeek เมื่อไหร่ ทำไม?
2018: เปลี่ยนชื่อจาก "Bro" (Gendered Term) เป็น "Zeek" (Neutral) รุ่น 3.0+ ใช้ชื่อ Zeek
❓ Zeek ตรวจจับ Encrypted Traffic (TLS 1.3) ได้ไหม?
✅ ใช่ ผ่าน JA3/JA3S Fingerprinting (Client/Server Hello Analysis) + Key Log Files (หากมี Private Keys) + Encrypted SNI (ESNI/ECH) Analysis
❓ เรียน Zeek Scripting ยากไหม?
มี Learning Curve (Event-driven, Async) แต่เอกสารดี (Zeek Book, Docs, Examples) เริ่มจาก Customize Scripts มีอยู่แล้ว (local.zeek) แล้วค่อยเขียนเอง
สรุป: Zeek (Bro) เป็น Gold Standard ของ NSM เพราะ Deep Protocol Analysis, Extensible Scripting, Structured Logs, High Performance, Open Source ใช้คู่กับ Suricata (IDS/IPS) บน Security Onion ได้ผลดีที่สุด สำหรับ Enterprise ควรพิจารณา Corelight (Managed Zeek)