In a company, when setting up new servers or computers, administrators often use a common password for the local administrator account. Administrators often use this account as a back door to install or uninstall software, log in when domain authentication doesn't work, troubleshoot operating system issues, etc. This password is also mostly not complex. We know that some people use passwords known as "Pa$$w0rd" for local administrator accounts. When someone leaves the company, we often change the domain password or deactivate the accounts. However, these local administrator accounts remain the same because changing local account passwords is a complex and time-consuming process. However, in a typical identity attack, the compromised local administrator account allows attackers to perform pass-the-hash (PtH) attacks and move laterally within the organization, easily compromising more systems. The Microsoft Local Administrator Password Solution (LAPS) addresses this problem by setting a unique complex password for the local administrator account on all domain-joined devices. This local administrator account password defined by Microsoft LAPS is automatically changed according to the password policy. The new passwords are stored in Active Directory and authorized technicians can retrieve the passwords from the Active Directory server when necessary. We do not require additional licenses or additional servers to implement this solution. This is a free tool. Microsoft LAPS requires aGroup Policy Client Side Extension (CSE)installed on each computer to perform all administration tasks. Once LAPS is installed,Group Policy Client Side Extension (CSE)installed on each computer updates the local administrator password in the following order. 1. Generate a new password for the local administrator account. In the next few steps, I'll show how we can implement Microsoft LAPS. To simplify the implementation process, I have categorized the tasks into the following steps. 1. Check the prerequisites Before we start configuring, we need to check if the current environment supports it. We need to confirm the following before proceeding with Microsoft LAPS setup. The next configuration step is to install Microsoft LAPS. Do that, Figure 1 - Microsoft LAPS Setup Wizard Figure 2: Install management tools After that, we need the Active Directory schema to support Microsoft LAPS. Microsoft LAPS uses two new attributes for computer objects. To extend the AD schema, Figure 3: Updating the Active Directory schema Figure 4: New attributes on the computer object These values will be updated once we are done with the rest of the configuration. During the password update process, the computer object itself must have permission to write valuesms-Mcs-AdmPwdmims-Mcs-AdmPwdExpirationTimeattributes. To do this, we need to grant permissions.AUTOintegrated account. Do that, Figure 5: Changing Computer Object Permissions In the above example "RAS servers" is the OU I created for all machine objects. In my demo environment, I have a security group called "IT admin🇧🇷 I need users in this group to see local admin passwords. Before we assign permissions, let's see who has permissions to see passwords by default. Do that, Find-AdmPwdExtendedRights -Identity "RAS Servers" Figure 6: Check extended rights As we can see above, the advanced permissions only apply to the domain administrators group. It means a local administrator password for a computer object under "RA serverOr, it can only be accessed through a domain administrator account. We need to grant the same permissions for "IT admin"Security group. To this we can run Set-AdmPwdReadPasswordPermission -Identidad „RAServers“ -AllowedPrincipals „ITAdmins“ Figure 7: Updated Extended Rights Microsoft LAPS required a client-side extension on each device. Let's see how we can do this in the next step. There are many different methods that we can use to install an agent on a computer. But in this demo I use the GPO to publish and install the agent on the computers. Figure 8: Install agent with GPO This sends the agents to the computers in the RAServers OU. The installation requires a reboot on the client computer to complete the installation. We already have everything ready for Microsoft LAPS. It only remains to configure a new GPO with LAPS settings. Figure 9: Microsoft LAPS GPO Settings Figure 10: Microsoft LAPS GPO Settings (Password) Figure 11 - Microsoft LAPS GPO Settings (Administrator Account Name to Manage) This completes the Microsoft LAPS setup process. Once this policy has been applied to the endpoints, we can start testing. Once the policy has been applied, there are ways to view the local administrator password. Figure 12: Verifying the local administrator password using the LAPS user interface As we can see, LAPS changed the password of the local administrator account. Figure 13: Verifying the local administrator password with PowerShell Note: Be sure to import the AdmPwd.PS PowerShell module before running the above command. As we can see, Microsoft LAPS automatically changes the local administrator password and writes it to Active Directory. This helps prevent lateral movement during an identity attack. Learn more:
2. Confirm the new password using the password policy settings.
3. Store the password in the Active Directory computer object attributems-Mcs-AdmPwd🇧🇷 This attribute is added to the schematic as part of the LAPS installation process.
4. Save the expiration date of the following password inms-Mcs-AdmPwdExpirationTimeAttribute. This attribute was also added to the schema as part of the LAPS installation process.
5. Change the administrator password.
2. Instalar Microsoft LAPS
3. Update the Active Directory schema
4. Change the permissions of the computer object
5. Assign group permissions for password access
6. Install CSE on computers
7. Create GPO for LAPS configuration
8. TestsCheck prerequisites
Instalar Microsoft LAPS
This link contains several .msi files. You must download the .msi file that corresponds to your configuration. In my demo environment I will useLAPS.x64.msiUpdate the Active Directory schema
AdmPwd.PS-ImportmodulChange permissions of computer objects
Assign password access permissions to the group
AdmPwd.PS-ImportmodulInstall CSE on computers
Create GPO for LAPS settings
Test
©Microsoft. This article was originally posted byITOps Talk Blog de Microsoft🇧🇷 You can find themoriginal article here.