verimetry 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,189 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, and trademark
102
+ notices from the Source form of the Work, excluding those
103
+ notices that do not pertain to any part of the Work; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Work, in at least one of the
110
+ following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or
112
+ documentation, if provided along with the Derivative Works; or,
113
+ within the display generated by the Derivative Works, if and
114
+ wherever such third-party notices normally appear. The contents
115
+ of the NOTICE file are for informational purposes only and
116
+ do not modify the License. You may add Your own attribution
117
+ notices within Derivative Works that You distribute, alongside
118
+ or as an addendum to the NOTICE file from the Work, provided
119
+ that such additional notices cannot be construed as modifying
120
+ the License.
121
+
122
+ You may add Your own copyright notice to Your modifications and
123
+ may provide additional or different license terms and conditions
124
+ for use, reproduction, or distribution of Your use, reproduction,
125
+ or distribution of Your modifications, or for any such Derivative
126
+ Works as a whole, provided Your use, reproduction, or distribution
127
+ of the Work otherwise complies with the License.
128
+
129
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
130
+ any Contribution intentionally submitted for inclusion in the Work
131
+ by You to the Licensor shall be under the terms and conditions of
132
+ this License, without any additional terms or conditions.
133
+ Notwithstanding the above, nothing herein shall supersede or modify
134
+ the terms of any separate license agreement that You may have executed
135
+ with Licensor regarding such Contributions.
136
+
137
+ 6. Trademarks. This License does not grant permission to use the trade
138
+ names, trademarks, service marks, or product names of the Licensor,
139
+ except as required for reasonable and customary use in describing the
140
+ origin of the Work and reproducing the content of the NOTICE file.
141
+
142
+ 7. Disclaimer of Warranty. Unless required by applicable law or
143
+ agreed to in writing, Licensor provides the Work (and each
144
+ Contributor provides its Contributions) on an "AS IS" BASIS,
145
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146
+ implied, including, without limitation, any warranties or conditions
147
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148
+ PARTICULAR PURPOSE. You are solely responsible for resolving the
149
+ appropriateness of using or redistributing the Work and assume any
150
+ risks associated with Your own execution of the Work.
151
+
152
+ 8. Limitation of Liability. In no event and under no legal theory,
153
+ whether in tort (including negligence), contract, or otherwise,
154
+ unless required by applicable law (such as deliberate and grossly
155
+ negligent acts) or agreed to in writing, shall any Contributor be
156
+ liable to You for damages, including any direct, indirect, special,
157
+ incidental, or consequential damages of any kind, arising as a
158
+ result of this License or out of the use or inability to use the
159
+ Work (including but not limited to damages for loss of goodwill,
160
+ work stoppage, computer failure or malfunction, or any and all
161
+ other commercial damages or losses), even if such Contributor
162
+ has been advised of the possibility of such damages.
163
+
164
+ 9. Accepting Warranty or Additional Liability. While redistributing
165
+ the Work or Derivative Works thereof, You may accept support,
166
+ acceptance of warranty, indemnity, or other liability obligations
167
+ and/or rights consistent with this License. However, in accepting
168
+ such obligations, You may act only on Your own behalf and on Your
169
+ own sole responsibility, and not on behalf of any other Contributor,
170
+ and only if You agree to indemnify, defend, and hold each Contributor
171
+ harmless for any liability incurred by, or claims asserted against,
172
+ such Contributor by reason of your accepting any such warranty or
173
+ additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ Copyright 2026 Verimetry Contributors
178
+
179
+ Licensed under the Apache License, Version 2.0 (the "License");
180
+ you may not use this file except in compliance with the License.
181
+ You may obtain a copy of the License at
182
+
183
+ http://www.apache.org/licenses/LICENSE-2.0
184
+
185
+ Unless required by applicable law or agreed to in writing, software
186
+ distributed under the License is distributed on an "AS IS" BASIS,
187
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
188
+ See the License for the specific language governing permissions and
189
+ limitations under the License.
verimetry-1.0.1/NOTICE ADDED
@@ -0,0 +1,9 @@
1
+ Verimetry
2
+ Copyright 2026 Verimetry Contributors
3
+
4
+ This product includes software developed for the Verimetry
5
+ evidence-gated telemetry assurance framework.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License").
8
+ Trademarks including "Verimetry" are not granted
9
+ under Section 6 of the Apache License, Version 2.0.
@@ -0,0 +1,12 @@
1
+ Metadata-Version: 2.4
2
+ Name: verimetry
3
+ Version: 1.0.1
4
+ Summary: Local-first, evidence-gated Windows Internals telemetry assurance with DSSE Ed25519 receipts
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.11
7
+ License-File: LICENSE
8
+ License-File: NOTICE
9
+ Requires-Dist: cryptography<48,>=42
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest>=8; extra == "dev"
12
+ Dynamic: license-file
@@ -0,0 +1,109 @@
1
+ # Verimetry — Evidence Before Assurance
2
+
3
+ ![Tests](https://img.shields.io/badge/tests-69%20passing-10b981?style=flat-square)
4
+ ![Python](https://img.shields.io/badge/python-3.11%2B-38bdf8?style=flat-square)
5
+ ![Runtime Dependencies](https://img.shields.io/badge/runtime%20deps-1%20(cryptography)-6366f1?style=flat-square)
6
+ ![Drivers](https://img.shields.io/badge/kernel%20drivers-0-10b981?style=flat-square)
7
+ ![Envelope](https://img.shields.io/badge/envelope-DSSE%20v1%20Ed25519-0ea5e9?style=flat-square)
8
+ ![License](https://img.shields.io/badge/license-Apache--2.0-10b981?style=flat-square)
9
+
10
+ **Local-first, zero-driver Windows Internals telemetry assurance with evidence-gated three-valued logic (`PASS`, `FAIL`, `INCONCLUSIVE`), offline-verifiable DSSE v1 Ed25519 receipts, locale-independent `advapi32!AuditQuerySystemPolicy` queries, and multi-run delta comparisons (`verimetry compare`).**
11
+
12
+ > **Why Verimetry exists:** According to *Mandiant M-Trends 2026*, organizations detect intrusions internally only **52%** of the time (**48%** learn from an external party) and median attacker hand-off time dropped to **22 seconds**, while *IBM's 2026 Cost of a Data Breach Report* puts average breach identification and containment at **247 days** (**\$4.99M**). On standard Windows builds, Event `4688` command-line logging, LSA registry SACLs (`T1547.005`), and cross-process handle auditing (`4656`/`4663`) are **off by default**—and domain Group Policy refreshes every **90 minutes**, silently creating telemetry drift without crashing any endpoint agent.
13
+
14
+ ---
15
+
16
+ ## Try It Now (30-Second Quickstart)
17
+
18
+ ### Option 1: Interactive Browser Sandbox (Zero Install)
19
+ Open [`docs/sandbox.html`](./docs/sandbox.html) (or GitHub Pages) to replay real Windows 11 (`Tha`) runs, switch **Customer View ↔ MSSP Operations View**, and trigger the live **DSSE SHA-256 / Ed25519 Tamper Trap**.
20
+
21
+ ### Option 2: Verify the Pre-Built DSSE v1 Sample Receipt & Golden Test Vectors Offline
22
+ ```bash
23
+ python3 -m pip install -e ".[dev]"
24
+ pytest -q # 69/69 tests passing (incl. test_vectors/)
25
+ python3 -m verimetry verify \
26
+ --receipt ./docs/sample-pack/sample-comparison-receipt.json \
27
+ --public ./docs/sample-pack/sample-signer.pub.pem \
28
+ --show
29
+ ```
30
+ Building a Go, Rust, or TypeScript verifier? See the 8 golden pass/fail DSSE conformance vectors in [`test_vectors/`](./test_vectors/README.md).
31
+
32
+ ---
33
+
34
+ ## 2-Minute Live Windows Test (Non-Elevated → Elevated Delta)
35
+
36
+ Run inside a disposable test VM or a Windows 10/11 / Server host you are authorized to assess. Use **`main`** (the GUI is not in the `v1.0.0` tag):
37
+
38
+ ```powershell
39
+ git clone https://github.com/thamas97/verimetry.git; cd verimetry
40
+ py -3 -m venv .venv; .\.venv\Scripts\Activate.ps1; python -m pip install -e .
41
+ ```
42
+
43
+ ### Track A — GUI (1-click, zero extra dependencies)
44
+ ```powershell
45
+ python -m verimetry gui
46
+ ```
47
+ **Step 1** *Run Non-Elevated Assess* (honest `INCONCLUSIVE` gates) → **Step 2** *Relaunch as Administrator (UAC)* → *Run Elevated Assess & Compare* (+ dual-persona HTML report) → **Step 3** *Verify Offline* / *Test Tamper Trap* → *Copy Anonymized Summary for Issue #1*. Full walkthrough: [`docs/live-test-guide.md`](./docs/live-test-guide.md).
48
+
49
+ ### Track B — PowerShell CLI
50
+ - **Step 1 (Standard user, zero risk):** generate a keypair and run `assess` non-elevated; privilege-gated checks cleanly output `INCONCLUSIVE` instead of fabricating `FAIL`s or crashing.
51
+ - **Step 2 (Elevated, test VM / lab host):** run `assess` as Administrator, `compare` against Step 1 (`--public` is required with an external `--key`), then `verify` the offline DSSE v1 receipt.
52
+
53
+ ```powershell
54
+ # Step 1 (Standard user, zero risk — observe honest INCONCLUSIVE gates):
55
+ python -m verimetry keygen --private .\verimetry-key.pem
56
+ python -m verimetry assess --out .\evidence --key .\verimetry-key.pem
57
+
58
+ # Step 2 (Elevated Administrator PowerShell on a test VM or lab host):
59
+ python -m verimetry assess --out .\evidence-elevated --key .\verimetry-key.pem
60
+ python -m verimetry compare --before .\evidence --after .\evidence-elevated --out .\evidence-comparison --key .\verimetry-key.pem --public .\verimetry-key.pub.pem
61
+ python -m verimetry verify --receipt .\evidence-comparison\comparison-receipt.json --public .\verimetry-key.pub.pem --show
62
+ ```
63
+
64
+ > **Safety & privacy guarantee:** Verimetry is strictly read-only, installs `0` kernel drivers or daemons, makes `0` host mutations, has a single runtime dependency (`cryptography`; the GUI uses only stdlib `tkinter`), and one-way hashes local host identifiers into `host_fingerprint_sha256`. Report results and edge cases (localized OS, third-party EDR, nested VM) in the [pinned Live Fleet Test issue #1](https://github.com/thamas97/verimetry/issues/1) — strip hostnames first.
65
+
66
+ ---
67
+
68
+ ## Real Windows 11 Empirical Result (Host: `Tha`)
69
+
70
+ | Assessment Run | `PASS` | `FAIL` | `INCONCLUSIVE` | Key Finding |
71
+ | :--- | :---: | :---: | :---: | :--- |
72
+ | **Non-Elevated (`.\evidence`)** | `1/5` (`20%`) | `0` | `4/5` | Confirmed `WIN-KERNEL-PPL-HVCI = PASS`; gated 4 privilege-dependent checks as `INCONCLUSIVE` (**0 fabricated failures**). |
73
+ | **Elevated Admin (`.\evidence-elevated`)** | `1/5` (`20%`) | `2/5` | `2/5` | **50% `INCONCLUSIVE` burn-down** (`4 -> 2`); exposed **2 genuine blind spots**: inactive `DiagTrack-Listener` ETW (`T1562.006`) and missing LSA Registry auditing/SACLs (`T1547.005`), while keeping unconfigured `4688` & Handle policies accurately gated as `INCONCLUSIVE`. |
74
+
75
+ Open [`docs/sample-comparison-report.html`](./docs/sample-comparison-report.html) to inspect the signed **Customer View** and **MSSP Operations View** generated from this exact transition.
76
+
77
+ ---
78
+
79
+ ## Core Architecture: 5 Live Canaries + 7 `T1685` Scenarios
80
+
81
+ ### 5 Live Windows Internals Canaries (`verimetry assess`)
82
+ 1. **`WIN-ETW-INTEGRITY`** (`T1562.006`) — Enumerates active ETW sessions (`EventLog-System`, `DiagTrack-Listener`) and verifies delivery of a benign marker in the `Application` log.
83
+ 2. **`WIN-KERNEL-PPL-HVCI`** (`T1068` / `T1562.001`) — Inspects `Win32_DeviceGuard` (VBS/HVCI), `HKLM\...\Control\Lsa\RunAsPPL`, and `CodeIntegrity/Operational` log readability.
84
+ 3. **`WIN-XPROC-HANDLE`** (`T1106` / `T1055`) — Opens a strictly read-only `PROCESS_QUERY_LIMITED_INFORMATION (0x1000)` handle via `kernel32.OpenProcess` to a harmless child process and checks Security Event `4656`/`4663`.
85
+ 4. **`WIN-LSA-SSP-AUDIT`** (`T1547.005`) — Read-only inspection of `HKLM\...\Control\Lsa` (`Security Packages`, `RunAsPPL`), Registry SACLs (`SeSecurityPrivilege`), and `Audit Registry` policy.
86
+ 5. **`WIN-CMDLINE-WMI`** (`T1047`) — Runs `cmd.exe /d /c echo VERIMETRY_CANARY_PING` + read-only WMI query, verifying Event `4688` command-line capture (`ProcessCreationIncludeCmdLine_Enabled`) and `WMI-Activity/Operational` readability.
87
+
88
+ ### 7 Structured `T1685` (Disable or Modify Tools) Assurance Scenarios (`demo --suite t1685`)
89
+ Deterministic rules, NIST SP 800-53 OSCAL mappings, dual-persona playbooks, and synthetic fixtures are implemented for `T1685.001` (EDR/Minifilter DACLs), `T1685.002` (Cloud/Hybrid Audit Log Pipeline), `T1685.003` (`ntdll!NtTraceEvent` ETW Syscall Stubs), `T1685.004` (Host Firewall & WFP Filters), `T1685.005` (NTFS USN Journal & `.evtx` Monotonicity), `T1685.006` (VBS / VTL 1 BCD Downgrade Drift), and `T1685.007` (Safe Mode Boot Tampering). See [`docs/architecture.md`](./docs/architecture.md).
90
+
91
+ ---
92
+
93
+ ## Non-Destructive Guarantee & Explicit Boundaries
94
+
95
+ - **Zero host mutations:** `inspect`, `assess`, `compare`, and `verify` never modify registry keys, audit policies, firewall rules, or BCD entries, and install `0` kernel drivers or background daemons.
96
+ - **Scoped point-in-time proof:** A `PASS` receipt covers only its recorded bounded observation window—not comprehensive endpoint security or formal compliance certification.
97
+ - **Local trust boundary:** Local collection and Ed25519 signing share a host trust boundary. Signatures verify post-collection integrity and deterministic rule evaluation; pin `.pub.pem` keys out-of-band in production.
98
+ - **Experimental OSCAL:** `oscal-draft.json` is an experimental NIST SP 800-53 Rev.5 mapping and is not schema-validated OSCAL.
99
+ - **Synthetic transparency:** `demo` receipts are always marked `"mode": "simulation"` and `"simulated": true`.
100
+
101
+ ---
102
+
103
+ ## Open Roadmap (`good first issue` Contributors Welcome)
104
+
105
+ - [ ] Wire live `OpenSCManagerW` / `fltmc` collector in `verimetry/windows.py` for `WIN-T1685-001-EDR-MINIFILTER`
106
+ - [ ] Wire live `FSCTL_QUERY_USN_JOURNAL` continuity collector for `WIN-T1685-005-USN-EVTX`
107
+ - [ ] Wire live `bcdedit /enum {current}` VTL 1 & SafeBoot drift collectors for `WIN-T1685-006` & `WIN-T1685-007`
108
+
109
+ License: [Apache-2.0](./LICENSE) ([NOTICE](./NOTICE)) · Security Policy: [SECURITY.md](./SECURITY.md)
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+ [project]
5
+ name = "verimetry"
6
+ version = "1.0.1"
7
+ description = "Local-first, evidence-gated Windows Internals telemetry assurance with DSSE Ed25519 receipts"
8
+ license = "Apache-2.0"
9
+ requires-python = ">=3.11"
10
+ dependencies = ["cryptography>=42,<48"]
11
+ [project.optional-dependencies]
12
+ dev = ["pytest>=8"]
13
+ [project.scripts]
14
+ verimetry = "verimetry.cli:main"
15
+ verimetry-gui = "verimetry.gui:main"
16
+ [tool.setuptools.packages.find]
17
+ include = ["verimetry*"]
18
+ [tool.pytest.ini_options]
19
+ addopts = "--basetemp=.pytest_tmp"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+