Detection rules › Sigma
Run Once Task Configuration in Registry
Rule to detect the configuration of Run Once registry key. Configured payload can be run by runonce.exe /AlternateShellStartup
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1112 Modify Registry |
| Defense Impairment | T1112 Modify Registry |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 12 | RegistryEvent (Object create and delete) |
| Sysmon | Event ID 13 | RegistryEvent (Value Set) |
| Sysmon | Event ID 14 | RegistryEvent (Key and Value Rename) |
Rule body yaml
title: Run Once Task Configuration in Registry
id: c74d7efc-8826-45d9-b8bb-f04fac9e4eff
status: test
description: Rule to detect the configuration of Run Once registry key. Configured payload can be run by runonce.exe /AlternateShellStartup
references:
- https://twitter.com/pabraeken/status/990717080805789697
- https://lolbas-project.github.io/lolbas/Binaries/Runonce/
author: 'Avneet Singh @v3t0_, oscd.community'
date: 2020-11-15
modified: 2024-03-25
tags:
- attack.persistence
- attack.defense-impairment
- attack.t1112
logsource:
product: windows
category: registry_event
detection:
selection:
TargetObject|contains: '\Microsoft\Active Setup\Installed Components'
TargetObject|endswith: '\StubPath'
filter_optional_chrome:
Details|contains|all:
- 'C:\Program Files\Google\Chrome\Application\'
- '\Installer\chrmstp.exe" --configure-user-settings --verbose-logging --system-level' # In some cases the Details will contain an additional flag called "--channel=stable" at the end
filter_optional_edge:
Details|contains:
- 'C:\Program Files (x86)\Microsoft\Edge\Application\'
- 'C:\Program Files\Microsoft\Edge\Application\'
Details|endswith: '\Installer\setup.exe" --configure-user-settings --verbose-logging --system-level --msedge --channel=stable'
condition: selection and not 1 of filter_optional_*
falsepositives:
- Legitimate modification of the registry key by legitimate program
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_optional_*Stage 1: selection
selection:
TargetObject|contains: '\Microsoft\Active Setup\Installed Components'
TargetObject|endswith: '\StubPath'
Stage 2: not filter_optional_*
filter_optional_chrome:
Details|contains|all:
- 'C:\Program Files\Google\Chrome\Application\'
- '\Installer\chrmstp.exe" --configure-user-settings --verbose-logging --system-level'
filter_optional_edge:
Details|contains:
- 'C:\Program Files (x86)\Microsoft\Edge\Application\'
- 'C:\Program Files\Microsoft\Edge\Application\'
Details|endswith: '\Installer\setup.exe" --configure-user-settings --verbose-logging --system-level --msedge --channel=stable'
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
Details | match | C:\Program Files (x86)\Microsoft\Edge\Application\ |
Details | match | C:\Program Files\Microsoft\Edge\Application\ |
Details | ends_with | \Installer\setup.exe" --configure-user-settings --verbose-logging --system-level --msedge --channel=stable |
Details | match | C:\Program Files\Google\Chrome\Application\ |
Details | match | \Installer\chrmstp.exe" --configure-user-settings --verbose-logging --system-level |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
TargetObject | ends_with |
|
TargetObject | match |
|