**How Zeek aids network forensics**Zeek passively inspects traffic and produces rich, timestamped event logs that map network activity to higher-level artifacts (sessions, files, DNS resolutions, HTTP requests). For a forensic examiner this gives deterministic evidence: who talked to whom, when, what was transferred, and protocol semantics useful for timelines and attribution.**Most useful Zeek logs for incident work**- conn.log — session metadata (IPs, ports, bytes, duration). Primary timeline source.- dns.log — queries/responses, RCODEs, query types. Crucial for identifying suspicious domains and tunneling.- http.log — URLs, user-agent, referer, response codes. Useful for web-based data exfiltration and malware callbacks.- files.log — file transfers extracted/hashed (MD5/SHA1). Source of recoverable payloads and artifacts.- ssl.log / x509.log — TLS handshakes and certs for attribution and suspicious certs.- smtp.log / weird.log / notice.log — protocol anomalies, alerts, errors useful for triage.- kerberos.log / dhcp.log — endpoint identity and lease history.**Simple Zeek script idea to flag DNS tunneling**Approach: heuristic scoring by (1) many distinct subdomain labels for same domain, (2) unusually long query names, (3) high ratio of TXT/NULL queries or many base64-like labels, (4) lots of NXDOMAIN or answers with tiny TTLs.Example Zeek script (heuristic alert):zeek
@load base/protocols/dns
module DNS_Tunnel;
global qcount: table[string] of count = table();
global longq: table[string] of count = table();
event zeek_init()
{
}
event dns_request(c: connection, query: string, qtype: count, qclass: count)
{
local domain = subdom_hostname(query); # keep registered domain ideally use publicsuffix
qcount[domain] += 1;
if ( |query| > 60 ) longq[domain] += 1;
if ( qcount[domain] > 100 && longq[domain] > 20 )
{
NOTICE([$note="Possible_DNS_Tunneling",
$msg=fmt("High subdomain/long queries for %s", domain),
$sub=domain,
$conn=c]);
}
}
Rationale: this raises high-signal candidates for manual review and cross-check with files.log/http.log. In production refine by using public suffix list, entropy checks on labels, TXT/NULL counts, query-type weighting, and thresholds tuned to baseline.