All projects

Threat Hunting · 2026

huntql

A pipe-based threat-hunting query language for Zeek logs, written in Rust: type-checked queries, a planner and a streaming executor with built-in beaconing, long-tail and first-seen hunts.

  • Rust
  • Zeek
  • Threat Hunting
  • Query Language
  • Beacon Detection

Approach

huntql reads Zeek conn, dns, http and ssl logs (TSV or JSON, plain or gzip, rotated files concatenated) and runs one-line hunts such as conn | beacon or http | rare user_agent by src without standing up a SIEM.

Each query goes through a full language pipeline: lexer, parser, typed AST checked against the log schema with rustc-style errors, a planner that merges filters, prunes columns and turns sort | head into a bounded top-k, and a streaming executor with enforced memory bounds.

Highlights

  • Four hunting operators: stack, rare, first_seen and beacon
  • Beacon scoring from inter-arrival jitter and FFT autocorrelation
  • Held-out evaluation on generated traffic: precision 0.974, recall 0.840 for the combined scorer
  • REPL with .explain and .schema; 95.5% line coverage

Artefacts