Brim
Table of Contents
Desktop application for exploring Zeek logs and PCAP files. Provides a GUI query interface over the Zed data language — faster for large datasets than raw log searching, and easier than reading PCAP directly in Wireshark. Useful when you have Zeek-processed network captures and want to query across connection logs, DNS, HTTP, and SSL logs simultaneously.
Now rebranded as Zui (Zed User Interface) though still widely referred to as Brim.
Related: Zeek Wireshark PCAP Network Traffic Analysis
Workflow
1. Open Brim / Zui 2. Load data source: — Drag and drop a .pcap file (Brim auto-runs Zeek on it) — Or load pre-existing Zeek logs directly 3. Select a pool (dataset) from the left panel 4. Query using the Zed language in the search bar 5. Click into events to expand detail and correlate
Zed Query Language
Brim uses Zed — a pipeline language similar to KQL or SPL.
# Filter by field value
_path == "conn"
_path == "dns"
_path == "http"
# Filter by time range
ts > 2025-01-01T00:00:00Z and ts < 2025-01-02T00:00:00Z
# Grep for a string across all logs
grep("malware.com")
# Aggregate — count connections per destination
_path == "conn" | count() by id.resp_h
# Top talkers by bytes
_path == "conn" | sum(orig_bytes) by id.orig_h | sort -r sum
# Find all DNS queries for a domain
_path == "dns" | grep("*.evil.com")
# HTTP requests with suspicious user agents
_path == "http" | user_agent == "python-requests/2.28"
# Filter by protocol
_path == "conn" | proto == "tcp" | id.resp_p == 4444
Key Zeek Log Types
| Log | Contents |
|---|---|
conn |
All TCP/UDP/ICMP connections — source, dest, bytes, duration |
dns |
DNS queries and responses |
http |
HTTP requests — method, host, URI, user agent, status |
ssl |
TLS handshakes — server name, cipher, cert fingerprint |
files |
File transfers detected in traffic |
weird |
Protocol anomalies Zeek flagged |
notice |
Zeek detection notices |
Security Investigation Queries
# Long-duration connections (beaconing)
_path == "conn" | duration > 1h | count() by id.resp_h | sort -r count
# Large outbound transfers (exfiltration)
_path == "conn" | orig_bytes > 10000000 | sort -r orig_bytes
# Connections to rare external IPs
_path == "conn" | not grep("192.168.*") | count() by id.resp_h | sort count
# DNS queries to unusual domains (DGA-like)
_path == "dns" | len(query) > 50
# HTTP to non-standard ports
_path == "http" | id.resp_p != 80 and id.resp_p != 8080
# Suspicious user agents
_path == "http" | grep("curl|python|wget|powershell")
Tips
- Brim auto-runs Zeek on dropped PCAP files — you get structured logs without needing a Zeek installation
- Use
connlogs first to get the big picture of traffic, then drill intodnsandhttpfor application-layer detail - The
weirdlog is worth checking early — it surfaces protocol anomalies that often indicate scanning or exploitation - For large captures, querying Zeek logs in Brim is significantly faster than loading the PCAP into Wireshark directly