Userinit Registry Persistence
Appending a payload path to the Userinit registry value under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon, causing the payload to execute every time a user logs on.
Method
- Open
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.^[r2:fcn.140005090] - Read the existing
Userinitvalue (normallyC:\Windows\system32\userinit.exe). - Append the payload path (e.g.
protocol.exe) separated by a comma. - Write the modified value back using
RegSetValueExW.^[strings.txt:10354]
Detection Notes
- The
Userinitvalue should only containuserinit.exe. Any comma-separated additional paths are suspicious. - Monitor
RegSetValueExWonWinlogon\Userinit.
Capabilities
- userinit-registry-persistence