Overview
The WindowsAutoLogon command checks the registry for Windows AutoLogon configuration. When AutoLogon is enabled, user credentials (including plaintext passwords) are stored in the registry to automatically log on a user at system startup. This is a significant security risk and provides easy credential access.Syntax
Remote Execution
Output
Returns AutoLogon configuration:- AutoAdminLogon status (enabled/disabled)
- Default domain name
- Default username
- Default password (plaintext)
- AutoLogon count
Use Cases
- Red Team
- Blue Team
- Extract plaintext credentials from registry
- Discover service account credentials
- Find kiosk or shared system credentials
- Identify easy credential access
- Locate automatic logon accounts
Example Output
Remote Execution
This command supports remote execution using the
-computername parameter.Detection Considerations
- Registry Access: Queries
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon - Event Logs: Registry access may be logged (Event ID 4656/4663)
- WMI Activity: Remote execution generates WMI events
- EDR Telemetry: Credential access attempts are often flagged
Registry Keys Checked
The command queries these registry values:Defensive Recommendations
Remediation Steps
Remediation Steps
-
Disable AutoLogon if not required:
- Set
AutoAdminLogonto 0 - Remove
DefaultPasswordvalue
- Set
-
For Kiosks/Shared Systems:
- Use dedicated kiosk mode
- Implement application restrictions
- Use separate, limited-privilege accounts
-
Monitoring:
- Enable registry auditing on Winlogon keys
- Alert on AutoAdminLogon modifications
- Monitor for credential extraction patterns
-
Alternative Solutions:
- Use Assigned Access for kiosk mode
- Implement shell launcher
- Use credential guard on sensitive systems
Related Commands
- LocalUsers - Local user accounts
- CredGuard - Credential Guard configuration
- LSASettings - LSA configuration
- LogonSessions - Active logon sessions