FortiSIEM Rules

Windows: Run Once Task Configuration in Registry

Rule ID


Default Status



Detects the configuration of Run Once registry key. Configured payload can be run by runonce.exe /AlternateShellStartup. This rule is adapted from






Defense Evasion

Defense Evasion consists of techniques that adversaries use to avoid detection throughout their compromise. Techniques used for defense evasion include uninstalling/disabling security software or obfuscating/encrypting data and scripts. Adversaries also leverage and abuse trusted processes to hide and masquerade their malware. Other tactics’ techniques are cross-listed here when those techniques include the added benefit of subverting defenses.

MITRE ATT&CK® Techniques


Modify Registry

Adversaries may interact with the Windows Registry to hide configuration information within Registry keys, remove information as part of cleaning up, or as part of other techniques to aid in persistence and execution.



Data Source

Windows Sysmon via FortiSIEM Agent



Remediation Guidance

No remediation guidance specified

Time Window

If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.

300 seconds

Trigger Conditions

If the following defined pattern/s occur within a 300 second time window.


SubPattern Definitions

SubPattern Name: Filter

This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.

SubPattern Query

This is the query logic that matches incoming events

eventType REGEXP "Win-Sysmon-12-Registry-.*|Win-Sysmon-13-Registry-.*|Win-Sysmon-14-Registry-.*" AND (regKeyPath REGEXP "^HKLM\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components" AND regKeyPath REGEXP "\\StubPath$") AND ((details NOT REGEXP "^\"C:\\Program Files\\Google\\Chrome\\Application\\" OR details NOT REGEXP ".*\\Installer\\chrmstp\.exe\" --configure-user-settings --verbose-logging --system-level.*") AND (details NOT REGEXP "^\"C:\\Program Files \(x86\)\\Microsoft\\Edge\\Application\\|^\"C:\\Program Files\\Microsoft\\Edge\\Application\\" OR details NOT REGEXP "\\Installer\\setup\.exe\" --configure-user-settings --verbose-logging --system-level --msedge --channel=stable$"))

Group by Attributes

This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID


Aggregate Constraint

This is most typically a numerical constraint that defines when the rule should trigger an incident

COUNT(*) >= 1

Incident Attribute Mapping

This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.

The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern

details = Filter.details,
hostName = Filter.hostName,
regKeyPath = Filter.regKeyPath