Local Administrator Password Solution (LAPS)
ENUMERATION
dir "C:\Program\LAPS\CSE"
Get-ChildItem 'c:\program files\LAPS\CSE\Admpwd.dll'
Get-FileHash 'c:\program files\LAPS\CSE\Admpwd.dll'
Get-AuthenticodeSignature 'c:\program files\LAPS\CSE\Admpwd.dll'
reg query "HKLM\Software\Policies\Microsoft Services\AdmPwd" /v AdmPwdEnabled
Get-ADObject 'CN=ms-mcs-admpwd,CN=Schema,CN=Configuration,DC=DC01,DC=Security,CN=Local'If admpwd.dll exists, then enumeration is successful.
LAPS PASSWORD EXTRACTION
The "ms-mcs-AdmPwd" is a "confidential" computer attribute that stores the clear-text LAPS password. Confidential attributes can only be viewed by Domain Admins by default, and unlike other attributes, is not accessible by Authenticated Users
Possible tools: LAPSToolkit, Crackmapexec, ldapsearch
If a user has access to view the LAPS password, we can use crackmapexec or ldapsearch to dump password:
Read the password of all computers
Write a random password to a specific computer
GRANT LAPS ACCESS
The members of the group "Account Operator" can add and modify all the non admin users and groups. Since LAPS ADM and LAPS READ are considered as non admin groups, it's possible to add an user to them, and read the LAPS admin password
LAPS Persistence
Last updated