In this module

NF1.4 The Zeek Log Directory Structure

10 hours · Module 1 · Free
What you already know

You've run Zeek against a PCAP and seen the log files it produces. You know conn.log records connections and dns.log records DNS queries. This sub maps the complete Zeek log directory — every log file, what it contains, the fields you'll query most, and which investigation questions each answers. This is the reference material you'll return to throughout the course.

Operational Objective

Zeek produces 20+ log files, each dedicated to a specific protocol or observation type. When you're investigating an incident and need to find the TLS certificate for a suspicious connection, you need to know that it's in ssl.log, not http.log or conn.log. When you need to find what files were transferred over the network, you need files.log, not conn.log.

Knowing which log answers which question is the difference between a 30-second query and a 30-minute search through the wrong data. This sub is a reference you'll use throughout the course — bookmark it.

Deliverable: A complete map of Zeek's log files — the ten logs you'll use most, their key fields, the investigation questions they answer, and the query patterns for each.

Estimated completion: 35 minutes
ZEEK LOG FILES — INVESTIGATION PRIORITY TIER 1 — EVERY INVESTIGATION conn.log Every TCP/UDP connection — IPs, ports, bytes, duration START HERE. Always. For every investigation. dns.log Every DNS query and response — domains, types, answers Second query. What domains were resolved? ssl.log TLS handshakes — certs, JA3, SNI, cipher suite Encrypted traffic investigation. C2 fingerprinting. TIER 2 — PROTOCOL-SPECIFIC INVESTIGATION http.log HTTP requests (unencrypted only) files.log Files seen in traffic — hash, MIME, size smtp.log Email metadata — sender, recipient, subject ssh.log SSH connections and auth results TIER 3 — SPECIALIZED INVESTIGATION smb_files.log SMB file operations smb_mapping.log SMB share access notice.log Zeek's own detection findings x509.log Certificate details OPERATIONAL LOGS — SENSOR HEALTH, NOT INVESTIGATION capture_loss.log (packet drops) · reporter.log (errors) · packet_filter.log (BPF) · loaded_scripts.log (config)

Figure NF1.4 — Zeek log files organized by investigation priority. Tier 1 logs (conn.log, dns.log, ssl.log) are used in every investigation. Tier 2 logs are protocol-specific. Tier 3 logs serve specialized investigation needs. Operational logs monitor sensor health.

Tier 1 — conn.log: The Investigation Foundation

conn.log is the single most important Zeek log. It records every TCP and UDP connection the sensor observes. Every investigation starts here.

Every connection that crosses the sensor gets one conn.log entry. The entry records: timestamp (ts), a unique connection ID (uid), source IP (id.orig_h), source port (id.orig_p), destination IP (id.resp_h), destination port (id.resp_p), protocol (proto), service detected (service), duration in seconds (duration), bytes sent by the originator (orig_bytes), bytes sent by the responder (resp_bytes), connection state (conn_state), and the Community ID hash (community_id).

The fields you'll query most are the 5-tuple (source/destination IPs and ports plus protocol), duration, and byte counts. These three dimensions answer the majority of investigation questions: who connected to whom (5-tuple), how long the connection lasted (duration), and how much data was transferred (byte counts).

The uid field is the universal join key across Zeek logs. When you find a suspicious connection in conn.log, the uid lets you find the same connection's DNS query in dns.log, TLS handshake in ssl.log, HTTP request in http.log, and files in files.log. This is how you pivot from "this connection looks suspicious" to "this is what the connection did."

Common conn.log queries:

# All connections from a specific source IP
cat conn.log | zeek-cut ts id.orig_h id.resp_h id.resp_p duration orig_bytes | grep "10.0.1.15"

# Top destinations by connection count
cat conn.log | zeek-cut id.resp_h | sort | uniq -c | sort -rn | head -10

# Connections with high outbound byte counts (potential exfiltration)
cat conn.log | zeek-cut ts id.orig_h id.resp_h orig_bytes | awk -F'\t' '$4 > 10000000' | sort -t$'\t' -k4 -rn

# Long-duration connections (potential C2)
cat conn.log | zeek-cut ts id.orig_h id.resp_h duration | awk -F'\t' '$4 > 3600' | sort -t$'\t' -k4 -rn

Tier 1 — dns.log: Where Every Attack Chain Starts

dns.log records every DNS query and response. The attacker's domain had to be resolved before the first connection was made — dns.log captures that moment.

Every DNS query that crosses the sensor produces a dns.log entry. The key fields are: query name (query), query type (qtype_name — A, AAAA, CNAME, MX, TXT, etc.), response code (rcode_name — NOERROR, NXDOMAIN, SERVFAIL), and answers (answers — the resolved IP addresses or other records).

DNS investigation patterns you'll use repeatedly:

# All queries for a specific domain
cat dns.log | zeek-cut ts id.orig_h query answers | grep "suspicious-domain.com"

# Queries that resolved to a specific IP
cat dns.log | zeek-cut ts query answers | grep "203.0.113.88"

# High-frequency query sources (potential DNS tunnelling)
cat dns.log | zeek-cut id.orig_h | sort | uniq -c | sort -rn | head -10

# TXT record queries (common in DNS tunnelling and C2)
cat dns.log | zeek-cut ts id.orig_h query qtype_name | grep "TXT"

# NXDOMAIN responses (potential DGA activity)
cat dns.log | zeek-cut ts id.orig_h query rcode_name | grep "NXDOMAIN" | head -20

Module NF3 covers DNS investigation in depth — tunnelling detection, passive DNS analysis, DGA identification, and the challenges of encrypted DNS.

Tier 1 — ssl.log: Encrypted Traffic Investigation

ssl.log records TLS handshake details for every encrypted connection. In 2026, most traffic is encrypted — ssl.log is your primary window into what those connections are.

Every TLS handshake produces an ssl.log entry. The key fields are: server name indication (server_name — the domain the client requested), TLS version (version), cipher suite (cipher), certificate subject (subject), certificate issuer (issuer), JA3 client fingerprint (ja3), and JA3S server fingerprint (ja3s).

JA3 and JA3S are TLS fingerprints calculated from the handshake parameters. Different TLS implementations produce different fingerprints. A web browser has a different JA3 hash than a Python requests library, which has a different hash than Cobalt Strike's beacon. JA3 fingerprinting lets you identify the client software without seeing the encrypted content — crucial for C2 detection.

# TLS connections to a specific server
cat ssl.log | zeek-cut ts server_name subject issuer ja3 | grep "suspicious-domain.com"

# Self-signed certificates (no issuer, or issuer equals subject)
cat ssl.log | zeek-cut ts server_name subject issuer | awk -F'\t' '$3 == $4'

# Connections with a specific JA3 hash (known C2 fingerprint)
cat ssl.log | zeek-cut ts id.orig_h id.resp_h server_name ja3 | grep "KNOWN_JA3_HASH"

# All unique JA3 fingerprints (baseline profiling)
cat ssl.log | zeek-cut ja3 | sort | uniq -c | sort -rn | head -20

Tier 2 — Protocol-Specific Logs

http.log captures HTTP requests and responses for unencrypted traffic. Key fields: method, host, URI, user_agent, status_code. In 2026, http.log is sparse for most environments because the majority of web traffic is HTTPS. Where it appears — internal web applications, proxy connections, malware download cradles on port 80 — it's highly valuable because you can see the full request details.

files.log records every file observed in network traffic, regardless of protocol. Key fields: filename, MIME type, file hash (MD5, SHA1, SHA256), file size, and source/destination. files.log is protocol-agnostic — it captures files transferred over HTTP, SMB, FTP, SMTP, and other protocols. Hash the file contents against threat intelligence to identify known malware.

smtp.log captures email message metadata — sender, recipient, subject, and relay chain. Valuable for phishing investigation (identifying the inbound phishing email) and mail exfiltration detection (unusual outbound SMTP to external servers).

ssh.log captures SSH connection details — authentication method, version, direction, key exchange algorithms, and auth_success. The auth_success field is critical for brute force detection: hundreds of entries with auth_success=F followed by auth_success=T from the same source is a successful brute force.

Tier 3 — Specialized Logs

smb_files.log and smb_mapping.log capture SMB file operations and share mappings. Essential for lateral movement investigation — when the attacker uses PsExec, maps a share, or transfers files over SMB. Module NF5 covers SMB investigation in depth.

notice.log contains Zeek's own detection findings — anomalies, protocol violations, and policy violations that Zeek identifies through its scripting engine. Not as specific as Suricata signatures, but valuable for unusual protocol behavior that doesn't match a known attack signature.

x509.log records detailed certificate information — separate from ssl.log, which records the TLS handshake context. x509.log contains the full certificate fields: subject, issuer, validity period, key length, signature algorithm. Useful for identifying expired, self-signed, or anomalous certificates.

Operational Logs

capture_loss.log records packet loss — gaps in the capture. Any non-zero packet loss means your sensor missed traffic, which means your evidence has gaps. Check this log regularly.

reporter.log records Zeek errors and warnings. Check this after any configuration change or upgrade.

packet_filter.log records the BPF filter applied to the capture interface. Verify this matches your intended filter — an incorrect BPF filter silently excludes traffic from analysis.

Guided Procedure — Navigate the Log Directory
Step 1. Run Zeek against a test PCAP and list all generated log files with their sizes.
Expected output: `ls -lh *.log` showing conn.log (usually the largest), dns.log, and others. The specific logs depend on the protocols present in your PCAP.
If very few logs are generated: The PCAP may contain limited protocol diversity. Try a PCAP from malware-traffic-analysis.net — these typically contain DNS, HTTP, TLS, and sometimes SMB.
Step 2. Read the header of conn.log to understand the field names.
Expected output: `head -10 conn.log` shows header lines starting with `#`. The `#fields` line lists every column name. These names are what you pass to zeek-cut.
If the header is missing: The log may have been truncated. Re-run `zeek -r file.pcap` in a clean directory.
Step 3. Use the conn.log `uid` to pivot to another log file.
Expected output: Pick a conn.log entry with `cat conn.log | zeek-cut uid id.resp_h id.resp_p | head -5`. Take one UID and search for it in other logs: `grep "THE_UID" *.log`. You should find the same UID in ssl.log (if TLS) or http.log (if HTTP) or dns.log (if DNS was observed for the same session).
If the UID isn't found in other logs: Not all connections produce entries in protocol-specific logs. A raw TCP connection that doesn't use a recognized protocol appears only in conn.log. TLS connections appear in both conn.log and ssl.log. The UID pivot works when the protocol is one Zeek parses.
Decision point

You're investigating a suspicious connection and you've found it in conn.log. The connection is on port 443 with 2.3 GB of originator bytes. You want to know what was transferred, but ssl.log shows the traffic was TLS-encrypted.

Do you (a) check http.log for the HTTP content, (b) check ssl.log for the TLS certificate and JA3 fingerprint, or (c) pull PCAP and try to decrypt?

The answer is (b). Since the traffic is TLS-encrypted, http.log won't have entries — Zeek can't parse HTTP inside TLS without the session keys. PCAP decryption (c) requires keys you almost certainly don't have. But ssl.log gives you the TLS fingerprint (JA3), the server certificate (subject, issuer), and the server name indication — often enough to determine whether the connection is legitimate (certificate from a known CA for a known service) or suspicious (self-signed certificate, JA3 matching a known malware framework).

Investigation in encrypted environments is about characterising the connection by its metadata, not reading its content. ssl.log is the primary tool for this. Module NF4 covers the methodology in depth.

Compliance Myth: "Zeek logs contain the content of communications, so they're subject to wiretapping restrictions"

Zeek metadata logs record connection attributes — who communicated with whom, when, how much data, which protocol — but not the content of the communication. conn.log records byte counts, not bytes. dns.log records the domain queried, not the web page rendered. ssl.log records the TLS certificate, not the encrypted payload.

The distinction between metadata and content is legally significant. In most jurisdictions, metadata collection is subject to lighter regulation than content interception. UK RIPA distinguishes between "communications data" (metadata) and "interception" (content). Zeek metadata falls into the communications data category.

The exception is http.log for unencrypted HTTP traffic — this can contain URI paths, query parameters, and other information that might be considered content. And if you configure Zeek to extract files (files.log with extraction enabled), the extracted files are clearly content. The legal guidance from NF0.9 applies: ensure your monitoring is authorized, proportionate, and documented.

Next
NF1.5 — Suricata Installation and Rule Management. Zeek produces your investigation data. NF1.5 adds Suricata for signature-based detection — the alert engine that tells you when known-bad traffic crosses the sensor.
Try it: Build a quick-reference card from your own logs

Setup. Run Zeek against a diverse PCAP (one that contains DNS, HTTP, TLS, and ideally SMB or SSH).

Task. For each log file generated, write down: (1) the log file name, (2) the number of entries (data rows), (3) the three most useful fields for investigation, and (4) one query that extracts useful information.

Expected result. A personal reference card with at least 5 log files documented. This is your version of the artifact below — tailored to the PCAP you analyzed.

Debugging branch. If some expected logs are missing: check what protocols are in the PCAP with cat conn.log | zeek-cut service | sort | uniq -c | sort -rn. The service field shows what Zeek detected — if ssl appears but http doesn't, the web traffic was encrypted.

Checkpoint — before moving on
1. Name the three Tier 1 Zeek log files and state the primary investigation question each answers. (§ Tier 1 sections)
2. Explain how the `uid` field links conn.log to other protocol-specific logs and demonstrate a pivot query. (§ conn.log, Guided Procedure Step 3)
3. Describe what JA3 fingerprinting is and why it's useful for investigating encrypted traffic. (§ ssl.log)

You've built the sensor and mapped the evidence landscape.

NF0 established why network evidence matters when every other source is compromised. NF1 built your Zeek + Suricata sensor with the 10 investigation query patterns. From here, every module teaches protocol-specific investigation against real attack scenarios.

  • DNS deep dive (NF3) — tunnelling detection, DGA analysis, passive DNS infrastructure mapping, and the INC-NE-2026-0227 AiTM phishing DNS trail
  • Protocol analysis (NF4–NF7) — HTTP/HTTPS, SMB lateral movement, SSH tunnelling, and email protocol investigation with Zeek metadata and PCAP
  • Detection and hunting (NF8–NF11) — Suricata rule writing, C2 beacon detection with JA3, NetFlow analytics, and proactive network threat hunting
  • NSM architecture (NF13) — production sensor deployment at 1–10 Gbps with Arkime, Security Onion, and enterprise storage planning
  • INC-NE-2026-0830 capstone (NF14) — multi-stage investigation using only network evidence: phishing → domain-fronted C2 → lateral movement → DNS tunnel exfiltration
Unlock the full course with Premium See Full Syllabus

Cancel anytime