Rapid7

module

Linux WSL via Startup Folder Persistence

Disclosed
Aug 2, 2016
Created
Feb 24, 2026

Description

This module establishes persistence by creating a payload in the windows startup folder from within
the Windows Subsystem for Linux (WSL) environment. This allows for code execution on Windows user login.

Verified on Windows 10 with Ubuntu 24.04 WSL distribution.

Author

h00die

Platform

Windows

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/linux/persistence/wsl/startup_folder
msf exploit(startup_folder) > show targets
...targets...
msf exploit(startup_folder) > set TARGET < target-id >
msf exploit(startup_folder) > show options
...show and set options...
msf exploit(startup_folder) > 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.