14. Active Directory
This guide describes Lawliet 1.6.3.b (the current release, a beta: earlier releases are beta. The first stable release will be 2.0.0). Screens, commands and procedures may change in later versions; the usage guide is updated with each release. Check the version your server runs under Settings > Platform or with ./lawliet version, and see the Releases page for what changed.
Lawliet works with Active Directory in four ways. None of them needs the Lawliet server to join the domain.
| Feature | What it does | Where |
|---|---|---|
| Directory sign-in | People sign in to the console with their AD account; AD groups decide their role | Settings > Authentication > Directory sign-in |
| Directory sync | Disabled, locked or removed AD users lose console access within minutes | Settings > Authentication > Directory sync |
| Windows sign-in (Kerberos) | People on a domain computer sign in with their Windows ticket, no password typed | Settings > Authentication > Windows sign-in (Kerberos) |
| AD assessment | Privileged accounts, attack paths, compliance and agent coverage of the domain | AD assessment in the sidebar |
Agents also report domain membership: the Environment > Hosts list shows standalone, member <domain> or DC <domain> under each host. Deploying agents with a domain account is in chapter 13; rolling them out with Group Policy is in chapter 12.
14.1 What you need from the domain#
| Item | Used by | Example |
|---|---|---|
| Domain controllers reachable on LDAPS 636, or on 389 (StartTLS, or LDAP signed and sealed when the DCs have no certificate) | Directory sign-in, sync, AD assessment | dc1.corp.example.com:636 |
| The CA certificate that issued the DCs' LDAPS certificates (Base-64 X.509); not needed for LDAP signed and sealed | Directory sign-in | exported from the CA |
| A read-only service account (a plain domain user) | Sync, UPN names, Windows sign-in, AD assessment | [email protected] |
| Dedicated groups for console roles | Group to role | Lawliet Admins, Lawliet Analysts |
| The domain's lockout policy | Lockout safety | read automatically with the service account |
| KDCs reachable on TCP 88, and a keytab | Windows sign-in only | see 14.4 |
Find the values on a domain controller:
(Get-ADDomain).DNSRoot # DNS domain
(Get-ADDomain).NetBIOSName # NetBIOS domain name
(Get-ADDomain).DistinguishedName # base DN
Get-ADDefaultDomainPasswordPolicy | Select LockoutThreshold, LockoutObservationWindow
Get-ADGroup "Lawliet Admins" | Select DistinguishedName, SID14.2 Procedure: set up directory sign-in#
Required permission: Manage users. Four-eyes: yes (saving is a user-management change, critical action "Change users").
Before you start: keep at least one active local super administrator. Lawliet refuses to turn directory sign-in on without one. It is your way in if the directory is unreachable.
Open Settings > Authentication.
Under Directory sign-in, fill in:
Field What to enter Enabled Tick to switch directory sign-in on Domain controllers One per line, host or IP with optional port: dc1.corp.example.com:636. Tried in order; the next one is used only when one is unreachableTransport LDAPS (636), StartTLS (389), LDAP signed and sealed (no certificate) (389) or Plain LDAP (insecure) (389). See 14.2.1. A server without a port uses the transport's port Failed sign-ins per account 1 to 4 per window. Must stay at least 2 below the domain's lockout threshold. The page shows the domain's policy once it has been read Session lifetime 1, 2, 4, 8, 12 or 24 hours (default 8). The user signs in again after this DNS domain corp.example.comNetBIOS domain name CORP. Accounts of any other domain are refusedBase DN DC=corp,DC=example,DC=comCA certificate (PEM) LDAPS and StartTLS only (the field is hidden for the other two). Upload the CA file (max 64 KB). Without it only publicly trusted certificates are accepted, so an internal CA must be uploaded Service account (optional) Recommended. Read-only. Needed for the background sync, for UPN names, and for Windows sign-in Service account password Encrypted on the server and never shown again. Retype it whenever you change the servers, transport, CA or account Under Group to role, click Add rule for each mapping. Name the group by sAMAccountName (
Lawliet Admins), distinguished name, or SID, and pick the role. The first matching rule wins: put the most privileged rule first (use Up / Down). With no rules, "No rules: no directory account can sign in."Click Test connection. Each server is reached over the chosen transport (TLS with the certificate checked, or signed and sealed, or in clear); the base DN is read; with a service account, the lockout policy is read and the cap checked. What you see: per server TLS verified, Reached or Failed with the reason, and a line saying what was actually negotiated: "Negotiated: TLS (certificate verified).", "Negotiated: signed and sealed (GSS-SPNEGO / NTLMv2, signed and sealed).", or in red "Negotiated: CLEAR TEXT. Nothing on this connection is protected." Signing and sealing is set up by the sign-in, so without a service account the line says to add one to test it.
Click Save changes. With dual control on: "Sent for approval. It takes effect once it is signed off and executed." Have it approved and execute it from Approvals.
What users see: the sign-in page offers Sign in with directory account. They enter DOMAIN\user (or a UPN when a service account is configured) and their AD password. On the first sign-in they must enrol an authenticator app. Two-factor is always required for directory accounts.
If it fails:
| Symptom | Fix |
|---|---|
| Test: "Certificate not trusted or issued for another name" | Upload the issuing CA. Use a DC name or IP that is in the certificate's Subject Alternative Names |
| Test: "TLS failed" | LDAPS not enabled on the DC, or StartTLS chosen on the LDAPS port. A DC without a certificate: choose LDAP signed and sealed |
Test: "This domain controller requires LDAP signing" (reason ldap_signing_required) | Plain LDAP was chosen and the DC enforces "LDAP server signing requirements" (or is Windows Server 2025). Nothing was sent. Choose LDAP signed and sealed |
Test: "Lawliet could not establish that this domain controller does not require LDAP signing" (reason ldap_signing_unknown) | Plain LDAP only. Install the Lawliet agent (Windows 2.2.0.b or later) on every DC in the server list and check it is online; Test connection asks it for a read, so test again a minute later. A DC without the agent (Samba too): choose LDAP signed and sealed |
Test or sign-in: "The domain controller refused after the password was sent in clear: rotate the bind account password (...)" (reason ldap_signing_required_after_bind) | Plain LDAP only: the DC turned on LDAP signing after its last read, and the password of the account named in brackets crossed the network. Change that account's password. Lawliet sends no further plain bind to that DC until a newer read; choose LDAP signed and sealed |
Test: "did not agree to sign and encrypt" (reason sealing_not_negotiated) | The DC accepted the sign-in but would not seal the session; Lawliet stopped and sent nothing in clear. Check that NTLM is allowed for the account (Network security: Restrict NTLM), or use LDAPS |
| Test: "Not reachable" | Firewall or routing to 636 / 389 |
| Save refused: "Type the service account password again" | You changed servers, transport, CA or account; retype the password |
| Save refused: "Set the failed sign-in cap to N or lower" | The domain's threshold is low; lower the cap |
| Every user gets "Invalid username or password" | Read the reason in Settings > Audit trail (resource directory_signin). foreign_domain = wrong NetBIOS name; identity_not_found = wrong base DN |
| A user is refused "not in a group that has access" | No rule matches the user's groups. Check the rule spelling |
| Users wait N minutes after a mistake | The failed-bind cap was reached; wait, or check the password in AD |
14.2.1 Choosing the transport#
| Transport | Port | Certificate on the DC | What crosses the network |
|---|---|---|---|
| LDAPS | 636 | Required | Everything inside TLS |
| StartTLS | 389 | Required | Everything inside TLS (switched on before the bind) |
| LDAP signed and sealed (no certificate) | 389 | Not needed | The password never: the bind is NTLMv2 (SASL GSS-SPNEGO). Every message after it is signed and encrypted |
| Plain LDAP (insecure) | 389 | Not needed | Everything in clear, including every password |
LDAP signed and sealed is the choice when the domain controllers have no certificate. It is how Windows protects its own LDAP traffic and it satisfies the DC policy "Domain controller: LDAP server signing requirements = Require signing". What Lawliet uses: a SASL GSS-SPNEGO bind carrying NTLMv2, computed by the server's own built-in NTLM code (no Kerberos ticket, keytab or system library is needed, so it works the same in the Docker image, a native install and an air-gapped site), with NTLM signing and sealing (128-bit keys, key exchange, HMAC-MD5 signatures and RC4 encryption, per direction, with sequence numbers). Lawliet never downgrades: it checks its NTLM answer before sending it and refuses unless it is NTLMv2 (never NTLMv1 or LM) and the DC offered signing, sealing, 128-bit keys, extended session security and key exchange; after the sign-in the session must be signed and sealed. If any of that is missing the sign-in is refused and nothing else is sent.
Limits, and why LDAPS is still better where the DCs can have a certificate:
- The DC is not authenticated. LDAPS and StartTLS prove the server is your DC (its certificate); NTLM on 389 does not. Someone who can impersonate or intercept a DC receives each signing-in user's NTLMv2 answer, which can be attacked offline to guess a weak password, and may try to relay it. Keep this transport on a trusted network segment between the Lawliet server and the DCs, and use LDAPS where possible.
- The sealing cipher (RC4) is weaker than TLS 1.2.
- It is NTLM only. A domain that denies NTLM to the DCs (Network security: Restrict NTLM) refuses it, and Kerberos is not used for this transport. Moving the domain to Kerberos only (no NTLM) - including Lawliet's own NTLM-off hardening automation - breaks this mode: switch the directory connection to LDAPS first, or keep an NTLM exception for the Lawliet server.
Plain LDAP (insecure) is a last resort for an isolated management network:
- Choose Plain LDAP (insecure). A red box appears: tick "I understand: Passwords and directory data cross the network in clear; use only on an isolated management network." Without the tick, Test connection and Save are refused.
- Save. Plain LDAP is never stored on one signature: the request is held for a second administrator even when the super-administrator bypass is on or four-eyes is switched off, and it is refused ("needs a second administrator's signature") while the installation has no second administrator who can approve. The approval request starts with "INSECURE: PLAIN LDAP, PASSWORDS IN CLEAR." The change is recorded in the audit trail with
insecure_transport, who ticked the warning and who signed. - While it is active, a red banner stays at the top of Settings > Authentication ("Plain LDAP is active ...", with who acknowledged it and when), and on the AD assessment page.
Plain LDAP sends a password only after Lawliet has proven that the domain controller it is connected to does not require LDAP signing. Unknown means refused. A bind with a made-up account and a made-up password does not tell: Windows checks the account before the signing requirement, so it answers "invalid credentials" either way and says "stronger authentication required" only to a correct password, after it has crossed the network. So the proof that signing is NOT required comes from the DC itself:
- The Lawliet agent (Windows agent 2.2.0.b or later) on each domain controller reads, without changing anything, the DC's
HKLM\SYSTEM\CurrentControlSet\Services\NTDS\ParametersvaluesLDAPServerIntegrity("Domain controller: LDAP server signing requirements") andLDAPServerEnforceIntegrity(Windows Server 2025 "... Enforcement"), the same two as applied by Group Policy (Resultant Set of Policy classRSOP_RegistryValue, elsegpresult /scope computer /x), its Windows build and its addresses. Lawliet asks for a new read every 5 minutes while directory sign-in is on with plain LDAP, when you save it and when you click Test connection. - A read counts only if it is at most 15 minutes old (counted from when the agent was asked; a result that comes back after the command's time limit does not count) and comes from the agent on the DC whose address the connection actually reached. An agent vouches only for the host it runs on: the read must list the agent's own address and name, the DC must name itself with that name (rootDSE
dnsHostName), and, when the domain has an AD collection, the agent's host must be a domain controller account in the latest one. Older agents and agents offline for more than 10 minutes are not asked. These checks rest on what the agents report about themselves: whoever holds a stolen agent token of an enrolled Windows host can impersonate the agent of a domain controller that has none of its own and vouch "not required" for it. Install the agent on every DC in the server list, and treat agent tokens as secrets. - It must show
LDAPServerIntegrity0 or 1 (in the registry and in Group Policy). A value of 2, anyLDAPServerEnforceIntegrityother than 0, or Windows Server 2025 (which requires signing by default) without enforcement explicitly disabled means required. A value that is not set, applied Group Policy that cannot be read, a failed read or a member server means unknown. - Before the bind Lawliet also reads the DC's rootDSE and sends one unauthenticated bind (a made-up name, empty password: no credential). Proven on Windows Server 2022: a DC that requires signing answers it "stronger authentication required" (and success when it does not), so Lawliet refuses before any password is sent - this is what normally stops plain LDAP the moment a DC starts requiring signing, even between two reads. A DC reporting Windows Server 2025 while the read came from an older build also refuses.
Refused, nothing is sent, and Test connection says why: "This domain controller requires LDAP signing ... the password was not sent" (reason ldap_signing_required) or "Lawliet could not establish that this domain controller does not require LDAP signing ... The password was not sent" (reason ldap_signing_unknown). A DC without the Lawliet agent (including a Samba DC) therefore cannot use plain LDAP: choose LDAP signed and sealed. Neither refusal counts as a failed sign-in.
What remains: on Windows Server 2022 only a change of the signing requirement in the moment between that unauthenticated check and the real bind (milliseconds) gets past both. On a DC that answers the check differently, a DC whose signing requirement is switched on after its last read (at most 15 minutes earlier; normally about 5 minutes plus one agent check-in) can receive a plain bind before Lawliet knows: one, plus any sign-in, sync, token refresh or test that had already started (loaded its settings) before Lawliet stored the refusal - a few seconds; each of those is refused too and named in the audit trail. The DC refuses it, and Lawliet then says so plainly, naming the account: "The domain controller refused after the password was sent in clear: rotate the bind account password (the service account LAB\svc)" or "(the signing-in user LAB\alice)" (reason ldap_signing_required_after_bind; recorded in the audit trail; one critical notification). The refusal is normally stored in the database before the bind returns (if the database cannot be reached, the server process that saw it keeps refusing that DC and stores it on its next directory operation), so from that moment no Lawliet server process sends a further plain bind to that DC - not for any user, sync, token refresh or test - until a read the agent takes after the refusal says signing is not required; Lawliet asks the agent for that read at once. Rotate the password of the account named, and choose LDAP signed and sealed.
Plain LDAP never reconnects on its own: the connection is made to one address of the DC (the name in the server list is resolved, then the address that answered is kept), and right before the password is sent Lawliet checks that the socket is still open and still connected to the address the read is for. Anything else is refused, with nothing sent.
SIEM note: the unauthenticated check binds as CN=lawliet-signing-probe-<32 hex characters> with no password. It is not a logon attempt and no account is involved, so there is nothing to lock out. Measured on Windows Server 2022: no failed logon (event 4625), no anonymous logon (4624) and no change to any account's bad-password count. Should another DC log it, exclude the prefix lawliet-signing-probe- from failed-logon and password-spraying rules in your SIEM. Lawliet's own starter rules (Brute force against a host, Password spraying from one address, Successful logon after brute force) exclude it already; on an upgraded installation the exclusion is added to those rules unless their exceptions were changed by an operator, in which case add user:"*lawliet-signing-probe-*" to them yourself.
Moving off plain LDAP to a protected transport, changing nothing else (the service account password retyped, a CA added for LDAPS), runs on one signature: it only removes a risk. It is audited (single_signature: leaving_plain_ldap). Any other change while leaving plain LDAP goes through four-eyes as usual.
Switching between transports always needs the service account password typed again: a saved password is only ever sent over the transport it was approved with.
Lockout safety: Lawliet counts every bind before it sends it, and refuses without contacting the DC once an account reaches the cap. Lawliet's own binds never take an account closer than 2 attempts to the domain's lockout threshold. Failures from other systems (workstations, mail) still count against the same threshold.
Roles: the role is recomputed from the groups at every sign-in. An administrator can still deactivate a directory user in Settings > Users; that wins over the directory. The last active super administrator is never demoted by a group change; such a user's sign-in is refused with a message to use the local break-glass account.
14.3 Procedure: directory sync#
Directory sync re-reads every active directory user in the background (service account required). A user who is disabled, locked, expired, deleted or no longer in a mapped group loses all console sessions at once, and the Lawliet account is deactivated. A changed role is applied.
Required permission: Manage users. Four-eyes: only for Apply anyway.
- In Settings > Authentication > Directory sync, choose Sync every (1 to 60 minutes, default 5). It is saved with the settings above (Save changes).
- Click Sync now to run a cycle at once (at most once a minute).
- Read Status: the last sync, its result, users checked and changed, and errors.
If the directory cannot be read, nothing is revoked; Lawliet retries with backoff and raises one alert.
Mass changes are held back. If 3 or more users, and more than half of those read, would lose access in one cycle, nothing changes and an alert is raised (a service account that lost read rights looks exactly like that). Check the service account and the mappings. If the directory is right, click Apply anyway (four-eyes). It is applied only if a fresh cycle finds exactly the same users and reasons.
A user the sync deactivated is reactivated by their next successful directory sign-in. A user an administrator deactivated stays deactivated.
14.4 Procedure: Windows sign-in (Kerberos single sign-on)#
People on a domain computer press Sign in with Windows (Kerberos) and are signed in with their Windows ticket. The account then goes through directory sign-in exactly as after a password (groups, disabled checks, second factor). NTLM is never accepted.
Required permission: Manage users. Four-eyes: yes for uploading the keytab, switching Windows sign-in on, allowing RC4, and skipping the authenticator code. Switching off and removing the keytab take effect on one signature.
Prerequisites:
- Directory sign-in with a service account (14.2).
- The domain as a Kerberos realm under Environment > Hosts > Deploy agents remotely > Kerberos realms (chapter 13.4). The realm is the directory's domain in capitals.
- A DNS name for the console that people type, for example
lawliet.corp.example.com. An IP address does not work (the browser then offers NTLM, which is refused). - A service keytab for
HTTP/<console name>@<REALM>, made by the domain administrator:New-ADUser -Name svc-lawliet-http -AccountPassword (Read-Host -AsSecureString) -Enabled $true -PasswordNeverExpires $true -CannotChangePassword $true Set-ADUser svc-lawliet-http -KerberosEncryptionType AES128,AES256 setspn -S HTTP/lawliet.corp.example.com CORP\svc-lawliet-http ktpass /princ HTTP/[email protected] /mapuser CORP\svc-lawliet-http /crypto AES256-SHA1 /ptype KRB5_NT_PRINCIPAL /pass * /out lawliet.keytabThe keytab is the console's service key: whoever holds it can make tickets to the console for any user. Copy it only to the machine you upload from, upload it, delete it.
- Browsers told to trust the console name: add
https://lawliet.corp.example.comto the Local intranet zone, or set the browser policy AuthServerAllowlist tolawliet.corp.example.com(Edge, Chrome). Firefox:network.negotiate-auth.trusted-uris.
Steps:
- Settings > Authentication > Windows sign-in (Kerberos). Each realm has a card. If none: "No Kerberos realm is configured. Add the domain under Remote deployment > Kerberos realms first."
- Under Service keytab, enter the Console host name (as people open it) and click Upload keytab. Choose the file. Have the request approved and executed. What you see: the principal, key version and encryption types. The file must hold exactly
HTTP/<host>@<REALM>and nothing else. - Tick Offer Windows sign-in and click Save. Have it approved and executed.
- Optional switches:
- Allow RC4 keys: only for a service account without AES keys.
- Do not ask for the authenticator code after Windows sign-in: applies only to enrolled users whose role cannot approve or perform critical actions (in the built-in roles: analyst, auditor, viewer). Administrators, officers and super administrators are always asked.
- The card lists anything still missing ("What is missing"). The sign-in page shows the button only once nothing is.
If it fails (reason in the audit trail, resource directory_signin, method kerberos):
| Reason | Fix |
|---|---|
ntlm_refused | The browser sent NTLM: add the console name to the trusted sites, open it by name not IP, check the SPN |
ticket_refused | Keytab out of date (the account's password changed) or the server clock is off: re-export and upload; sync the clock |
wrong_service | The console was opened by another name than the keytab's |
no_usable_key | The keytab has only RC4 keys and RC4 is not allowed |
Procedure: replace or remove the keytab, or turn Windows sign-in off#
Replace the keytab when the service account's password changed (ticket_refused).
- Settings > Authentication > Windows sign-in (Kerberos), the realm's card.
- To replace it, click Replace keytab and choose the new file. Have it approved and executed.
- To stop offering Windows sign-in but keep the keytab, untick Offer Windows sign-in and click Save.
- To remove the keytab, click Remove keytab. You see "Keytab removed; Windows sign-in is off for this realm." Removing takes effect on one signature (it takes access away).
Users can still sign in with their local or directory password while Windows sign-in is off.
The server's clock must be within 5 minutes of the domain's. Check KDCs shows the offset. Keep Redis persistence on where Windows sign-in is enabled (it remembers used tickets for 10 minutes).
14.5 AD assessment#
AD assessment (sidebar, under Assets) analyses a domain from a collected snapshot: privileged accounts, findings, attack paths, compliance controls, and agent coverage.
Permissions: View compliance to view; Manage compliance to register domains and collect; Write to Active Directory for any write to the domain (always four-eyes, critical action "Write to Active Directory"). Deleting a domain needs Manage compliance and Delete evidence (four-eyes, critical action "Delete evidence").
Procedure: delete a domain#
Risk: the domain's collected assessments, findings, attack paths, LDAPS settings and schedules are deleted permanently. Nothing changes in the directory. Rollback: register it again and collect again; old collections do not come back.
- Choose the domain in Domain and press Delete domain.
- Read the box: "Delete domain "<name>"?" with the number of collected assessments that go.
- Press Delete domain. With dual control on, the console says "Deleting domain "<name>" was sent for approval as request N. It does not run by itself: a second administrator approves it in Approvals by <time>, then you run it from Approvals within the execution window (15 minutes after the approval by default)."
Procedure: register a domain and collect#
Collection is read-only. It never changes the directory.
- Open AD assessment. In Register a domain, enter the DNS name (
corp.example.com) and click Add. - Make sure directory sign-in has a service account and points at this domain (14.2). Directory sign-in itself does not have to be enabled.
- Pick the domain in Domain and click Collect permissions now. The collection uses the directory sign-in connection and its transport; the page shows "Server collection transport: ..." with a link to Settings > Authentication, where it is changed (a red banner while it is plain LDAP). What you see: "Collecting directory objects and permissions over LDAPS. This page updates when it ends."
- When it ends, pick the collection in Collection (
#id - source - date). The tiles show Principals, Findings, Attack paths and Controls failing.
If it fails:
| Message | Fix |
|---|---|
| "Configure the read-only directory service account ... first" | Add the service account in Settings > Authentication |
| "The directory connection is incomplete (servers, base DN, TLS)." | Complete directory sign-in settings |
| "The directory connection is for X; this domain is Y. Collect it from a Windows agent instead." | The stored directory is another domain. Collect from an agent on that domain's DC (API: POST /api/v1/ad-assessment/domains/{domain_id}/collect with the agent id) |
| "A permission collection for this domain is already running." | Wait for it to end |
| "Collection #N failed: ..." | The reason is shown; usually the same causes as Test connection |
| "Partial permission data ..." | Some objects' permissions could not be read. Missing attack paths are not evidence of absence; the ACL controls (CIS 4.3-4.8) are not assessed |
The tabs#
| Tab | Content |
|---|---|
| Coverage (N blind) | AD computers against enrolled agents: Coverage, Managed, Blind spots, AD computers; tables of blind spots, managed computers, and agents not in AD |
| Findings (N) | Severity, Check, Finding, Affected, Status |
| Attack paths (N) | From, Path (each control edge), To, Hops, Score, Techniques |
| Compliance (N failing) | Framework, Control, Title, Status, Evidence |
| Remediate | Staged fixes: tiered admin model, Windows LAPS, AD hygiene - see chapter 64 |
| Kerberos | The Kerberos-only (no NTLM) migration and the Kerberos hardening actions: chapter 65 |
Deploy agents via GPO (Coverage tab)#
Needs a Windows agent on a domain controller of the domain, and the Write to Active Directory permission (four-eyes).
Coverage tab > Deploy agents via GPO. A form opens:
Field What to enter Server address the computers reach https://<server>(prefilled; the address the members use,http(s)://host[:port]only)Security group A group holding only the computers to install. Empty: Domain Computers (every computer of the domain, and so any local administrator of one, can then read the code). Authenticated Users, Everyone, Domain Users and a group with a member that is not a computer (or a nested group) are refused Link to OU The OU's distinguished name, for example OU=Workstations,DC=example,DC=lan(OU=, CN= and DC= parts; no quote characters). Empty: the domain rootGPO name Default "Lawliet Agent Deployment" (API field gpo_name; letters of any language, no quote characters, backtick or $)Computers it may enrol Prefilled with the number of blind spots; at most 1000 Code valid for days At most 30 (default 30) Server certificate (PEM) Only shown when the server's certificate is self-signed and the server cannot read it itself: paste ./lawliet tls --export's fileRequest the rollout. With dual control on: "Submitted - approve it in Approvals. The code is made when the approved request runs." A second person approves; the requester runs it from Approvals.
On the approved run the server makes an expiring enrolment code (Windows only; listed under Agents > Install agent > Offline package > Enrolment codes) and the domain controller's agent:
- creates the GPO "Lawliet Agent Deployment";
- applies Security Filtering (the group gets Read and Apply group policy, Authenticated Users is removed) and checks it - before anything secret is written to SYSVOL;
- writes a computer startup script, the code file and (self-signed server) the certificate into the GPO's
Machine\Scripts\Startupfolder, and checks the code file is not readable by Authenticated Users; - turns on "Always wait for the network at computer startup and logon";
- links the GPO. If any step fails, the GPO is removed again and the write shows the error. All of it runs against the domain controller that runs the agent (Group Policy calls and SYSVOL files on the same DC), so it works from any DC, not only the PDC emulator.
Restart a computer of the group. At startup it fetches the installer from the server, runs it only if its SHA-256 is the one the server publishes, and installs the agent with the code (from the file - never on a command line). A computer that already has the agent does nothing. On the computer:
C:\ProgramData\Lawliet-rollout\gpo-install.log(SYSTEM and Administrators only). The host appears under Agents once it has enrolled, and the code is removed from itsconfig.env.When the rollout is done, revoke the code (Enrolment codes > Revoke). While the GPO is linked and the code valid, a computer whose agent is uninstalled gets it again at its next restart.
The code is revoked for you when the rollout fails, when the domain controller's agent does not report within an hour, and when the GPO is unlinked. Undo: submit the write's rollback (an unlink of the GPO, AD write, four-eyes): the code is revoked and the domain controller's agent deletes the code file from the GPO's folder; delete the GPO in Group Policy Management to remove the script. If PowerShell on the DC was stopped by its time limit, the write says a half-made GPO may be left: delete it. After a server update, run the rollout again: the startup script accepts only the installer of the server version that wrote it, and refuses (logs "Refused: install.ps1 is not the installer this server published") after an update.
Problems:
| Message | Meaning / action |
|---|---|
| "no domain-controller agent is enrolled for this domain" | Install the agent on a DC of this domain first |
| "server_url is required" | Fill in the server address (or set PUBLIC_BASE_URL on the server) |
| "ca_cert_pem is required" | Paste the server certificate (self-signed server) |
| "Security Filtering must name the target computers" | Choose a group of computers, not Authenticated Users / Everyone / Domain Users |
| "Authenticated Users still have access to the GPO" | The filter could not be applied; nothing secret was written and the GPO was removed. Check the DC agent's rights on Group Policy |
| "Security group ... has a member that is not a computer" | Use a group of computer accounts only (users in it could read the code) |
| "gpo_name must be one line with no quotes" / "target_ou_dn must be a distinguished name" | Retype the name or DN without quote characters (a typographic apostrophe from a word processor counts) |
Removing a domain#
To remove a registered domain with its collections, see Procedure: delete a domain. Findings have no status buttons here. Each collection keeps its own findings: pick the newest collection in Collection to see the current state. A domain you keep but no longer assess stays in the list; nothing is collected from it unless someone presses Collect permissions now.
More detail: directory sign-in reference and Windows sign-in reference.