FileRisk: Do not touch
winlogon.exe C:\Windows\System32\winlogon.exe
Interactive logon process: handles the secure attention sequence, loads the profile and starts the user shell.
What it’s for
winlogon.exe handles interactive sign-in and sign-out. It processes the secure attention sequence (Ctrl+Alt+Del), authenticates the user through authentication providers, loads their profile and environment, locks and unlocks the workstation, then starts userinit.exe, which launches the shell (explorer.exe). There is one instance per interactive session.
What it contains
- An executable signed by Microsoft in
C:\Windows\System32. - Its configuration is under
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon, notably theShellandUserinitvalues. - It relies on
lsass.exefor authentication.
Risks and best practices
- Do not terminate it: stopping
winlogon.execauses a blue screen or ends the session. - Check
ShellandUserinit, two classic persistence targets. Their defaults areexplorer.exeandC:\Windows\system32\userinit.exe,(with the trailing comma). Anything else needs an explanation. - Do not replace the file. If it is corrupt, run
sfc /scannow.
Useful commands
# Running instances: one per interactive session, check path and signatureGet-CimInstance Win32_Process -Filter "Name='winlogon.exe'" | Select-Object ProcessId, SessionId, ExecutablePath
# Digital signature of the fileGet-AuthenticodeSignature "$env:windir\System32\winlogon.exe" | Select-Object Status, @{n="Signer";e={$_.SignerCertificate.Subject}}
# Shell and Userinit valuesGet-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' | Select-Object Shell, Userinit