Zeek
Table of Contents
A network security monitor that performs deep packet inspection to extract metadata and generate structured logs from network traffic. Useful for threat detection, incident response, and forensic analysis.
Related: API Testing Methodology Nmap
Description
Zeek (formerly Bro) captures and analyzes packets, generating high-fidelity logs in JSON or TSV format. Unlike IDS systems that look for signatures, Zeek focuses on what actually happened on the network — connections, protocols, DNS queries, SSL certificates, and more. It runs on network taps, span ports, or pcap files.
Common Workflow
# Analyse a pcap file zeek -r traffic.pcap # Run with specific scripts zeek -r traffic.pcap -C -q # Monitor live traffic on interface zeek -i eth0
Output files are generated in the current directory:
- `conn.log` — TCP/UDP connections
- `dns.log` — DNS requests and responses
- `ssl.log` — SSL/TLS certificates and handshakes
- `http.log` — HTTP requests
- `files.log` — File metadata
Common Flags
| Flag | Purpose |
|---|---|
| -r | Read pcap file |
| -i | Monitor live interface |
| -C | Ignore checksums (good for captures) |
| -q | Quiet mode |
| -w | Write to specific output file |
Tips
- Zeek is verbose by default — use `-q` for cleaner output when analyzing captured traffic in bulk
- JSON output is easier to parse programmatically: `zeek -r traffic.pcap json-logs`
- Chain with `jq` for quick analysis: `zeek -r traffic.pcap && cat dns.log | jq '.query'`
- Check `ssl.log` for certificate details and self-signed certificates — often indicates compromised traffic or C2 communication
- `conn.log` shows duration and byte counts — good for spotting data exfiltration