Technical document · docs/trust-and-permissions.md · English · All documentation

Trust and permissions

PQC PRZM reads a Windows estate and writes a report and scripts on the machine where you run it. It does not change the domain by generating a report. A script changes a computer only after you read it and pass -ConfirmEnforce ENFORCE.

This page is the permission contract. The same text is what pqcprzm preflight and pqcprzm plan are checked against.

Samenvatting

PQC PRZM leest Windows-omgevingen en schrijft het rapport en de scripts op de computer waar u het draait. Het programma maakt geen verbinding met internet, doet geen telemetrie en controleert niet zelf op updates. Een assessment heeft geen Domain Admin nodig: een eigen account met Event Log Readers, LDAP-lezen naar de domeincontrollers, en lezen van het register voor configuratie is genoeg. Het account hoort niet in Domain Admins, Enterprise Admins, Schema Admins, Administrators, Account Operators, Server Operators of Backup Operators. pqcprzm preflight waarschuwt als het huidige token wél in zo’n groep zit. pqcprzm plan laat zien welke hosts, logboeken en queries geraakt worden en opent nog geen verbinding. Elke actie komt in een lokaal activiteitenlog in het rapport. Privésleutels, wachtwoorden en LAPS-geheimen worden niet gelezen. Deployment die GPO’s aanmaakt, zit nog niet in deze versie en krijgt dit account niet.

What it does

What it does not do

Permissions

Mode Needs Does not need Why
Assessment, read-only A dedicated user or gMSA. Membership of Event Log Readers on each target. Authenticated LDAP read of the domain and of CN=Configuration (default for a domain user). Remote registry read of HKLM\SYSTEM and HKLM\SOFTWARE policy keys on those targets, if you want SMB, TLS, NTDS and LSA values from the tool rather than from an export. Domain Admins, Enterprise Admins, Schema Admins, Administrators, Account Operators, Server Operators, Backup Operators, “Replicating directory changes”, password reset, GPO edit, private-key permissions. Logs and public directory data are enough to judge the baseline. Higher groups can read secrets and change the domain.
Artifact generation Write access to the --out folder on the machine running the tool. Any domain right. The commands assess, baseline, plan, and preflight do not open a socket. The files are for a person to review.
Later v2 deployment, not built A separate confirmation and a separate right to create and link a GPO, used only for that action. A backup of the GPO taken first. Those rights on the everyday assessment account. Linking a GPO is a domain-wide write. It stays out of the read account.

deploy/New-PqcPrzmServiceAccount.ps1 creates the gMSA or the user. It does not add the account to a privileged group. It prints the Event Log Readers step, because that group is local on each target. The script changes nothing unless you pass -ConfirmEnforce ENFORCE.

pqcprzm preflight reads the current Windows token. It exits 4 when the token contains one of the groups in the “does not need” column. On a host that is not Windows it prints the contract and does not connect to a domain. It cannot see a group that is not in the token.

Network

The collector contacts only the domain controller you pass to --dc, every domain controller LDAP then returns, and computers you repeat with --computer.

From To Port Protocol Why
Management server Each named host and each domain controller TCP 135, then a dynamic RPC port Remote Event Log Read Security, System (Schannel), Directory Service, SMBServer/Audit, SMBClient/Audit, NTLM/Operational, Schannel/Operational.
Management server Domain controllers TCP 389 (or 636 if you later force LDAPS) LDAP Computers, operating system, userAccountControl, and cACertificate. The attribute list is fixed. It does not include password or LAPS attributes.
Management server Each target TCP 445 Remote registry (SMB) Read SMB, Schannel, NTDS, and LSA values. If this is denied, the tool records a gap. It does not ask for Administrators.
Management server The internet none none No telemetry, no update check, no license call.

assess, baseline, plan, and preflight make none of these connections. Their activity log shows an empty network table. collect records each connection it actually opens (host, port, protocol, count, purpose) in the report.

Windows Event Log cannot be limited to a single high port. The firewall template therefore blocks the executable outbound except to the internal subnets you name, rather than pretending that port 389 alone is enough.

deploy/New-PqcPrzmOutboundFirewall.ps1 writes that rule. It changes nothing unless you pass -ConfirmEnforce ENFORCE.

How to verify, without trusting this page

Data

Everything the tool writes stays in the --out directory you pass. That folder holds report.html, report.json, activity.json, snapshot.json when you collected, baseline-plan.json, and the scripts. There is no second copy in a vendor cloud, because there is no vendor connection.

The report is plaintext so you can read it. Protect the folder with the disk encryption you already use (BitLocker or EFS). Application-level encryption of the report is not implemented: an encrypted report you cannot open does not help an MSP, and a key stored next to it would not add a boundary. Do not put --out on a share that other customers can read.

Private keys are not part of the data. The collector opens local certificate stores with OpenFlags.ReadOnly and copies subject, issuer, thumbprint, and algorithm. It does not export a PFX and it does not request msLAPS-Password or ms-Mcs-AdmPwd.

Builds

The source of the collector is this repository. A customer audit reads src/PqcPrzm.Core/Collection, including the Windows probe. Publishing that tree to customers (source-available) is a release choice and is not a switch in the program.

A release build is:

dotnet publish src/PqcPrzm.Cli -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
Get-FileHash .\publish\pqcprzm.exe -Algorithm SHA256

Authenticode signing of that executable is a release step. This repository does not hold a signing key, and CI does not publish a binary yet. Until a signed build and its hash are published, treat a binary you did not build yourself as untrusted. CI on Ubuntu and on Windows compiles and tests the source; the Windows job is what compiles the event-log and registry probe.

Commands

pqcprzm preflight
pqcprzm plan --domain horizon.school --dc dc01.horizon.school --computer fs01.horizon.school
pqcprzm collect --customer "Stichting De Horizon" --domain horizon.school --dc dc01.horizon.school --out C:\PqcPrzm\horizon --confirm-collect CONFIRM

collect prints the plan and stops unless --confirm-collect CONFIRM is present. On a machine that is not Windows it still stops, after the plan, because the probe is not in that build.