Lesson 1 of 6 · 25 min read

Zeek Log Schema — Navigation and Pivot Chains

Zeek (formerly Bro) converts raw network packets into structured log files that analysts can query with standard tools. Understanding what each log type captures — and how they link together via the connection UID — is the foundation of every network investigation.


The Zeek Log Ecosystem

┌──────────────────────────────────────────────────────────┐
│                    Suricata Alert                        │
│         src: 10.1.2.3:51234 → dst: 185.100.1.1:443      │
└──────────────────────────┬───────────────────────────────┘
                           │ match 5-tuple + timestamp

┌──────────────────────────────────────────────────────────┐
│                    Zeek conn.log                         │
│  uid=CXg7bq3Kj...  src:51234→dst:443  duration=3601s    │
│  service=ssl  orig_bytes=4096  resp_bytes=2.1MB         │
└──────┬───────────────────┬───────────────────────────────┘
       │ uid               │ uid
       ▼                   ▼
┌──────────────┐   ┌───────────────┐   ┌────────────────────┐
│  ssl.log     │   │  files.log    │   │  dns.log           │
│  SNI: ...    │   │  SHA256: ...  │   │  query: evil.com   │
│  JA3: ...    │   │  MIME: exe    │   │  answers: 1.2.3.4  │
│  cert issuer │   │  → VT submit  │   │  TTL: 60s          │
└──────────────┘   └───────────────┘   └────────────────────┘

All Zeek log files share the same uid (unique connection ID) for correlated events. This is your pivot key.


conn.log — The Foundation

Every network connection generates a conn.log entry. This is the first log to query for any network investigation.

Key fields:

FieldTypeMeaning
tstimestampConnection start time
uidstringUnique connection ID (pivot key)
id.orig_hIPSource IP
id.orig_pportSource port
id.resp_hIPDestination IP
id.resp_pportDestination port
protoenumtcp / udp / icmp
servicestringDetected application protocol (ssl, http, dns, -)
durationintervalConnection duration
orig_bytescountBytes sent by source
resp_bytescountBytes sent by destination
conn_statestringTCP state at close (SF, S0, REJ, etc.)
local_origboolIs source IP local?
local_respboolIs destination IP local?

Anomaly interpretation:

# Long duration + low upload + high download = C2 channel (polling/receiving commands)
duration=7200s, orig_bytes=2048, resp_bytes=87MB

# High upload + external destination = data exfiltration
duration=300s, orig_bytes=500MB, resp_bytes=1024

# Many short connections to same dest = beacon with jitter
Multiple entries, same dst, ~60s interval with ±5s variation

dns.log — The Query Record

Every DNS query and response is logged. This is the first place to look for DGA domains, DNS tunnelling, and fast-flux C2.

Key fields:

FieldMeaning
queryThe queried domain
qtype_nameQuery type (A, AAAA, MX, TXT, NULL)
answersResolved IP addresses
TTLTime-to-live for the response
rcode_nameResponse code (NOERROR, NXDOMAIN, SERVFAIL)
uidLinks to conn.log

Anomaly indicators:

# DGA: high query volume to NXDOMAIN (domain doesn't exist yet)
query=a8f3j2k1.evil.com  rcode=NXDOMAIN  (many such entries = DGA rotation)

# DNS tunnelling: TXT or NULL queries with long subdomain labels
query=V2hhdCBpcyB0aGUgYW5zd2Vy.c2server.io  qtype=TXT  (base64 in subdomain)

# Fast-flux: same domain resolves to different IPs with very low TTL
query=c2.evil.net  TTL=60  answers=[1.2.3.4]
query=c2.evil.net  TTL=60  answers=[5.6.7.8]  (30 seconds later)

ssl.log — TLS Metadata

Even in encrypted TLS sessions, the handshake reveals metadata. ssl.log captures this before encryption begins.

Key fields:

FieldMeaning
server_nameSNI — the hostname the client requested (before encryption)
ja3JA3 fingerprint of the client’s TLS ClientHello
ja3sJA3S fingerprint of the server’s TLS ServerHello
cert_chain_fuidsLink to x509.log for certificate details
validation_statusCertificate validation result
cipherNegotiated cipher suite
uidLinks to conn.log

JA3 matching:

JA3 is a hash of the TLS ClientHello parameters (TLS version, cipher suites, extensions, elliptic curves). Known malware tools have known JA3 hashes. Suricata rules often trigger on JA3 matches before the session content is available.

# Known Cobalt Strike default JA3:
ja3=72a7c4de

# Known Metasploit Meterpreter JA3:
ja3=c1e5c81d01

http.log — HTTP Metadata

HTTP request/response metadata, including URIs, user agents, and response codes.

Key fields:

FieldMeaning
hostHTTP Host: header
uriRequested URI path
methodGET / POST / PUT
user_agentClient User-Agent string
status_codeHTTP response code
request_body_lenSize of POST body
response_body_lenSize of response body
uidLinks to conn.log

Anomalous patterns:


files.log — Transfer Hashes

Any file detected in transit across logged protocols is hashed and recorded.

Key fields:

FieldMeaning
fuidUnique file ID
tx_hostsIP(s) that sent the file
rx_hostsIP(s) that received the file
conn_uidsConnection UIDs where file was seen
mime_typeMIME type detected from content
filenameFilename if extractable
md5MD5 hash
sha1SHA1 hash
sha256SHA256 hash

Pivot: files.log conn_uids → conn.log uid → http.log uid for full context of a file download.