T1552.002

Credentials in Registry

Adversaries may search the Windows Registry on compromised systems for insecurely stored credentials. The Registry stores configuration data used by programs for automatic logons, saved passwords, and service credentials. Common registry credential locations include: Windows AutoLogon (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword), PuTTY saved sessions (SOFTWARE\SimonTatham\Putty\Sessions), Outlook profiles (HKCU\SOFTWARE\Microsoft\Office\16.0\Outlook\Profiles), VNC passwords (SOFTWARE\{TightVNC,RealVNC,UltraVNC}), and SNMP community strings. TrickBot, APT32, IceApple, Valak, and StrelaStealer have all abused registry credential storage.

Microsoft Sentinel / Defender
kusto
// Detect registry credential access and search
let CredentialRegistryKeys = dynamic([
  "Winlogon", "DefaultPassword", "AutoAdminLogon",
  "SimonTatham", "Putty", "PuTTY",
  "Outlook\\Profiles", "IMAP Password", "POP3 Password",
  "VNC", "RealVNC", "TightVNC", "UltraVNC",
  "WinVNC", "password", "Password"
]);
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where ActionType in ("RegistryKeyQueried", "RegistryValueQueried")
| where RegistryKey has_any (CredentialRegistryKeys)
| extend IsAutoLogon = RegistryKey has "Winlogon" and (RegistryValueName has "Password" or RegistryValueName has "AutoAdminLogon")
| extend IsPutty = RegistryKey has_any ("SimonTatham", "PuTTY", "Putty")
| extend IsOutlook = RegistryKey has "Outlook" and RegistryKey has "Profiles"
| extend IsVNC = RegistryKey has_any ("VNC", "RealVNC", "TightVNC", "UltraVNC")
| project Timestamp, DeviceName, InitiatingProcessAccountName, RegistryKey, RegistryValueName,
         InitiatingProcessFileName, InitiatingProcessCommandLine,
         IsAutoLogon, IsPutty, IsOutlook, IsVNC
| union (
    // Detect reg.exe bulk registry search for passwords
    DeviceProcessEvents
    | where Timestamp > ago(24h)
    | where FileName in~ ("reg.exe", "powershell.exe", "pwsh.exe")
    | where ProcessCommandLine has_any (
        "query HKLM /f password", "query HKCU /f password",
        "query HKLM /f passwd", "query HKCU /f passwd",
        "Get-ItemProperty", "Get-RegistryAutoLogon", "Find-GPOPassword"
      )
    | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName
)
| sort by Timestamp desc
high severity high confidence

Data Sources

Windows Registry: Windows Registry Key Access Process: Process Creation Command: Command Execution

Required Tables

DeviceRegistryEvents DeviceProcessEvents

False Positives

  • AutoLogon configuration tools legitimately reading/writing DefaultPassword for kiosk or service account auto-logon setup
  • PuTTY and SSH client applications accessing their own saved session credentials for connection
  • Microsoft Outlook and email clients accessing their own profile credential storage
  • IT inventory and compliance tools that audit registry settings including credential storage configuration
  • Security assessment tools explicitly authorized to check for insecure credential storage in the registry

Unlock Pro Content

Get the full detection package for T1552.002 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections