> For the complete documentation index, see [llms.txt](https://dmcxblue.gitbook.io/red-team-notes-2-0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/credential-access/t1552-unsecured-credentials/credentials-in-registry.md).

# 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:

·         Local Machine Hive: reg query HKLM /f password /t REG\_SZ /s

·         Current User Hive: reg query HKCU /f password /t REG\_SZ /s

**Example**

In this Demo is simply as running both of the commands mentioned with the different permissions available (User and Administrator)

User

![](/files/-MRkqGiGwmPekoUPJUV1)

Administrator

![](/files/-MRkqHRadXI2A98WkZuZ)
