Remote Use of Local Accounts: LAPS Changes Everything
Published Jun 18 2019 01:16 PM 20.4K Views
Former Employee
First published on TechNet on Dec 10, 2018


Long overdue post revisiting the question about whether and when to block the use of local accounts, particularly for remote administration.

Beginning in 2014 with our baselines for Windows 8.1 and Windows Server 2012R2, our security baselines have been blocking remote use of local accounts . Back then, Windows had yet to offer anything resembling secure management of administrative local account credentials. It was typical for an entire organization to have an administrative local user account with the same username and password on every Windows computer. One problem with that is that the common password often becomes a well-known secret over time with no way to revoke access from anyone who ever received it. But by far the biggest problem is that an attacker with administrative rights on one machine can easily obtain the account’s password hash from the local Security Accounts Manager (SAM) database and use it to gain administrative rights over the other machines using “pass the hash” techniques.


In May 2015, Microsoft released the Local Administrator Password Solution (LAPS) . LAPS is an elegant and lightweight mechanism for Active Directory domain-joined systems that periodically sets each computer’s admin account password to a new random and unique value, storing the password in a secured confidential attribute on the corresponding computer object in Active Directory where only specifically-authorized users can retrieve it.


LAPS changes everything.


Not only does LAPS neutralize both the pass-the-hash and well-known-secret problems, it creates new opportunities for remote management. With LAPS – or in fact, with any solution that makes local account passwords unique and not guessable – using local accounts for remote computer management actually offers some advantages over using domain accounts. They can, that is, provided that their use isn’t blocked by security policy – which our baselines do today.


It’s all about credential hygiene. Good credential hygiene means not exposing credentials on a potentially-compromised system when those credentials can be used to compromise another system. Credentials can be a plaintext password, an account’s NTLM hash, or a Kerberos TGT. Microsoft’s Pass the Hash whitepapers go into detail about which remote logon types and tools expose credentials and which ones don’t.


Let’s say your helpdesk technicians each have a domain account that is granted administrative rights on all workstations in the domain. User Umberto reports computer issues, so Helen helpdesk technician logs on remotely to the workstation using her privileged domain account, not realizing that the workstation has been compromised with credential theft malware. Depending on how Helen logged on, her account credentials could be stolen and the thief can now gain administrative control over all workstations. All the technicians might follow the whitepapers’ recommendations, but they must do it the right way every single time. One technician with a privileged account making one mistake just one time can lead to a domain-wide compromise.


Let’s say instead of using a privileged domain account, Helen helpdesk technician retrieves the LAPS password for the workstation and uses the LAPS-managed administrative local account to log on. Credential theft is not a problem. If the thief gets the hash or even the plaintext password, it’s useful only on the computer that the thief already controls. So Helen can use whichever logon type or remote tool is most convenient for the work being performed.


Note: One caveat about using remote desktop: do not enable drive redirection for your local volumes when connecting to a potentially-compromised system. And avoid clipboard redirection as well. This caveat applies whether you’re using a LAPS-managed account, /restrictedAdmin, or anything else.


If you have deployed LAPS or another local account password management solution and you want to use local accounts for the remote administration of Windows computers, you need to change three of the Computer Configuration settings that we recommend in the baselines for Windows client and Windows Server in the Member Server role. We recommend these changes only if you plan to use LAPS-managed local accounts for remote administration. Note also that the local-policy scripts included with the Windows 1803 and 1809 baseline packages include “Non-Domain” options that implement these same changes.























Policy path



Windows Settings\Security Settings\Local Policies\User Rights Assignment



Policy name



Deny access to this computer from the network



Baseline setting



Win client : NT AUTHORITY\Local Account


Win Server : NT AUTHORITY\Local account and member of Administrators group



Updated setting



[empty]
























Policy path



Windows Settings\Security Settings\Local Policies\User Rights Assignment



Policy name



Deny log on through Remote Desktop Services



Baseline setting



NT AUTHORITY\Local Account



Updated setting



[empty]
























Policy path



Administrative Templates\MS Security Guide (*)



Policy name



Apply UAC restrictions to local accounts on network logon



Baseline setting



Enabled



Updated setting



Disabled



(*) “MS Security Guide” is a collection of custom settings that comes with the security baselines and is represented in SecGuide.admx. You can configure the updated setting directly by configuring the registry value LocalAccountTokenFilterPolicy to REG_DWORD value 1 in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.



6 Comments
Copper Contributor

Hi Aaron, 

nice to talk to you again ..

With the introduction of LAPS, I think many will switch to that configuration, because it's simple and really secure..
Do you have contact with the original developer of RDCMan 2.7? If yes, can you ask him to integrate the tool with LAPS? I mean, one more configuration panel where to specify the Domain name or a specific domain controller where the tool could query the computer name object in order to retrieve automatically the password for the administrator account.. if the user running the tool has the permission to do so..
It would be a killing feature for RDCMan when LAPS is deployed in the environment..

Thanks! Greetings from Italy!
-mario

Copper Contributor

Hi again Aaron..

LAPS it's a great solution to avoid lateral movement in a domain if a machine has been compromised, but here in Europe, we have GDPR..

one of the requirements of GDPR is that every access performed to administer a machine, must be logged with all the information about the admin which is logging on.. as you can imagine if all the admin which logs on to a server use the same account, that is local Administrator, this requirement is not satisfied at all.. So, unless there is a better logging of the remote desktop session which logs everything about the remote client, passing also the username of the user logging in as Administrator, LAPS cannot be used to perform server administration.. 
Do you think you can speak with the MSTSC client group so they can improve the logging passing together with the client address also the real name of the user logging on as Administrator?? Without this information LAPS its useless in Europe..

Ciao
-mario 

Brass Contributor
@mariora If you audit process creation and successful filtering platform connections on the administration servers and on the client you will have a full trace of the user who initiated the connection and everything they did on the remote machine. There's a little HEX to decimal conversion needed for the process to logon ID trace but this is only needed during a security investigation so doesn't impact on the day to day operations. This auditing can also help forensic investigations to non Windows machines too. Let me know if you need more information. Greetings from England. Steve
Copper Contributor

HI Steve, I'm really interested in everything that can help here tracking down the original user.. 
I already found this https://blogs.technet.microsoft.com/kfalde/2015/11/18/laps-audit-reporting-via-wef-posh-and-powerbi/ and this can help a little bit but there is always the problem of a jump server.. that is if the user access a middle server from where he goes to the AD to get the admin password  and then connect to the remote server as Administrator I can loose the original user as he could have logged on as a local user in the middle server..

Unfortunately GDPR has very strict rules on the logging.

Can you please explain more in detail your idea?

 

Thanks
-mario

Brass Contributor
Hi @mariora, To track the use of the local administrator you can look in the Windows security event log. On the source server you will see event ID 4648 which tells you the name of the source user, the remote machine name connected to and the remote credentials used. On the remote machine you will see Windows security event ID 4624 which tells you the credentials used, the source server name and the source IP address. The auditing that produces these events is enabled by the security baselines provided by Microsoft. To track other user activities across the network, including to non-Windows systems, you need to enable success auditing of ‘Object Access/Audit Filtering Platform Connection’, this will then log event ID 5156 in the Windows security event log. Example; A Linux server log shows a login from IP address 10.0.0.1 to TCP port 22 with a source port of 59109 The Windows security log on the server with address 10.0.0.1 has a corresponding event ID 5156 showing putty.exe making the connection with a matching source port and matching timestamp. The event ID 5156 will tell you the decimal process ID e.g. 7672, this needs to converted in Hex e.g. 1df8 Searching for process creation event ID 4688 containing 1df8 will find, for example; New Process ID: 0x1df8 New Process Name: C:\Program Files\PuTTY\putty.exe And in that log entry will be the account details of the user running the program. Let me know how you get on, Steve
Copper Contributor

Thanks Steve, will give it a try..

-mario

Version history
Last update:
‎Jun 18 2019 01:16 PM
Updated by: