Skip to content

Lesson 5 of 14 · 14m

Telemetry That Answers

Process exec with command line, auth events, network, DNS, and scoped file writes — joined by ProcessGuid, LogonId, and auid.

Hunting is joins. A single log line is a rumor; a hunt is five streams that corroborate each other or convict each other of lying. The streams that carry almost every hunt are fewer than vendors imply: process execution with command line and parent, authentication events with logon type and source, network connections tied back to a process or at least a flow, DNS queries, and file writes in directories that matter. Everything else — USB events, print jobs, clipboard contents — is enrichment for a hunt already in progress.

The five streams and where they live

Process execution. Windows: Sysmon event ID 1, or Security 4688 if you enabled "Include command line in process creation events" — off by default, which makes a default 4688 nearly useless for hunting. Linux: auditd -a always,exit -F arch=b64 -S execve, or an eBPF sensor like Falco or Tetragon hooking sched_process_exec. osquery's process_events table rides either backend. This is the atomic unit of hunting — everything else attaches to it.

Authentication. Windows Security 4624/4625 with logon types and source addresses; Linux /var/log/auth.log on Debian-family, /var/log/secure on RHEL-family, plus journalctl -u ssh where journald persists. Set LogLevel VERBOSE in sshd_config and pubkey lines carry the key fingerprint — a join key straight into your asset inventory.

Network. Sysmon 3 ties a connection to a ProcessGuid. Zeek's conn.log gives you the flow without the payload; ssl.log (with the ja3 package loaded) carries ja3/ja3s fingerprint columns, so a Go implant's TLS ClientHello stops impersonating Chrome. Netflow answers "who talked to whom, how much, how often" — enough for beaconing math. Your proxy logs hold user-agent and category fields endpoints never see.

DNS. Sysmon 22 on endpoints, Zeek dns.log, or resolver logs. DNS survives more evasion than almost anything because the query happens before the encrypted session does. The caveat is real: DNS-over-HTTPS blinds it unless you control the resolver, and Encrypted Client Hello is eating SNI-based visibility in browsers. If you can't control the resolver, your DNS stream is a sieve.

File writes. Sysmon 11 FileCreate and 15 FileCreateStreamHash (alternate data streams — where downloaded-file MOTW and plenty of droppers live), scoped by config to interesting paths. On Linux, auditd -w watches or just the exec stream plus mtime diffs.

One more stream sits underneath all five: the join keys themselves. A ProcessGuid appearing in process, network, DNS, and file events turns four streams into one execution record. LogonId ties a session's source IP to everything it caused. auid ties sudo'd commands back to the human. Design collection so those keys survive to the SIEM — a forwarding pipeline that strips ParentProcessGuid on ingest has quietly deleted your best edge.

The two wrong models

First: "collect everything, sort later." Ten terabytes of events with no correlation keys is a data lake of anecdotes. A ProcessGuid that appears in the process, network, DNS, and file events of one execution is worth more than a million lines that can't be tied together. Second: "the EDR sees everything." It sees what the vendor decided to instrument. Your /etc/cron.d contents, your ld.so.preload, your Kubernetes audit log, your cloud control-plane events — probably outside its view. Hunt telemetry is designed, not purchased.

The test

The minimum viable hunt telemetry answers one question per host, per window: who ran what — with which arguments — as whom, from where, talking to whom? Run it against a canary: execute nc to a test box from a random host. If any clause of that sentence comes back blank, you have a collection gap, and the right move is fixing collection before hunting — a hunt over blind telemetry produces confident-sounding nulls, which are worse than no hunt at all.

Retention is the last honest tradeoff. Adversaries' favorite defense is your 30-day hot retention against their 45-day dwell — check the cost of keeping Sysmon 1 and Zeek conn.log/dns.log for a year in cheap storage versus the cost of answering "when did this start?" with "before our retention." Hunt-relevant streams are small; it's the firehose everything-else that prices people out of history.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.