There are lots of web sites and books devoted to Windows security. But I’m always surprised at the number of Windows administrators that are not even aware that Windows, by default, caches (stores) the last ten user credentials (names and passwords) used on a PC.
Why is this a problem? Because, odds are, one of those credentials belongs to the system administrator. If the administrator has ever logged into that PC, to set it up initially, to install software or to troubleshoot, the administrator’s credentials are likely in the cache. If (I mean…when) one of your PCs gets compromised, the first thing the attacker does is look in that cache to get the administrator’s credentials. Once the attacker has that, he has free reign to go anywhere in your network and steal any information. In short, the administrator’s credentials give the attacker access to everything. Having the administrator’s credentials in the cache is a little like leaving the front door key under the mat; that’s the first place criminals look.
The idea behind caching credentials is to allow multiple users to log in to a PC when the domain controller is unavailable. In modern enterprise networks, however, this almost never happens, so there’s no need to cache credentials. You can change the cache setting to 0 so the PC won’t cache any. Laptops, which might be disconnected from the network, are an exception, but they should be set to only cache one credential (i.e. the last user).
Another credential to be concerned about is the local administrator’s. This is the account used to initially configure the PC, and is also commonly used for troubleshooting or making hardware changes. In many large organizations, the same local admin credentials are used on every PC. Again, if the attacker gets the local administrator’s credentials, he will be able to log into every PC.
To prevent attackers from stealing administrator credentials and having free reign over your network, you should follow these basic account hygiene rules:
- Set every PC and server to not cache credentials. In the Windows registry, go to HKLMSoftwareWindows NTWinlogon. Set the CachedLogonsCount to 0. For laptops, set this to 1.
- Configure the policy on each PC to prevent to prevent the local administrator from logging on remotely. It is especially important to do this on servers. The exact steps are different depending on which version of Windows you’re using (see http://support.microsoft.com/kb/2258492 for details).
- As an additional layer of security, use a different local administrator password for user PCs and servers.
- Make sure that your administrators have separate accounts for admin duties. They should use a user-level account for general work, and only use their administrator account for administrative duties.
One response to “Security Mistakes That Leave You Vulnerable To Compromise #5: Caching Windows Credentials”
Item number 4 – Internet access should be enabled on user-level account ONLY and never any accounts with admin rights.