Unsecured Credentials: Credentials in Registry

Adversaries may search the Registry on compromised systems for insecurely stored credentials. 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: T1552.002
Sub-technique of:  T1552
Platforms: Windows
Contributors: Sudhanshu Chauhan, @Sudhanshu_C
Version: 1.2
Created: 04 February 2020
Last Modified: 24 October 2025

Procedure Examples

ID Name Description
S0331 Agent Tesla

Agent Tesla has the ability to extract credentials from the Registry.[2]

G0050 APT32

APT32 used Outlook Credential Dumper to harvest credentials stored in Windows registry.[3][4]

S1022 IceApple

IceApple can harvest credentials from local and remote host registries.[5]

S0194 PowerSploit

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]

G1039 RedCurl

RedCurl used LaZagne to obtain passwords in the Registry.[6][7]

S0075 Reg

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

S1183 StrelaStealer

StrelaStealer enumerates the registry key HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\ to identify the values for "IMAP User," "IMAP Server," and "IMAP Password" associated with the Outlook email application.[8][9][10]

S0266 TrickBot

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

S0476 Valak

Valak can use the clientgrabber module to steal e-mail credentials from the Registry.[12]

Mitigations

ID Mitigation Description
M1047 Audit

Proactively search for credentials within the Registry and attempt to remediate the risk.

M1027 Password Policies

Do not store credentials within the Registry.

M1026 Privileged Account Management

If it is necessary that software must store credentials in the Registry, then ensure the associated accounts have limited permissions so they cannot be abused if obtained by an adversary.

Detection Strategy

ID Name Analytic ID Analytic Description
DET0250 Detect Credential Discovery via Windows Registry Enumeration AN0694

Defenders observe command-line executions or API-based registry reads targeting sensitive paths like HKLM or HKCU with keyword filters such as 'password', 'cred', or 'logon'. Typically performed by Reg.exe, PowerShell, custom binaries, or offensive tools such as Cobalt Strike. Correlation with process ancestry and command-line arguments indicates suspicious credential discovery activity.

References