T1552.002: 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
Positive Technologies products that cover the technique
MaxPatrol SIEM knowledge base
mitre_attck_cred_access: PT-CR-300: Search_Stored_Credentials: A user started a utility or script to retrieve passwords mitre_attck_cred_access: PT-CR-657: Reading_Registry_Objects: A request from a process to the registry objects containing user credentials is detected
Detection
ID | DS0009 | Data source and component | Process: Process Creation | Description | Monitor newly executed 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. Note: Pseudocode Event IDs are for Sysmon (Event ID 1 - process create) and Windows Security Log (Event ID 4688 - a new process has been created). The Analytic looks for command-line instances of searching the Windows Registry for insecurely stored credentials. This can be accomplished using the query functionality of the Reg system utility, by looking for keys and values that contain strings such as “password”. In addition, adversaries may use toolkits such as PowerSploit in order to dump credentials from various applications such as IIS. Accordingly, this analytic looks for invocations of reg.exe in this capacity as well as that of several PowerSploit modules with similar functionality. Analytic 1 - Credentials in Files & Registry
|
---|
ID | DS0024 | Data source and component | Windows Registry: Windows Registry Key Access | Description | Monitor for unexpected windows registry key being accessed that may search the Registry on compromised systems for insecurely stored credentials. |
---|
ID | DS0017 | Data source and component | Command: Command Execution | Description | Monitor executed commands and arguments that may search the Registry on compromised systems for insecurely stored credentials. |
---|
Mitigation
ID | M1027 | Name | Password Policies | Description | Do not store credentials within the Registry. |
---|
ID | M1026 | Name | Privileged Account Management | Description | 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. |
---|
ID | M1047 | Name | Audit | Description | Proactively search for credentials within the Registry and attempt to remediate the risk. |
---|