<!-- README.md -->

# Benign Sysmon and detection-engine validation

This supplement to Section 21 records 8,380 genuine Sysmon events from twenty benign fixtures, execution of three unchanged Sigma rules in SQLite, and execution of two unchanged KQL hunts in Microsoft's local Kusto engine. It supersedes the original detection bundle's statements that no genuine Sysmon or KQL-engine measurement was available. Its results concern these benign fixtures and local engines; production forwarding, SIEM alert delivery, native-malware Sysmon behavior, enterprise baselines and independent family holdouts remain untested.

The complete replay archive is `section21-sysmon-validation-20261024.tar.gz`, 4,260,843 bytes, SHA-256 `efea005eaf1993b77f27635d1b921b8c83e6f431003aa83b2a0fbd14d4dbcc96`. Its embedded `PACKAGE-MANIFEST.json` identifies 314 selected files. The archive retains its original repository-relative paths so the included analyzers resolve their inputs. The local `section-21` upload wrapper is not part of the public archive path.

## Measurements

| Layer | Result | Interpretation |
| :--- | :--- | :--- |
| Original Sysmon 15.22 EVTX and native XML | 8,380 records agree across the two exports | Includes background activity as well as eight process and twelve startup-value fixtures |
| Sigma conversion and SQLite execution | Exactly 5 process, 3 logon/Load and 3 Run matches | Official Sysmon/Windows pipelines and SQLite backend; unchanged rules |
| Local Microsoft Kusto engine | 8,380 rows ingested; sixteen-column round trip passes | Recorded requests and responses retain the actual engine result |
| Two unchanged KQL hunts | Expected 60 activity rows and 8 startup writes | Broader hunts intentionally include selected Sigma near-misses |

The activity join returns six network, six file and 48 registry rows across six process GUIDs. Native runtime registry activity accounts for more than the explicit fixture marker writes. The registry hunt selects two wrong-data controls because it filters startup locations independently of the written executable path. Substring predicates match `--lold-container-extra`, `--lold-container=1` and `SyncService.exe.other`. These outcomes were declared in the fixture plan.

The first XML export corrupted non-ASCII characters during console decoding; its intact EVTX and failed comparison remain preserved. Native Unicode XML export resolved that problem in the repeat. The one `REG_EXPAND_SZ` fixture also distinguishes the registry-readback value `%TEMP%` from the event's `%%TEMP%%` representation. Both event parsers and both engines preserve the latter. All twelve startup-value changes were restored; the fixture destinations contained no executable.

## Read the package

Paths in this table are below `04-raw/section21-sysmon-validation-20261024/` inside the extracted archive.

| Package path | Purpose |
| :--- | :--- |
| `originals-v2/guest/Sysmon-Operational.evtx` and `.xml` | Final original sensor log and native Unicode export |
| `originals-v2/guest/collection.json` and `sensor.json` | Actual fixtures, registry restoration and sensor identity |
| `originals-v2/provenance.json` | Capture and guest-transfer custody |
| `derived/final-v2/validation.json` | Export agreement and actual Sigma/SQLite results |
| `derived/final-v2/fixture-bindings.json` | Independent process/writer/target/time joins |
| `derived/final-v2/queries/` | Converted SQL statements |
| `kusto-final/` | Actual requests, responses, exact KQL slices, returned rows and final validation |
| `originals/` and `inspection/first-export-expected-failure.log` | Failed first text export and reproducible rejection |
| `inspection/analyze-final.log` and `inspection/kusto-execution.log` | Earlier failed match comparisons, distinct from the final results |

The original final EVTX hashes to `acd9d0588fd1ca43a2b637004ddfa6a5a0cf5620cb0a6f81ba58e77a06b128c6`; the XML hashes to `1d16c462f0ec8f8e26967f3e688026a1d5c3271a023dc1456b9bf81b74251839`. The analyzer compares selected system fields and every named event field, including 100 ns timestamps, while allowing the documented Boolean-case and hexadecimal-padding equivalents.

## Reproduction and previous artifacts

Extract the package into an empty directory and follow `03-tooling/detection/section21_sysmon_validation/README.md` from that extracted root. Its offline `validate.py analyze` command parses the retained log, converts the rules and executes SQLite without a Windows guest. Python 3.14.2, SQLite 3.50.4 and the pinned dependency set reproduce the measured report and database bytes. The separate Kusto recipe needs the pinned local emulator image; it creates a fresh database and executes the original queries. The archived request/response records remain evidence of the completed run when that engine is unavailable.

Inspect the result report after each run. The historical runners can write `passed: false` without returning a failure exit status for a match-set difference. For the documented offline `derived/replay` output, this check requires all three rules and the seven reproduced file identities:

```python
import json
from pathlib import Path

root = Path("04-raw/section21-sysmon-validation-20261024/derived")
actual = root / "replay"
expected = root / "final-v2"
report = json.loads((actual / "validation.json").read_text())
assert report["passed"] and report["records"] == 8380
assert len(report["rules"]) == 3
for name in (
    "validation.json", "export-comparison.json", "field-coverage.json",
    "fixture-bindings.json", "events.jsonl", "sysmon.csv", "events.sqlite",
):
    assert (actual / name).read_bytes() == (expected / name).read_bytes(), name
```

For a new Kusto run, require `passed` and `roundtrip_passed` to be true, `rows_ingested` to equal 8,380, both hunts to be present and executed, and their returned counts to equal 60 and 8 with empty `missed` and `unexpected` lists. Engine/session metadata can differ between runs, so its complete report need not be byte-identical.

The package includes the unchanged rule/query dependencies needed for self-contained replay. Their individual archive identities remain in the original [detection bundle](../hermes-pymapper/README.md); no separate duplicate rule uploads accompany this supplement. The [Sigma files](../hermes-pymapper/network-host/sigma/lold_container_child.yml) and [KQL source](../hermes-pymapper/queries/sysmon_hunts.kql) retain their earlier bytes. Original malware Security/Procmon witnesses and network replays remain separate from these benign sensor tests.

VM disks, credentials, engine database storage and installer binaries are outside the compact archive. Recreating guest collection needs the separately retained clean lab prerequisites described in the included guide. Replaying the existing evidence does not require another collection run. The generated public `MANIFEST.json` verifies this guide and the unchanged archive.