Using Tanium to Find Clear Text Administrator Passwords in the Windows Registry

This weekend I rebuilt my lab. In order to save time, I wanted to configure my Windows system to automatically login with the administrator account. I remembered this was a trick I had used in the past.

Then I researched how the Microsoft feature worked. That's when I saw a problem. The autologon feature allows a user to configure a password. Users could be storing clear text administrator passwords in the registry! This is not safe. In fact, it’s probably not a good idea to have production systems login automatically at all!


FindClearTextAdminis_9b986b84-53a9-4341-b4de-c734707323d1.png

Example Password in the Registry

Here is a Tanium question you can use to check to see if this feature is configured in your environment:

Get Registry Key Value Names[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] contains password from all machines

Note: you should see some results (at least an entry for PasswordExpiryWarning). If you don’t see any results, something is probably wrong.

After asking this question you can drill down on DefaultPassword to get the computer names to create a list of systems that could be impacted. My question above broadly looks for “password” as there may be renamed instances of the value name.


FindClearTextAdminis_e9aea050-3efe-48ec-ad31-72f097270726.png

Example Bad Result with a Value Name of “DefaultPassword”

Notes:

  1. This question provided above does not show passwords. You would need to check each system to see what is configured in the “DefaultPassword” value to see what password is configured.

  2. Autologon is a Sysinternals tool that uses an encrypted password to automatically login. This question does not show systems that have used that tool to configure automatic logon.

  3. There are other locations where passwords could be stored in clear text. There may be other locations where administrators will want to check to ensure this bad practice is not happening.

After you find where passwords are stored, you will likely want to remove the passwords and ensure they are not in use elsewhere in the environment. You may also consider changing the passwords so they cannot be used again.

If you didn’t find any results, or even if you did and are still looking for something fun to do: here’s a related article I wrote on finding clear text password files using Index.