One process, one short burst
Layer 1a looks at a short ETW event window from one process and asks whether that burst looks ordinary.
Guardian runs two on-device anomaly-detection layers on Windows using ETW-derived features. Layer 1a scores short per-process event windows, while Layer 1b scores rolling 5-minute machine-wide behavior. Both run on-device, both feed the same alert system, and trusted local baselines can refine response thresholds without retraining shipped ONNX weights.
Layer 1a looks at a short ETW event window from one process and asks whether that burst looks ordinary.
Layer 1b looks across the machine. It rolls up 5 minutes of ETW activity and checks whether that wider pattern fits benign behavior.
Guardian can derive bounded local thresholds from clean app or system recordings. Those recordings shape your PC only; they do not rewrite the shipped ONNX weights.
A high score does not always mean quarantine. Windows, signed, hardware, impersonation, and behavioral alerts are routed differently so the response stays safe.
Deviation Tier 3 items land in Investigation Required for evidence review. Operational Tier 4 (Action Required) needs corroboration before quarantine is offered on eligible paths.
ETW scoring, vault, baselines, and posture snapshots stay local. The only routine outbound call is subscription verify/activate, not behavioral telemetry or file contents.
Guardian currently runs two anomaly-detection models at different scopes. Layer 1a is the fast per-process event-window lane, and Layer 1b is the slower machine-wide behavioral lane built from rolling 5-minute ETW aggregates. They feed the same alert pipeline, but they answer different questions and provide defense in-depth.
Runtime contract: both models are evaluated locally via ONNX Runtime; feature vectors and reconstruction scores are not sent to a remote model service. Shipped models and matching preprocessor metadata are installed with the app and updated with product releases rather than through silent, per-session model downloads.
Fires first. Guardian scores a short ETW event window for one process and turns reconstruction error into the first anomaly signal the desktop app can act on. In the current shipping build, this is a fast event-window lane rather than the older fully static PE-header alert path.
Runs continuously in the background. It aggregates 12 ETW event-rate features over rolling 5-minute windows and compares each window against the benign behavioral model shipped with the app.
Together they provide defense in depth: a fast, process-local check can flag odd bursts early, while a slower machine roll-up can flag coordinated or rare operational patterns that are invisible in a single process slice.
Both models are trained on benign data. They learn what normal looks like, not what malware looks like. That means unusual structure or unusual behavior can raise the score even when the exact threat has never been cataloged before.
The first model scores a short per-process event window locally and converts reconstruction error into the first anomaly signal the desktop app can surface.
In the current monitor path, Guardian buffers a short burst of ETW activity for one process, maps that burst into a 17-slot feature vector, and feeds the vector through the first ONNX model. The mean squared error (MSE) between the input and reconstruction is the anomaly score: low means the window is close to the benign patterns the model learned, while high means it falls outside that learned range.
The network is a compact symmetric autoencoder with an 8-dimensional bottleneck (a compressed internal representation of each window). Hidden layers use ReLU and the output layer is linear for reconstruction. Earlier public docs emphasized a fully static PE path; that richer path still exists in the codebase, but the live monitor currently surfaces alerts from the fast event-window lane documented here.
Read this as a three-stage flow: the encoder compresses a raw event window into a compact behavior fingerprint, the bottleneck (latent) stores that compressed fingerprint, and the decoder tries to reconstruct the original window from that fingerprint. If reconstruction is poor, the window is more likely anomalous.
The current desktop build uses a summarized event-window feature vector rather than the older full PE-header extraction path. Several slots are placeholders kept so the live vector still matches the first model’s 17-input shape.
| Feature | Current meaning |
|---|---|
| window_mean | Average risk weight across the recent event window. |
| window_std | Spread of event weights across the same window. |
| window_max | Highest-risk event observed in the window. |
| window_min | Lowest-risk event observed in the window. |
| high_risk_count | Count of high-risk events in the window. |
| high_risk_ratio | Share of the window made up of high-risk events. |
| event_count | Total number of events accumulated for the process. |
| scaled_mean_term | Scaled copy of the mean to preserve range information for the model. |
| scaled_std_term | Scaled copy of the spread to preserve variance information for the model. |
| Feature | Current meaning |
|---|---|
| reserved_timestamp_slot | Currently 0 in the live monitor path. |
| reserved_dll_slot | Currently 0 in the live monitor path. |
| reserved_debug_slot | Currently 0 in the live monitor path. |
| reserved_signature_slot | Currently 0 in the live monitor path. |
| dense_high_risk_flag | 1 when high-risk events dominate the window, otherwise 0. |
| reserved_extension_slot | Currently 0 in the live monitor path. |
| reserved_arch_slot | Currently 0 in the live monitor path. |
| fixed_subsystem_slot | Fixed compatibility value kept so the live vector still fits the model’s 17-input shape. |
Watches what the whole machine does in aggregate every 5 minutes. Flags windows that fall outside the benign behavioral envelope the shipped model expects, then optionally tightens that envelope with trusted local recordings from the same PC.
Every 5 minutes, Guardian collapses machine-wide ETW operational activity into 12 normalized rate features. The behavioral autoencoder reconstructs each new window from benign patterns learned during training. A high reconstruction error means the observed window falls outside the expected benign envelope.
Guardian also includes local baseline-recording tools so you can capture trusted app or system sessions on your own machine. Those recordings do not retrain the ONNX weights. Instead, they contribute clean 5-minute windows that let the desktop monitor derive a bounded local Layer 1b threshold when enough coverage exists. Until then, Layer 1b stays on its shipped threshold of 0.000507.
This layer follows the same idea as Layer 1a but on machine-wide 5-minute behavior windows: encode into a compact latent representation, then decode back to expected benign behavior. Large reconstruction gaps indicate behavior that does not match the model's benign baseline.
Each feature is an event count divided by window duration (events/sec). All 12 are clipped at the 99th percentile then scaled to [0, 1] per feature using MinMax normalization to prevent rare bursts from dominating the anomaly score.
| Feature | ETW Source | What It Captures |
|---|---|---|
| wmi_query_rate | WMI-Activity / 5857, 5858 | Rate of WMI queries. Malware heavily abuses WMI for reconnaissance, lateral movement, and execution. |
| task_register_rate | TaskScheduler / 106, 107 | Rate of scheduled task registrations. Attackers register persistence tasks; high rates outside maintenance windows are suspicious. |
| task_run_rate | TaskScheduler / 200, 201, 202 | Rate of task executions. A spike after a registration event strongly suggests a newly placed persistence mechanism firing. |
| bits_event_rate | Bits-Client / any EventID | BITS is commonly abused for stealthy C2 downloads via system-trusted network channels. |
| fw_rule_change_rate | Firewall / 2097, 2052, 2002 | Malware modifies firewall rules to open inbound ports or allow C2 traffic to pass through. |
| rdp_session_rate | TermSvc-LocalSessionMgr | Expected near-zero on single-user workstations. Non-zero on machines without RDP enabled is always anomalous. |
| smb_access_rate | SMBClient / any EventID | Near-zero on isolated workstations. Elevated rates suggest lateral movement scanning or unexpected share access. |
| error_event_rate | EventLog / Level = Error, Critical | Rate of error and critical events system-wide. Malware causes cascading errors through injection failures or service crashes. |
| total_event_rate | All ETW channels | Overall system event rate. Captures gross activity spikes that do not fit any specific category. |
| unique_channel_count | Distinct provider channels | Number of distinct event channels fired in the window. Unusual proliferation suggests broad system manipulation. |
| group_policy_rate | GroupPolicy / any EventID | Legitimate GP activity is periodic and predictable. Manipulation attempts generate irregular bursts. |
| shell_core_rate | Shell-Core / any EventID | Shell lifecycle events. Naturally sparse; spikes correlate with software installation activity. |
preprocessor_config.json alongside scaler parameters so the on-device ONNX runtime applies identical preprocessing without needing a scikit-learn object.
Both models are exported to ONNX and run entirely on your machine via ONNX Runtime. No inference request is sent to a cloud model and no behavioral feature vector needs to leave the device.
Per-process ETW events are buffered until the fast-path window fills. Each event category contributes to the 17-slot Layer 1a vector, and the first ONNX model returns a reconstruction error. The desktop app then compares that score against the active Layer 1a threshold in effect for that process: shipped preset when no trusted recording exists, or a bounded locally derived threshold once a clean baseline has been recorded.
The ETW recorder accumulates machine-wide operational counts in a rolling in-memory buffer. At each 5-minute boundary, counts are converted to 12 rate features, preprocessing is applied (clip → MinMax), and the vector is passed through the behavioral autoencoder. An alert fires when the MSE exceeds the active Layer 1b threshold: the shipped 0.000507 threshold by default, or a bounded local threshold if enough trusted clean behavioral windows have been recorded on that machine.
PyTorch and TensorFlow models require a full Python runtime to embed. ONNX Runtime ships as a single native library with Rust bindings (ort crate), adding roughly 30 MB to the binary. Inference latency on both models is sub-millisecond on modern hardware.
Models and preprocessors ship as versioned local artifacts with the app. They are loaded from disk at startup and updated as part of normal product releases, not by sending live telemetry to a remote inference service.
Not all anomalies are equally urgent. The desktop UI accumulates confidence over time, routes protected process classes separately, and only exposes aggressive actions when the process is both actionable and high confidence.
%LOCALAPPDATA%\AI Malware Guardian\ if needed, reinstall from the official download, and submit a Microsoft false-positive report when appropriate.
svchost.exe and lsass.exe are routed to Windows review views. Quarantine is blocked because removing them can destabilize the operating system.
Separate from ETW/ML baselines: Guardian captures a narrow Windows configuration surface on-device and compares it to a reference you establish.
ref.posture and cur.posture. They are stored under:%APPDATA%\AiMalwareGuardian\security_posture\posture-updated to refresh the Configuration Posture view.
Guardian keeps the shipped models fixed while still letting trusted local recordings shape bounded thresholds on the specific machine where they were captured.
The shipping models were trained on large benign corpora before release. Guardian also includes local baseline-recording tools so you can capture app or system sessions on your own machine in the same runtime feature spaces.
Those recordings do not retrain model weights. Instead, they populate encrypted local indexes that derive bounded thresholds from trusted clean windows: per-process for Layer 1a and machine-wide for Layer 1b once enough clean 5-minute windows exist. The result is a detector that becomes more specific to your machine while keeping threshold behavior auditable.