Windows RunOnce Execution via runonce.exe With AlternateShellStartup and /r
Alerts on runonce.exe executing with /AlternateShellStartup and /r, consistent with configured RunOnce persistence behavior.
- Product
- windows
- Category
- process_creation
- Author
- Avneet Singh @v3t0_, oscd.community, Christopher Peacock @SecurePeacock (updated) (SigmaHQ), DRL 1.1
- Published
- 2020-10-18
- Updated
- 2026-07-30
ATT&CK techniques
Persistence → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags process creation of runonce.exe when it is invoked as the “Run Once Wrapper” with command-line parameters that include /AlternateShellStartup and /r. Such behavior matters because it can trigger attacker-controlled or persistence-oriented commands to run once during the system’s startup sequence or at a scheduled time. The detection relies on Windows process creation telemetry, matching the process image path, process description, and specific command-line argument patterns.
Reporting behind it
- twitter.comhttps://twitter.com/pabraeken/status/990717080805789697
- lolbas-project.github.iohttps://lolbas-project.github.io/lolbas/Binaries/Runonce/
- twitter.comhttps://twitter.com/0gtweet/status/1602644163824156672?s=20&t=kuxbUnZPltpvFPZdCrqPXA
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_runonce_execution.yml
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows RunOnce Execution via runonce.exe With AlternateShellStartup and /r
id: 0e5a29ff-378e-40b4-bb1d-24b1aaf6b344
status: test
description: This rule flags process creation of runonce.exe when it is invoked as the “Run Once Wrapper” with command-line parameters that include /AlternateShellStartup and /r. Such behavior matters because it can trigger attacker-controlled or persistence-oriented commands to run once during the system’s startup sequence or at a scheduled time. The detection relies on Windows process creation telemetry, matching the process image path, process description, and specific command-line argument patterns.
references:
- https://twitter.com/pabraeken/status/990717080805789697
- https://lolbas-project.github.io/lolbas/Binaries/Runonce/
- https://twitter.com/0gtweet/status/1602644163824156672?s=20&t=kuxbUnZPltpvFPZdCrqPXA
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_runonce_execution.yml
author: Avneet Singh @v3t0_, oscd.community, Christopher Peacock @SecurePeacock (updated), Huntrule Team
date: 2020-10-18
modified: 2022-12-13
tags:
- attack.persistence
- attack.defense-impairment
- attack.t1112
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: \runonce.exe
- Description: Run Once Wrapper
selection_cli:
- CommandLine|contains: /AlternateShellStartup
- CommandLine|endswith: /r
condition: all of selection_*
falsepositives:
- Unknown
level: low
license: DRL-1.1
related:
- id: 198effb6-6c98-4d0c-9ea3-451fa143c45c
type: derived