LAPS
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
This page is about persitence, you may have a look on LAPS-based attacks and .
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.
With the following commands, using Set-DomainObject
from 's , we can update the ms-Mcs-AdmPwdExpirationTime
value to never expire for 10 years.
The original source code for LAPS can be found . It's possible to put a backdoor in the code (inside the Get-AdmPwdPassword
method in Main/AdmPwd.PS/Main.cs
for example) that will somehow exfiltrate new passwords or store them somewhere.
Add some evil code inside the function and Recompile :
After compiling it, upload the new AdmPwd.PS.dll
to the machine in C:\Tools\admpwd\Main\AdmPwd.PS\bin\Debug\AdmPwd.PS.dll
(and change the modification time using ).