LAPS
Description
The "Local Administrator Password Solution" (LAPS) provides management of local account passwords of domain joined computers. Passwords are stored in Active Directory (AD) and protected by ACL, so only eligible users can read it or request its reset.
Enumeration
Check if LAPS is installed Locally
# Identify if installed to Program Files
Get-ChildItem 'C:\Program Files\LAPS\CSE\Admpwd.dll'
Get-ChildItem 'C:\Program Files (x86)\LAPS\CSE\Admpwd.dll'
dir 'C:\Program Files\LAPS\CSE\'
dir 'C:\Program Files (x86)\LAPS\CSE\'
# Identify if installed by checking the AD Object
Get-ADObject 'CN=ms-mcs-admpwd,CN=Schema,CN=Configuration,DC=DC01,DC=Security,CN=Local'Enumerate GPO's that have "LAPS" in the name
# PowerView
Get-DomainGPO | ? { $_.DisplayName -like "*laps*" } | select DisplayName, Name, GPCFileSysPath | fl
Get-DomainGPO | ? { $_.DisplayName -like "*password solution*" } | select DisplayName, Name, GPCFileSysPath | flEnumerate Principals that can read the password on select systems
ms-mcs-admpwd attribute
LAPS Configuration file
If LAPS is deployed by a GPO, we can identify the configuratio file to discover some details about the configuration.
After downloading the GPO registry.pol file use Parse-PolFile to read the file.
GPRegistryPolicyParser: https://github.com/PowerShell/GPRegistryPolicyParser
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.
LAPS Module commands
Metasploit

LAPSToolkit
GitHub: https://github.com/leoloobeek/LAPSToolkit

LAPS Persistence
LAPS may be configured to automatically update a computers password on a regular basis. If we have compromised a computer and elevated to SYSTEM we can update the value to never expire for 10 years as a means of persistence.
Resources
Last updated