Full Guide
Executive Summary
Data you did not capture is data you cannot analyze. Every quantitative claim in your eventual paper — every evasion rate, every time-to-detect, every "the EDR logged X but not Y" — is downstream of the telemetry you wired up before running the attack. Practitioners routinely run a slick attack chain, then discover they have no ground-truth record of what the defender actually saw, and the experiment is worthless.
This module is a hands-on guide to instrumenting hosts and networks for full-fidelity, time-synchronized, ground-truth telemetry: Sysmon and ETW on Windows, eBPF on Linux, PCAP on the wire, and the EDR's own logs. Done right, every step of your attack produces a labeled, correlatable record that becomes the raw material of your evaluation.
The one-line mental model: Instrument first, attack second. The defender's-eye view is your dataset — capture it as if you can never run the attack again.
Learning Outcomes
By the end of this module you will be able to:
- Deploy host and network instrumentation: Sysmon, ETW, eBPF, PCAP, EDR telemetry.
- Establish ground-truth labels for every attacker action.
- Synchronize clocks and correlate events across heterogeneous sources.
- Avoid observer effects that distort the experiment.
1. The Telemetry Stack: Layers of Visibility
Different sources see different things; a single source always has blind spots. Defense-in-depth instrumentation means an action invisible to one layer is caught by another, and the gap between layers is itself a finding.
flowchart TD
ATK["Attacker action<br/>(e.g., process injection)"] --> H1["ETW<br/>(API/kernel events)"]
ATK --> H2["Sysmon<br/>(proc/file/registry/net)"]
ATK --> H3["EDR agent<br/>(vendor telemetry)"]
ATK --> N1["PCAP<br/>(wire traffic)"]
ATK --> N2["DNS/proxy logs"]
H1 & H2 & H3 & N1 & N2 --> CORR["Correlation layer<br/>(unified timeline)"]
style ATK fill:#2a0c14,stroke:#ef233c,color:#fee2e2
style CORR fill:#0c2a22,stroke:#10e793,color:#d1fae5The research-grade insight comes from comparing layers: if Sysmon and ETW both record the injection but the EDR agent emits nothing, you have measured a specific, named telemetry blind spot — a far stronger contribution than "the EDR didn't pop an alert."
2. Host Instrumentation: Windows and Linux
Each OS has a canonical research telemetry stack. Configure for coverage, not the noise-reduced settings a production SOC would use — you want everything, and you'll filter later.
| Source | Platform | Captures | Research config note |
|---|---|---|---|
| Sysmon | Windows | Proc create, image load, network, file, registry, WMI | Use a permissive config (e.g., full SwiftOnSecurity baseline, minimal excludes) |
| ETW | Windows | Kernel + API-level events, AMSI, .NET | Enable Microsoft-Windows-Threat-Intelligence provider |
| EDR agent | Windows | Vendor's own detections + telemetry | Export raw telemetry, not just alerts |
| eBPF (e.g., Tracee/Falco) | Linux | Syscalls, process, network, file | Trace syscall granularity for evasion work |
| auditd | Linux | Syscall + file auditing | Good baseline; pair with eBPF |
A deliberate methodological choice: capture the EDR's raw telemetry stream, not just its pop-up alerts. The difference between "no alert" and "no telemetry at all" is the difference between the SOC could have caught you and the SOC was blind — and it is exactly the construct-validity distinction from Module 09.
3. Ground-Truth Labeling
Telemetry without labels is just noise. Ground truth is the authoritative record of what you actually did and when, so that any detection (or miss) can be matched to the action that caused it.
GROUND-TRUTH ACTION LOG (emitted by your attack orchestrator) t0 = 1718000000.000 ACTION=recon tool=nmap host=10.0.0.5 t1 = 1718000042.115 ACTION=initial_access tool=phish host=10.0.0.5 t2 = 1718000130.400 ACTION=injection tech=T1055.012 host=10.0.0.5 t3 = 1718000131.900 ACTION=c2_beacon interval=60s host=10.0.0.5 ... (each line = a labeled event with a precise timestamp + technique ID)The cleanest way to generate ground truth is to have your attack orchestrator emit it — the same script that runs the chain (Module 16) writes a timestamped, ATT&CK-tagged line per action. Now "did the EDR detect the injection at t2?" is a join, not a guess. This labeled timeline is also what makes your eventual dataset (Module 17) reusable by others.
4. Clock Synchronization and Correlation
The single most common instrumentation failure is clock skew: host clock, PCAP capture clock, and EDR cloud timestamps disagree by seconds, and your carefully-labeled events no longer line up. Correlation across sources is only as good as your time base.
sequenceDiagram
participant NTP as NTP / PTP server (lab)
participant H as Hosts
participant P as PCAP tap
participant E as EDR
NTP->>H: sync (sub-ms drift)
NTP->>P: sync capture clock
Note over E: EDR cloud time may differ!
H->>H: log in UTC epoch (ns)
P->>P: timestamp on capture
Note over NTP,E: record offset for any source<br/>you cannot sync, correct in analysisDiscipline: run a lab NTP/PTP server, sync every host to it, log everything in UTC epoch with sub-second precision, and for any source you cannot directly sync (a cloud EDR), measure and record its offset so you can correct it during correlation. A correlation built on unsynced clocks will silently mis-attribute detections to the wrong action — a defect no reviewer can see but every result depends on.
5. The Observer Effect
Instrumentation is not free: heavy tracing changes timing, and a sample may detect that it's being watched (a debugger, a known sandbox artifact, high ETW load) and alter its behavior. This is the observer effect, and ignoring it threatens internal validity.
OBSERVER EFFECT — sources and mitigations ┌────────────────────────────┬──────────────────────────────┐ │ Effect │ Mitigation │ ├────────────────────────────┼──────────────────────────────┤ │ Heavy ETW slows execution │ Measure overhead; report it │ │ Sample fingerprints sandbox│ Harden VM (hide artifacts) │ │ Debugger changes timing │ Prefer passive tracing │ │ PCAP on host alters NIC │ Tap out-of-band at gateway │ └────────────────────────────┴──────────────────────────────┘The two strongest mitigations are out-of-band capture (tap PCAP at the gateway, not on the victim NIC, so the victim is unaware) and overhead measurement (run a no-instrumentation control to quantify how much your tracing perturbs timing, and report it as a threat to validity). Sandbox-evasion-aware malware is its own research subfield; at minimum, harden your VM to hide the obvious tells.
Step-by-Step Practical Exercise
Goal: Stand up a minimal but correct instrumentation stack and produce a correlated, ground-truth-labeled timeline for one simple attack action.
Time: ~90 minutes. You need: the lab from Module 11, one Windows or Linux victim, and one benign test action (e.g., a process-injection PoC you own).
Step 1 — Deploy two host sources + PCAP (25 min). On the victim, enable Sysmon (Windows) or eBPF/auditd (Linux), and enable ETW if Windows. Tap PCAP at the gateway, out-of-band (§5).
Step 2 — Sync clocks (15 min). Point the host at a lab NTP server. Confirm sub-second agreement between host log time and PCAP time. Record the offset of any source you can't sync.
Step 3 — Emit ground truth (15 min). Wrap your test action in a tiny script that prints a timestamped, ATT&CK-tagged line before and after the action (§3).
Step 4 — Run and collect (15 min). Execute the action once. Collect: Sysmon/eBPF events, ETW (if any), PCAP, and your ground-truth log.
Step 5 — Correlate (20 min). Build a single unified timeline: for your ground-truth action timestamp, find the corresponding events in each source. Note which sources saw it and which were blind — that blind-spot gap is a mini-finding.
Deliverable: a running multi-source instrumentation stack, a clock-sync confirmation, a ground-truth action log, and one correlated timeline showing per-source visibility. This pipeline is what you'll run at scale during attack execution (Module 16).
Where to go next
- Module 16 — Executing the Exploit/Attack Chain Safely drives this instrumentation at scale across many trials.
- Module 17 — Capturing and Structuring Attack Telemetry & Datasets turns this raw telemetry into a clean, releasable dataset.
Related reading on the blog: "No Alert Is Not No Detection: Capturing Raw EDR Telemetry" and "Clock Skew Ate My Correlation".