LAPS
Introduction
Local Administrator Password Solution (LAPS) is a Microsoft tool that helps organizations secure their local administrator accounts on Windows-based computers. It provides a unique, randomly generated password for each local administrator account on every managed computer in an organization's network, and stores the password securely in Active Directory.
Enumeration
There are three main ways to check if LAPS is enabled on the machine you have access to.
Check if the
AdmPwd.dll
exists on the system.
Check for GPOs related to "LAPS".
Check if the object
ms-Mcs-AdmPwdExpirationTime
is not null.
Exploitation
1. Download the Registry.pol,
which location is at the gpcfilesyspath
obtained while enumerating GPOs.
2. Parse the file with the following command from the GPRegistryPolicyParser.
After parsing the file, you can obtain the following information:
Password complexity is upper, lower and numbers.
Password length is 14.
Passwords are changed every 30 days.
The LAPS managed account name is LapsAdmin.
Password expiration protection is disabled.
3. Then, it is time to find out who can read the LAPS password. (There are two alternatives).
Directly looking at the computer ADLS
Using the LAPSToolkit.
ℹ️
Find-LAPSDelegatedGroups
will query each OU and find domain groups that have delegated read access.Find-AdmPwdExtendedRights
goes a little deeper and queries each individual computer for users that have "All Extended Rights". This will reveal any users that can read the attribute without having had it specifically delegated to them.
4. Once you have the permissions to read the password, you can read it as follows.
Last updated