Local Administrator Password Solution (LAPS)
Resources
(1) Learning resources
ms-Mcs-AdmPwd attribute
What is Windows LAPS?
Windows LAPS PowerShell cmdlets
Additional resources
(2) Exploitation examples
Basic concepts
What is the ms-Mcs-AdmPwd attribute?
An attribute used by the LAPS feature, that contains a cleartext password (this will usually be the password of the local administrator account).
What is the admpwd.dll file?
The presence of this file will indicate that the Group Policy Client Side Extension (CSE) is configured on the computer, and that the LAPS client is installed on the machine. It is located in C:\program files\LAPS\CSE.
AllExtendedRights
1. What is the "All extended rights" attribute given to an AD organizational unit (OU) under the context of LAPS?
For a given OU with this attribute set, any extended right holders (groups, users, etc.) will be able to read the LAPS password for any machines under that particular OU. Since the LAPS password mostly involves the local administrator account, this means that the rights holder will be able to retrieve the password for the local administrator (stored in the ms-Mcs-AdmPwd attribute).
Exploitation steps
Query all the OUs that has the "All extended rights" attribute that deals with LAPS
Retrieve the extended right holders for a particular OU
Retrieve the users in the group
Given that a particular group has extended rights, we can enumerate the users of that particular group:
Retrieve the LAPS password
Given that we have compromised or impersonate a particular user of that group (found in the previous step), we can retrieve the LAPS password of a particular machine under the OU. This will provide us with the local administrator password for that machine.
First, we have to load the credentials for the user to impersonate using either a TGT (pass-the-ticket) or simply a username and password combination with the runas.exe utility:
Next, we can retrieve the password for the local administrator account on the machine given by <TARGET_COMPUTER>:
Last updated