Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

Windows Service for User (S4U) Scheduled Task Persistence - Logon Trigger

Disclosed
Jan 2, 2013
Created
Apr 7, 2026

Description

Creates a scheduled task that will run using service-for-user (S4U).
This allows the scheduled task to run even as an unprivileged user
that is not logged into the device. This will result in lower security
context, allowing access to local resources only. The module
requires 'Logon as a batch job' permissions (SeBatchLogonRight).

This triggers on event 4101 which validates the Windows license after logon.

Authors

Thomas McCarthy "smilingraccoon" [email protected]
Brandon McCann "zeknox" [email protected]
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/service_for_user/logon
msf exploit(logon) > show targets
...targets...
msf exploit(logon) > set TARGET < target-id >
msf exploit(logon) > show options
...show and set options...
msf exploit(logon) > 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.