Threat model¶
Status: current for 0.1.1. This model covers the file readers, the report writers, the PowerShell collector, and remote collection. Review it whenever an input format, output format, collection method, or dependency changes. The collectors have not yet been run against a real domain controller or a real WinRM endpoint, so the controls that concern them are tested against simulations only. See Limitations.
What the tool protects¶
The operator’s data. Event logs hold account names, SIDs, group memberships, addresses, and the times of administrative actions. Reports and collection files hold the same details.
Credentials. Remote collection needs an account that can open a remoting session and read the Security log. Its password must not leak.
The domain controllers. Collection must never change them, and the account it uses must not be more powerful than needed.
The integrity of results. Reviewers and assessors rely on the account as evidence. An account that hides a gap is worse than one that is short.
The operator’s machine. The tool processes files and network replies that may come from systems the operator does not fully trust.
The supply chain. Users install release artifacts built by this project’s pipeline, and run a script from them on domain controllers.
Trust boundaries¶
Input files enter the tool. They are untrusted: native logs, XML, JSON, CSV, and collection files. This includes a file that a collector wrote, because the controller it came from may be compromised.
The remote collection channel carries the collector script to a domain controller and event lines back to the operator’s machine. Replies are untrusted.
The domain controller runs the collector script. It reads the logs of a system that holds the most sensitive data in a Windows domain.
Secret providers return a password to
toledot collect.Output files leave the tool and are opened in browsers, spreadsheets, and review systems.
Release artifacts leave the build pipeline and are installed by users.
Threats and controls (STRIDE)¶
The Status column says whether each control is in place today. Branch rules depend on repository settings, which are applied outside the code.
Category |
Threat |
Control |
Status |
|---|---|---|---|
Spoofing |
A tampered release artifact is installed in place of the real one. |
Releases are built only by the release workflow from a commit on |
In place (attestations when public) |
Spoofing |
A fake server answers |
HTTPS on port 5986 is the default and always verifies the certificate chain against the system’s roots or the authorities in |
In place; tested against a simulated client only |
Spoofing |
A report is presented as describing inputs it was not built from. |
Reports and the manifest record the size and SHA-256 of every input file. |
In place |
Tampering |
A crafted input file changes results or crashes the tool. |
Every reader checks every size, offset, and count before it uses it, and treats numbers as hostile. Identifiers stay text. Repeated JSON property names, |
In place |
Tampering |
A collection file is changed after collection. |
The end line holds the event count and a SHA-256 of every byte before it. A cut-short, damaged, or edited file is reported as a problem. The hash detects accidental damage and careless edits. It does not stop a deliberate forger, who can edit the file and recompute the hash. Keep collection files in your evidence system, and compare the hash with the one you recorded at collection. |
In place (detects accidents, not a forger) |
Tampering |
A malicious or compromised domain controller returns crafted data through |
The controller’s reply is treated as untrusted input, like any file. Each line must be one line of ASCII text of at most 8 MiB. The first line must be a toledot header. Nothing may follow the end line. After collection, the end line’s count and hash must match what arrived. The published file is then read by the same strict readers as any other file. A controller can still lie about what its own log holds. The account cannot detect that. |
In place, with residual risk below |
Tampering |
Collection changes a domain controller. |
The collector only reads. A test checks that the script calls no command other than a fixed list of read-only ones. The script reads logs through the .NET event log reader classes and writes only the file you name. |
In place; tested against a simulated host only |
Tampering |
A failed or interrupted run leaves a partial file or overwrites good evidence. |
A report file that is the same file as an input, or |
In place |
Tampering |
A malicious change enters the code base. |
Pull requests only, a required passing check, resolved conversations, no force pushes to |
In place (branch rules need settings) |
Repudiation |
A user cannot show which inputs and rules produced a report. |
Reports record the tool version, the generation time, the name, size, and SHA-256 of every input, and the period. The manifest does the same for every output file. |
In place |
Repudiation |
A crash is mistaken for a normal result in a pipeline. |
Unexpected errors exit with code 4, distinct from an account that is not shown to be complete (1), a usage error (2), and an input or collection error (3). |
In place |
Information disclosure |
The collection password leaks through the command line, logs, output files, or errors. |
|
In place, with residual risk below |
Information disclosure |
The credentials cross the network in a form that can be stolen. |
HTTPS is the default and verifies the server. Over plain HTTP, toledot requires message encryption. Only Kerberos, Negotiate, and NTLM are offered. None sends the password to the server. Basic, which sends the password itself, and CredSSP, which delegates the account’s reusable credentials to the server, are not offered. |
In place; tested against a simulated client only |
Information disclosure |
Reports and collection files expose account details to the wrong people. |
Files are created readable only by the current user on Linux and macOS, and are never silently overwritten. Reports hold names and addresses from the logs, never passwords. Treat collection files and reports as sensitive. Fixtures are synthetic, and secret scanning runs on every change and across the full history. |
In place |
Information disclosure |
The tool sends data over the network. |
|
In place |
Denial of service |
An oversized or hostile input exhausts memory or time. |
Streaming readers that hold one record at a time, with limits on a field, an event, a line, a nesting depth, and a count of fields, nodes, or columns in each format. A native log is read one 64 KiB chunk at a time. A single JSON document is limited to 256 MiB, and a collection line to 8 MiB. Problems beyond the first 10,000 are counted, not stored. |
In place |
Denial of service |
A hostile server sends unbounded data or never answers. |
Each line is limited to 8 MiB. The connection times out after 30 seconds. If the server sends no line for |
Partly in place: no limit on total size |
Elevation of privilege |
Input content runs as code: an XML external entity, formula injection in CSV, or script injection in HTML or Markdown. |
The XML reader uses the standard library’s incremental |
In place |
Elevation of privilege |
The collection account is more powerful than needed. |
The account needs the right to open a remoting session and to read the Security log, which by default means Administrators, or Remote Management Users plus Event Log Readers. toledot cannot ask for less. Use a dedicated account, grant it nothing else, protect it, and prefer a short-lived Kerberos ticket or a secret manager over a stored password. toledot uses the account only to read. |
Guidance; the rights are a Windows requirement |
Elevation of privilege |
The collector script runs hostile code on a domain controller. |
One readable PowerShell file with no modules, shipped inside the package. Read it before you run it, and run it only from a verified release. |
In place |
Elevation of privilege |
A compromised dependency or build step runs with broad permissions. |
Reading files needs one runtime dependency, |
In place |
Residual risks¶
A compromised controller can lie. The trailer hash and the certificate show that the file came whole from the server you named. They do not show that the controller is healthy or that its logs are true. Someone who controls a controller can clear its logs, alter them, or change what the collector returns. Compare collected files with copies held elsewhere, such as forwarded logs.
A tampered file can be made to match its hash. The collection hash, the report hashes, and the manifest show consistency, not authorship. Authenticity is the job of the system that stores the files.
Record numbers cannot prove nothing was removed. Someone who can rewrite a log can renumber it, and a filtered export cannot be checked at all. See Limitations.
The collectors are untested against real systems. Treat the first runs in your environment as a pilot.
NTLM is weaker than Kerberos. toledot offers it because some environments need it. Prefer Kerberos.
A secret file is not checked.
file:PATHreads the first line of the file and does not check who can read it. Keep it readable only by you.File permissions apply on Linux and macOS. toledot sets no access rules on Windows. Check the access rules of the folder you write to.
Checksums and attestations protect users only if they verify them. Releasing shows how.