Credentials in Registry

The Windows Registry stores configuration information that can be used by the system or other programs. Adversaries may query the Registry looking for credentials and passwords that have been stored for use by other programs or services. Sometimes these credentials are used for automatic logons.

Example commands to find Registry keys related to password information: [1]

  • Local Machine Hive: reg query HKLM /f password /t REG_SZ /s
  • Current User Hive: reg query HKCU /f password /t REG_SZ /s
ID: T1214

Tactic: Credential Access

Platform:  Windows

System Requirements:  Ability to query some Registry locations depends on the adversary's level of access. User permissions are usually limited to access of user-related Registry keys.

Permissions Required:  User, Administrator

Data Sources:  Windows Registry, Process command-line parameters, Process monitoring

Contributors:  Sudhanshu Chauhan, @Sudhanshu_C

Version: 1.0



PowerSploit has several modules that search the Windows Registry for stored credentials: Get-UnattendedInstallFile, Get-Webconfig, Get-ApplicationHost, Get-SiteListPassword, Get-CachedGPPPassword, and Get-RegistryAutoLogon.[1]


Reg may be used to find credentials in the Windows Registry.[1]


TrickBot has retrieved PuTTY credentials by querying the Software\SimonTatham\Putty\Sessions registry key[2]


Do not store credentials within the Registry. Proactively search for credentials within Registry keys and attempt to remediate the risk. If necessary software must store credentials, then ensure those accounts have limited permissions so they cannot be abused if obtained by an adversary.


Monitor processes for applications that can be used to query the Registry, such as Reg, and collect command parameters that may indicate credentials are being searched. Correlate activity with related suspicious behavior that may indicate an active intrusion to reduce false positives.