Autologon Credentials Stored in the Registry

Windows automatic logon is configured with the account's password stored in plain text in the registry, where local users can read it.

SeverityMedium
CVSS 3.15.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Open in the calculator
CVSS 4.06.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-256: Plaintext Storage of a Password
OWASP Top 10A06:2025 Insecure Design
MITRE ATT&CKT1552.002 Credentials in Registry, T1078 Valid Accounts
CategoryInformation Disclosure

Description

The host is configured to sign an account in automatically at start-up, and the account's password is held in clear text in the DefaultPassword value under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon, alongside AutoAdminLogon, DefaultUserName and DefaultDomainName. This configuration is common on kiosks, digital signage, shared terminals, laboratory machines and servers that run an application in an interactive session.

Standard users can normally read the Winlogon key, so any local user who can run commands on the host, or malware running as one, can recover the password with a simple registry query. The impact depends on the account: where it is a local or domain account with administrative rights, which is common on application servers and kiosks set up for convenience, the password gives full control of the host and possibly of others. Even a low-privileged domain account gives an attacker a valid identity on the wider network, and the password may be reused elsewhere.

The weakness is identified with reg query or by local enumeration tools such as WinPEAS, Seatbelt and PowerUp, and credentialed scans may report it. The same credentials are sometimes also present in the Windows Setup answer files used to build the host. Automatic logon configured with the Sysinternals Autologon tool instead stores the password as an LSA secret, which only administrators can read.

Remediation

  • Remove automatic logon where it is not essential: set AutoAdminLogon to 0 and delete the DefaultPassword value, then change the exposed account's password, which must be treated as compromised.
  • Where automatic logon is required, use a dedicated local account with only the rights the kiosk or application needs, never an administrative or general-purpose domain account, and configure it with the Sysinternals Autologon tool rather than the plain-text registry value.
  • Remove any copies of the credentials from Windows Setup answer files and deployment files left on the host.
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 0 /f

Confirm the fix by querying the Winlogon key as a standard user and checking that no DefaultPassword value is returned, and that the old password no longer works.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Windows and Linux Hosts Findings

Every Windows and Linux Hosts finding