targetzero 0.3.2__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.
Files changed (67) hide show
  1. targetzero-0.3.2/.gitignore +41 -0
  2. targetzero-0.3.2/LICENSE +202 -0
  3. targetzero-0.3.2/NOTICE +7 -0
  4. targetzero-0.3.2/PKG-INFO +116 -0
  5. targetzero-0.3.2/README.md +82 -0
  6. targetzero-0.3.2/config/approved_exposure.example.csv +4 -0
  7. targetzero-0.3.2/config/privileged_roles.yaml +50 -0
  8. targetzero-0.3.2/config/targetzero.example.yaml +57 -0
  9. targetzero-0.3.2/pyproject.toml +92 -0
  10. targetzero-0.3.2/python/targetzero/__init__.py +4 -0
  11. targetzero-0.3.2/python/targetzero/__main__.py +6 -0
  12. targetzero-0.3.2/python/targetzero/admins.py +109 -0
  13. targetzero-0.3.2/python/targetzero/cli.py +366 -0
  14. targetzero-0.3.2/python/targetzero/common/__init__.py +2 -0
  15. targetzero-0.3.2/python/targetzero/common/changes.py +46 -0
  16. targetzero-0.3.2/python/targetzero/common/config.py +83 -0
  17. targetzero-0.3.2/python/targetzero/common/ids.py +17 -0
  18. targetzero-0.3.2/python/targetzero/common/output.py +91 -0
  19. targetzero-0.3.2/python/targetzero/common/resources.py +32 -0
  20. targetzero-0.3.2/python/targetzero/common/roles.py +24 -0
  21. targetzero-0.3.2/python/targetzero/common/schema.py +45 -0
  22. targetzero-0.3.2/python/targetzero/external/__init__.py +2 -0
  23. targetzero-0.3.2/python/targetzero/external/dangling.py +106 -0
  24. targetzero-0.3.2/python/targetzero/external/discover.py +181 -0
  25. targetzero-0.3.2/python/targetzero/external/dnsinfo.py +54 -0
  26. targetzero-0.3.2/python/targetzero/external/enrich.py +137 -0
  27. targetzero-0.3.2/python/targetzero/external/http.py +33 -0
  28. targetzero-0.3.2/python/targetzero/external/kev.py +222 -0
  29. targetzero-0.3.2/python/targetzero/external/ports.py +63 -0
  30. targetzero-0.3.2/python/targetzero/external/scan.py +260 -0
  31. targetzero-0.3.2/python/targetzero/external/scope.py +54 -0
  32. targetzero-0.3.2/python/targetzero/external/waf.py +202 -0
  33. targetzero-0.3.2/python/targetzero/external/web.py +124 -0
  34. targetzero-0.3.2/python/targetzero/gws/__init__.py +2 -0
  35. targetzero-0.3.2/python/targetzero/gws/admins.py +230 -0
  36. targetzero-0.3.2/python/targetzero/gws/changes.py +190 -0
  37. targetzero-0.3.2/python/targetzero/gws/client.py +94 -0
  38. targetzero-0.3.2/python/targetzero/gws/domains.py +36 -0
  39. targetzero-0.3.2/python/targetzero/registers/__init__.py +2 -0
  40. targetzero-0.3.2/python/targetzero/registers/exceptions.py +85 -0
  41. targetzero-0.3.2/python/targetzero/registers/findings.py +108 -0
  42. targetzero-0.3.2/python/targetzero/registers/inventory.py +142 -0
  43. targetzero-0.3.2/python/targetzero/registers/manual_admins.py +43 -0
  44. targetzero-0.3.2/python/targetzero/scorecard/__init__.py +2 -0
  45. targetzero-0.3.2/python/targetzero/scorecard/scorecard.py +201 -0
  46. targetzero-0.3.2/python/targetzero/vendors/__init__.py +2 -0
  47. targetzero-0.3.2/python/targetzero/vendors/cisco_asa.py +151 -0
  48. targetzero-0.3.2/python/targetzero/vendors/common.py +84 -0
  49. targetzero-0.3.2/python/targetzero/vendors/fortigate.py +176 -0
  50. targetzero-0.3.2/python/targetzero/vendors/panos.py +141 -0
  51. targetzero-0.3.2/python/targetzero/vendors/redfish.py +124 -0
  52. targetzero-0.3.2/python/targetzero/vendors/vsphere.py +108 -0
  53. targetzero-0.3.2/python/tests/fixtures/README.md +2 -0
  54. targetzero-0.3.2/schema/admins.schema.json +27 -0
  55. targetzero-0.3.2/schema/alert_tests.schema.json +19 -0
  56. targetzero-0.3.2/schema/config.schema.json +71 -0
  57. targetzero-0.3.2/schema/exceptions.schema.json +20 -0
  58. targetzero-0.3.2/schema/findings.schema.json +23 -0
  59. targetzero-0.3.2/schema/inventory.schema.json +26 -0
  60. targetzero-0.3.2/schema/summary.schema.json +36 -0
  61. targetzero-0.3.2/templates/alert_tests.csv +1 -0
  62. targetzero-0.3.2/templates/exceptions.csv +1 -0
  63. targetzero-0.3.2/templates/findings.csv +1 -0
  64. targetzero-0.3.2/templates/inventory.csv +1 -0
  65. targetzero-0.3.2/templates/manual_admins.csv +1 -0
  66. targetzero-0.3.2/templates/origins.csv +1 -0
  67. targetzero-0.3.2/templates/recovery_page.md +51 -0
@@ -0,0 +1,41 @@
1
+ # Your own data: never commit it.
2
+ /targetzero.yaml
3
+ /config/targetzero.yaml
4
+ /privileged_roles.local.yaml
5
+ /output/
6
+ /registers/
7
+ *.pfx
8
+ *.pem
9
+ *.key
10
+ credentials*.json
11
+ client_secret*.json
12
+ service-account*.json
13
+
14
+ # Campaign source documents kept next to the repo
15
+ /Target 0.md
16
+ /Target 0.pdf
17
+ /TOOLING-PLAN.md
18
+
19
+ # Python
20
+ __pycache__/
21
+ *.py[cod]
22
+ .venv/
23
+ *.egg-info/
24
+ dist/
25
+ build/
26
+ .pytest_cache/
27
+ .mypy_cache/
28
+ .ruff_cache/
29
+
30
+ # PowerShell / Pester
31
+ /powershell/TargetZero/schemas/
32
+ /powershell/TargetZero/config/
33
+ /powershell/TargetZero/LICENSE
34
+ /powershell/TargetZero/NOTICE
35
+ testResults.xml
36
+ coverage.xml
37
+
38
+ # OS / editors
39
+ .DS_Store
40
+ .idea/
41
+ .vscode/
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,7 @@
1
+ TargetZero
2
+ Copyright 2026 Wire Security
3
+
4
+ This product includes software developed at Wire Security.
5
+ The software is licensed under the Apache License, Version 2.0 (see LICENSE).
6
+ The Target 0 document (TargetZero.pdf) is licensed under the Creative Commons
7
+ Attribution 4.0 International licence (see LICENSE-DOCS).
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.5
2
+ Name: targetzero
3
+ Version: 0.3.2
4
+ Summary: Tooling for the Target 0 campaign: count, fix and report seven security zeros.
5
+ Project-URL: Homepage, https://github.com/wiresecurity/TargetZero
6
+ Project-URL: Issues, https://github.com/wiresecurity/TargetZero/issues
7
+ Author: Wire Security
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Security
14
+ Classifier: Topic :: System :: Systems Administration
15
+ Requires-Python: >=3.11
16
+ Requires-Dist: defusedxml>=0.7.1
17
+ Requires-Dist: dnspython>=2.6
18
+ Requires-Dist: jsonschema>=4.21
19
+ Requires-Dist: pyyaml>=6.0
20
+ Provides-Extra: dev
21
+ Requires-Dist: mypy>=1.11; extra == 'dev'
22
+ Requires-Dist: pytest>=8; extra == 'dev'
23
+ Requires-Dist: ruff>=0.6; extra == 'dev'
24
+ Requires-Dist: types-defusedxml; extra == 'dev'
25
+ Requires-Dist: types-jsonschema; extra == 'dev'
26
+ Requires-Dist: types-pyyaml; extra == 'dev'
27
+ Provides-Extra: gws
28
+ Requires-Dist: google-api-python-client>=2.130; extra == 'gws'
29
+ Requires-Dist: google-auth-oauthlib>=1.2; extra == 'gws'
30
+ Requires-Dist: google-auth>=2.30; extra == 'gws'
31
+ Provides-Extra: vsphere
32
+ Requires-Dist: pyvmomi>=8.0.2; extra == 'vsphere'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # TargetZero
36
+
37
+ Tooling for **Target 0**: seven security counts, each brought to zero within 15 days. Anything that cannot reach zero becomes a signed, dated exception.
38
+
39
+ | # | Target |
40
+ | --- | --- |
41
+ | 1 | Admin accounts with full, permanent access |
42
+ | 2 | Admin accounts without MFA |
43
+ | 3 | Admin accounts not monitored |
44
+ | 4 | Public IPs not behind a firewall, WAF or CDN |
45
+ | 5 | Public IPs without a technology inventory |
46
+ | 6 | Public IPs or domains with known vulnerabilities past deadline |
47
+ | 7 | Internet-facing applications without a tested recovery plan |
48
+
49
+ TargetZero counts each one from live data, helps you fix what it finds on Microsoft 365 and Google Workspace, and fills in the scorecard. It is built for small IT teams: no SIEM, no extra licences, CSV and JSON output.
50
+
51
+ > **Status: 0.3 (remediate).** Day 1 inventories plus the changes for days 6 to 10: reduce admin rights, break-glass accounts and Conditional Access on Microsoft 365, role and org unit changes on Google Workspace, WAF/CDN, dangling-DNS and enrichment checks, and collectors for Cisco ASA, iDRAC/iLO and vSphere. See [CHANGELOG.md](CHANGELOG.md).
52
+
53
+ **New to this? Start with the [step-by-step guide](docs/guide.md).** It assumes no technical background and explains what you need and what to be careful about.
54
+
55
+ ## How it works
56
+
57
+ ```
58
+ M365 / Entra ID ─ PowerShell ─┐
59
+ Google Workspace ─ Python ─────┤ output/<date>/<zero>_<source>_<name>.csv records
60
+ External checks ─ Python ─────┼─▶ output/<date>/<zero>_<source>_<name>.summary.json counts
61
+ Vendor devices ─ Python ─────┤ │
62
+ Registers (CSV, by hand) ──────┘ ▼
63
+ targetzero scorecard ─▶ scorecard.csv / .json, history.csv
64
+ ```
65
+
66
+ - **Microsoft stack in PowerShell, everything else in Python.**
67
+ - **Read-only by default.** Change scripts follow *plan → review → apply* and run as a dry run unless you pass `-Apply` / `--apply`.
68
+ - **One output contract.** Any tool can feed the scorecard by writing a valid summary; see [docs/output-contract.md](docs/output-contract.md).
69
+ - **No data leaves your machine** except calls to the platform APIs, your own systems and public reference data.
70
+
71
+ ## Quick start
72
+
73
+ Requirements: Python 3.11+ and, for the Microsoft scripts, PowerShell 7.4+.
74
+
75
+ ```bash
76
+ pip install -e . # from a clone; "pip install targetzero" once published
77
+ mkdir my-target0 && cd my-target0
78
+ targetzero init # creates targetzero.yaml and registers/
79
+ # edit targetzero.yaml: organisation, owners, break-glass accounts, scope
80
+ targetzero scorecard # builds the scorecard from today's results
81
+ ```
82
+
83
+ See [docs/quickstart.md](docs/quickstart.md) for the full walk-through.
84
+
85
+ ## What it checks and changes (0.3)
86
+
87
+ | Zero | Microsoft 365 (PowerShell) | Google Workspace (Python) | Devices and internet (Python) |
88
+ | --- | --- | --- | --- |
89
+ | 1, 2 | `Invoke-T0M365AdminInventory` | `targetzero gws admins` | `targetzero vendors fortigate\|panos\|asa FILE...`, `vendors redfish\|vsphere --host`, `registers manual-admins` |
90
+ | 1, 2 changes | `Set-T0M365RoleAssignment`, `New-T0M365BreakGlassAccount`, `New-T0M365AdminCaPolicy` | `targetzero gws apply PLAN` | |
91
+ | 3 | | | `registers/alert_tests.csv` (by hand) |
92
+ | 4 | | | `targetzero external scan --authorised`, `external waf`, vendor collectors |
93
+ | 5 | `Get-T0M365Domain` | `targetzero gws domains` | `targetzero external discover`, `external enrich`, `external dangling-dns`, `registers inventory` |
94
+ | 6 | | | `targetzero external kev`, `targetzero registers findings` |
95
+ | 7 | | | `registers/recovery/` (by hand) |
96
+
97
+ Then `targetzero scorecard` combines everything. Setup per platform: [Microsoft 365](docs/setup-m365.md), [Google Workspace](docs/setup-gws.md), [external checks](docs/external.md), [vendor collectors](docs/vendors.md).
98
+
99
+ Other commands: `targetzero init` (set up a working folder), `targetzero validate FILE...` (check summaries and registers against the schemas).
100
+
101
+ ## The Target 0 document
102
+
103
+ The campaign itself, with the reasoning, the 15-day plan and the scorecard, is in [TargetZero.pdf](TargetZero.pdf). You may share and adapt it under [CC BY 4.0](LICENSE-DOCS), with credit to Wire Security.
104
+
105
+ ## Legal
106
+
107
+ Scan and inventory only systems you own or are authorised to assess. You are responsible for the changes you apply with this tooling; review every plan before applying it.
108
+
109
+ ## Licence
110
+
111
+ Copyright 2026 Wire Security.
112
+
113
+ - Code, schemas, templates and technical docs: [Apache License, Version 2.0](LICENSE).
114
+ - The Target 0 document (`TargetZero.pdf`): [Creative Commons Attribution 4.0 International](LICENSE-DOCS).
115
+
116
+ Security issues: see [SECURITY.md](SECURITY.md). Contributions: see [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,82 @@
1
+ # TargetZero
2
+
3
+ Tooling for **Target 0**: seven security counts, each brought to zero within 15 days. Anything that cannot reach zero becomes a signed, dated exception.
4
+
5
+ | # | Target |
6
+ | --- | --- |
7
+ | 1 | Admin accounts with full, permanent access |
8
+ | 2 | Admin accounts without MFA |
9
+ | 3 | Admin accounts not monitored |
10
+ | 4 | Public IPs not behind a firewall, WAF or CDN |
11
+ | 5 | Public IPs without a technology inventory |
12
+ | 6 | Public IPs or domains with known vulnerabilities past deadline |
13
+ | 7 | Internet-facing applications without a tested recovery plan |
14
+
15
+ TargetZero counts each one from live data, helps you fix what it finds on Microsoft 365 and Google Workspace, and fills in the scorecard. It is built for small IT teams: no SIEM, no extra licences, CSV and JSON output.
16
+
17
+ > **Status: 0.3 (remediate).** Day 1 inventories plus the changes for days 6 to 10: reduce admin rights, break-glass accounts and Conditional Access on Microsoft 365, role and org unit changes on Google Workspace, WAF/CDN, dangling-DNS and enrichment checks, and collectors for Cisco ASA, iDRAC/iLO and vSphere. See [CHANGELOG.md](CHANGELOG.md).
18
+
19
+ **New to this? Start with the [step-by-step guide](docs/guide.md).** It assumes no technical background and explains what you need and what to be careful about.
20
+
21
+ ## How it works
22
+
23
+ ```
24
+ M365 / Entra ID ─ PowerShell ─┐
25
+ Google Workspace ─ Python ─────┤ output/<date>/<zero>_<source>_<name>.csv records
26
+ External checks ─ Python ─────┼─▶ output/<date>/<zero>_<source>_<name>.summary.json counts
27
+ Vendor devices ─ Python ─────┤ │
28
+ Registers (CSV, by hand) ──────┘ ▼
29
+ targetzero scorecard ─▶ scorecard.csv / .json, history.csv
30
+ ```
31
+
32
+ - **Microsoft stack in PowerShell, everything else in Python.**
33
+ - **Read-only by default.** Change scripts follow *plan → review → apply* and run as a dry run unless you pass `-Apply` / `--apply`.
34
+ - **One output contract.** Any tool can feed the scorecard by writing a valid summary; see [docs/output-contract.md](docs/output-contract.md).
35
+ - **No data leaves your machine** except calls to the platform APIs, your own systems and public reference data.
36
+
37
+ ## Quick start
38
+
39
+ Requirements: Python 3.11+ and, for the Microsoft scripts, PowerShell 7.4+.
40
+
41
+ ```bash
42
+ pip install -e . # from a clone; "pip install targetzero" once published
43
+ mkdir my-target0 && cd my-target0
44
+ targetzero init # creates targetzero.yaml and registers/
45
+ # edit targetzero.yaml: organisation, owners, break-glass accounts, scope
46
+ targetzero scorecard # builds the scorecard from today's results
47
+ ```
48
+
49
+ See [docs/quickstart.md](docs/quickstart.md) for the full walk-through.
50
+
51
+ ## What it checks and changes (0.3)
52
+
53
+ | Zero | Microsoft 365 (PowerShell) | Google Workspace (Python) | Devices and internet (Python) |
54
+ | --- | --- | --- | --- |
55
+ | 1, 2 | `Invoke-T0M365AdminInventory` | `targetzero gws admins` | `targetzero vendors fortigate\|panos\|asa FILE...`, `vendors redfish\|vsphere --host`, `registers manual-admins` |
56
+ | 1, 2 changes | `Set-T0M365RoleAssignment`, `New-T0M365BreakGlassAccount`, `New-T0M365AdminCaPolicy` | `targetzero gws apply PLAN` | |
57
+ | 3 | | | `registers/alert_tests.csv` (by hand) |
58
+ | 4 | | | `targetzero external scan --authorised`, `external waf`, vendor collectors |
59
+ | 5 | `Get-T0M365Domain` | `targetzero gws domains` | `targetzero external discover`, `external enrich`, `external dangling-dns`, `registers inventory` |
60
+ | 6 | | | `targetzero external kev`, `targetzero registers findings` |
61
+ | 7 | | | `registers/recovery/` (by hand) |
62
+
63
+ Then `targetzero scorecard` combines everything. Setup per platform: [Microsoft 365](docs/setup-m365.md), [Google Workspace](docs/setup-gws.md), [external checks](docs/external.md), [vendor collectors](docs/vendors.md).
64
+
65
+ Other commands: `targetzero init` (set up a working folder), `targetzero validate FILE...` (check summaries and registers against the schemas).
66
+
67
+ ## The Target 0 document
68
+
69
+ The campaign itself, with the reasoning, the 15-day plan and the scorecard, is in [TargetZero.pdf](TargetZero.pdf). You may share and adapt it under [CC BY 4.0](LICENSE-DOCS), with credit to Wire Security.
70
+
71
+ ## Legal
72
+
73
+ Scan and inventory only systems you own or are authorised to assess. You are responsible for the changes you apply with this tooling; review every plan before applying it.
74
+
75
+ ## Licence
76
+
77
+ Copyright 2026 Wire Security.
78
+
79
+ - Code, schemas, templates and technical docs: [Apache License, Version 2.0](LICENSE).
80
+ - The Target 0 document (`TargetZero.pdf`): [Creative Commons Attribution 4.0 International](LICENSE-DOCS).
81
+
82
+ Security issues: see [SECURITY.md](SECURITY.md). Contributions: see [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,4 @@
1
+ host,port,protocol,justification,owner,approved_by,review_date
2
+ www.example.com,443,tcp,Public website behind CDN,Jane Doe,John Smith (CEO),2027-02-19
3
+ vpn.example.com,443,tcp,SSL VPN for remote staff (MFA enforced),Jane Doe,John Smith (CEO),2027-02-19
4
+ mail.example.com,25,tcp,Inbound mail relay,Jane Doe,John Smith (CEO),2027-02-19
@@ -0,0 +1,50 @@
1
+ # Roles that count as "full admin" for Zero 1 and Zero 2.
2
+ # Roles not listed here are still reported, with privileged = N.
3
+ # Change this list to match your own risk view; keep the names exactly as the
4
+ # platform shows them.
5
+
6
+ m365:
7
+ # Entra ID built-in roles (display names)
8
+ - Global Administrator
9
+ - Privileged Role Administrator
10
+ - Privileged Authentication Administrator
11
+ - Security Administrator
12
+ - Conditional Access Administrator
13
+ - Exchange Administrator
14
+ - SharePoint Administrator
15
+ - Teams Administrator
16
+ - User Administrator
17
+ - Authentication Administrator
18
+ - Application Administrator
19
+ - Cloud Application Administrator
20
+ - Intune Administrator
21
+ - Hybrid Identity Administrator
22
+ - Domain Name Administrator
23
+ - Partner Tier2 Support
24
+ - Directory Synchronization Accounts
25
+
26
+ # Microsoft Graph application permissions that give an app admin-level power.
27
+ # Apps holding one of these are reported as hidden admins (account_type = service).
28
+ m365_app_permissions:
29
+ - RoleManagement.ReadWrite.Directory
30
+ - AppRoleAssignment.ReadWrite.All
31
+ - Application.ReadWrite.All
32
+ - Directory.ReadWrite.All
33
+ - User.ReadWrite.All
34
+ - Group.ReadWrite.All
35
+ - UserAuthenticationMethod.ReadWrite.All
36
+ - Policy.ReadWrite.ConditionalAccess
37
+ - Domain.ReadWrite.All
38
+ - Mail.ReadWrite
39
+ - Mail.Send
40
+ - Files.ReadWrite.All
41
+ - Sites.FullControl.All
42
+ - Sites.ReadWrite.All
43
+
44
+ gws:
45
+ # Google Workspace system roles
46
+ - Super Admin
47
+ - Groups Admin
48
+ - User Management Admin
49
+ - Services Admin
50
+ - Mobile Admin
@@ -0,0 +1,57 @@
1
+ # TargetZero configuration.
2
+ # Copy this file to targetzero.yaml (which git ignores) and fill it in.
3
+ # Relative paths are resolved against the folder that holds this file.
4
+
5
+ organisation: Example Ltd
6
+
7
+ # Where scripts write their results (output/<YYYY-MM-DD>/...) and where the
8
+ # hand-maintained registers live (inventory, findings, exceptions, ...).
9
+ output_dir: output
10
+ registers_dir: registers
11
+
12
+ # One owner per Target 0 count. Shown on the scorecard.
13
+ owners:
14
+ "1": "Jane Doe, IT lead"
15
+ "2": "Jane Doe, IT lead"
16
+ "3": "Managed SOC / IT provider"
17
+ "4": "Jane Doe, IT lead"
18
+ "5": "Jane Doe, IT lead"
19
+ "6": "Jane Doe, IT lead"
20
+ "7": "Application owners"
21
+
22
+ # Emergency ("break-glass") accounts. Never changed by any script and left
23
+ # out of the Zero 1 count. Keep exactly two per platform.
24
+ break_glass:
25
+ m365:
26
+ - bg-admin-01@example.onmicrosoft.com
27
+ - bg-admin-02@example.onmicrosoft.com
28
+ gws:
29
+ - bg-admin-01@example.com
30
+ - bg-admin-02@example.com
31
+
32
+ # What you own and are authorised to scan. External checks never go outside
33
+ # this list, not even for hosts they discover themselves.
34
+ scope:
35
+ domains:
36
+ - example.com
37
+ ip_ranges:
38
+ - 203.0.113.0/28 # documentation range, replace with your own
39
+
40
+ thresholds:
41
+ exception_max_days: 90 # Target 0: at most 90 days
42
+ inventory_review_days: 90 # inventory rows older than this count as outdated
43
+ alert_test_max_age_days: 35 # monthly test, with a few days of slack
44
+ deadline_hours:
45
+ kev: 8
46
+ critical: 24
47
+ high: 72
48
+
49
+ m365:
50
+ tenant_id: "" # e.g. example.onmicrosoft.com or the tenant GUID
51
+ client_id: "" # only for unattended runs
52
+ certificate_thumbprint: ""
53
+
54
+ gws:
55
+ customer_id: my_customer
56
+ admin_subject: "" # admin account to impersonate
57
+ credentials_file: "" # keep outside the repository
@@ -0,0 +1,92 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.25"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "targetzero"
7
+ version = "0.3.2"
8
+ description = "Tooling for the Target 0 campaign: count, fix and report seven security zeros."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ license-files = ["LICENSE", "NOTICE"]
12
+ authors = [{ name = "Wire Security" }]
13
+ requires-python = ">=3.11"
14
+ dependencies = [
15
+ "PyYAML>=6.0",
16
+ "jsonschema>=4.21",
17
+ "dnspython>=2.6",
18
+ "defusedxml>=0.7.1",
19
+ ]
20
+ classifiers = [
21
+ "Programming Language :: Python :: 3",
22
+ "Operating System :: OS Independent",
23
+ "Topic :: Security",
24
+ "Topic :: System :: Systems Administration",
25
+ ]
26
+
27
+ [project.optional-dependencies]
28
+ gws = [
29
+ "google-api-python-client>=2.130",
30
+ "google-auth>=2.30",
31
+ "google-auth-oauthlib>=1.2",
32
+ ]
33
+ vsphere = [
34
+ "pyvmomi>=8.0.2",
35
+ ]
36
+ dev = [
37
+ "pytest>=8",
38
+ "ruff>=0.6",
39
+ "mypy>=1.11",
40
+ "types-PyYAML",
41
+ "types-jsonschema",
42
+ "types-defusedxml",
43
+ ]
44
+
45
+ [project.scripts]
46
+ targetzero = "targetzero.cli:main"
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/wiresecurity/TargetZero"
50
+ Issues = "https://github.com/wiresecurity/TargetZero/issues"
51
+
52
+ [tool.hatch.build.targets.wheel]
53
+ packages = ["python/targetzero"]
54
+
55
+ [tool.hatch.build.targets.wheel.force-include]
56
+ "schema" = "targetzero/schemas"
57
+ "templates" = "targetzero/templates"
58
+ "config/targetzero.example.yaml" = "targetzero/config/targetzero.example.yaml"
59
+ "config/approved_exposure.example.csv" = "targetzero/config/approved_exposure.example.csv"
60
+ "config/privileged_roles.yaml" = "targetzero/config/privileged_roles.yaml"
61
+
62
+ [tool.hatch.build.targets.sdist]
63
+ include = ["python/targetzero", "schema", "templates", "config/*.example.*", "config/privileged_roles.yaml", "README.md", "LICENSE", "NOTICE"]
64
+
65
+ [tool.pytest.ini_options]
66
+ testpaths = ["python/tests"]
67
+
68
+ [tool.ruff]
69
+ line-length = 100
70
+ target-version = "py311"
71
+ src = ["python"]
72
+
73
+ [tool.ruff.lint]
74
+ select = ["E", "F", "W", "I", "B", "UP", "S", "RUF"]
75
+
76
+ [tool.ruff.lint.per-file-ignores]
77
+ "python/tests/*" = ["S101"]
78
+
79
+ [tool.mypy]
80
+ python_version = "3.11"
81
+ strict = true
82
+ mypy_path = "python"
83
+ packages = ["targetzero"]
84
+
85
+ [[tool.mypy.overrides]]
86
+ module = ["googleapiclient.*", "google_auth_oauthlib.*", "pyVim.*", "pyVmomi.*"]
87
+ ignore_missing_imports = true
88
+
89
+ [[tool.mypy.overrides]]
90
+ # pyvmomi has no type information.
91
+ module = ["targetzero.vendors.vsphere"]
92
+ disallow_untyped_calls = false
@@ -0,0 +1,4 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ """TargetZero: tooling for the Target 0 campaign."""
3
+
4
+ __version__ = "0.3.2"
@@ -0,0 +1,6 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ import sys
3
+
4
+ from targetzero.cli import main
5
+
6
+ sys.exit(main())