Active Directory¶
LAPSLens reads the LAPS password from the computer's object in Active Directory, signed in as you. It never uses a shared service account, so your domain's auditing records who read which password.
How a lookup works¶
- LAPSLens connects to the domain controller over LDAPS (TCP 636). It checks the DC's certificate against the Mac's trusted certificates, and checks the name matches.
- It signs in with your user name and password (an LDAP simple bind, inside TLS).
- It finds the domain's base DN, then the computer:
(&(objectClass=computer)(sAMAccountName=NAME$)). A full DNS name is cut to its first label. -
It reads the LAPS attributes your account is allowed to see, and picks the newest kind:
Order Attribute Format 1 msLAPS-EncryptedPasswordEncrypted Windows LAPS: decrypted as described in Encrypted Windows LAPS 2 msLAPS-PasswordWindows LAPS JSON (account name, password, set time) 3 ms-Mcs-AdmPwdLegacy Microsoft LAPS (plain text) The expiration comes from
msLAPS-PasswordExpirationTimeorms-Mcs-AdmPwdExpirationTime.
The certificate¶
LDAPS needs a DC certificate the Mac trusts. If your domain uses its own certificate authority, deploy that CA's root certificate to techs' Macs in a configuration profile (a Certificate payload). LAPSLens doesn't offer a "trust anyway" button: an untrusted certificate is exactly what an attacker in the middle would present.
Use the DC's full DNS name, the name on its certificate. An IP address or short name fails the name check.
Permissions your account needs¶
Give a group read access, scoped to the OUs its members support, and put techs in that group.
| LAPS | Grant read with |
|---|---|
| Windows LAPS (plain) | Set-LapsADReadPasswordPermission -Identity "OU=Workstations,DC=corp,DC=example,DC=com" -AllowedPrincipals "CORP\LAPS Readers" |
| Windows LAPS (encrypted) | The same, plus the group in the Windows LAPS policy's authorized decryptors. See Encrypted Windows LAPS. |
| Legacy Microsoft LAPS | Set-AdmPwdReadPasswordPermission -OrgUnit "Workstations" -AllowedPrincipals "CORP\LAPS Readers" |
Without read access, the lookup finds the computer but says "no LAPS password you can read". AD doesn't tell anyone whether the attribute is empty or hidden from them.
Network¶
| To the DC | For |
|---|---|
| TCP 636 | LDAPS, every lookup |
| TCP 135 and the dynamic RPC range (49152–65535 by default) | Only for encrypted Windows LAPS |
Encrypted Windows LAPS also needs Kerberos (TCP and UDP 88) to a KDC, usually any DC, to get a ticket for the chosen DC. On VPN, check that these reach the DCs.
Not in 3.0 yet¶
- Finding a DC automatically from DNS. For now, type one or set one for everyone.
- Signing in to LDAP with Kerberos instead of a password.
- Searching by serial number.
- The password history attributes, and Windows LAPS DSRM passwords on DCs.