Rapid7

module

Windows Registry Persistence via Userinit

Disclosed
Jul 1, 2015
Created
Feb 18, 2026

Description

This module will install a payload that is executed during user logon.
It writes a payload executable to disk and modifies the Userinit registry value
in "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" to append the
payload path, causing it to execute when any user logs in.

Authors

joel joel @ ndepthsecurity
h00die

Platform

Windows

Architectures

x64, x86, aarch64

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/windows/persistence/registry_userinit
msf exploit(registry_userinit) > show targets
...targets...
msf exploit(registry_userinit) > set TARGET < target-id >
msf exploit(registry_userinit) > show options
...show and set options...
msf exploit(registry_userinit) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.