FortiSIEM Rules

Windows: Suspicious Elevated System Shell

Rule ID


Default Status



Detects when a shell program such as the windows Command Prompt or PowerShell is launched with system privileges. This rule is adapted from







Persistence consists of techniques that adversaries use to keep access to systems across restarts, changed credentials, and other interruptions that could cut off their access. Techniques used for persistence include any access, action, or configuration changes that let them maintain their foothold on systems, such as replacing or hijacking legitimate code or adding startup code.

MITRE ATT&CK® Techniques

No Technique Specified



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="Win-Sysmon-1-Create-Process" AND ((procName REGEXP "\\cmd\.exe$|\\powershell\.exe$|\\pwsh\.exe$" OR srcFileName IN ("Cmd.Exe","PowerShell.EXE","pwsh.dll")) AND (user REGEXP ".*AUTHORI.*|.*AUTORI.*" AND winLogonId="0x3e7")) AND ((parentProcName NOT REGEXP "^C:\\Program Files \(x86\)\\|^C:\\Program Files\\|^C:\\Windows\\System32\\" OR procName NOT REGEXP "\\cmd\.exe$|\\powershell\.exe$") AND (parentProcName!="C:\\ManageEngine\\ADManager Plus\\pgsql\\bin\\postgres.exe" OR procName NOT REGEXP "\\cmd\.exe$") AND (parentProcName NOT REGEXP "^C:\\Windows\\SysWOW64\\config\\systemprofile\\Citrix\\UpdaterBinaries\\" OR parentProcName NOT REGEXP "\\CitrixReceiverUpdater\.exe$" OR procName NOT REGEXP "\\cmd\.exe$") AND (command NOT REGEXP "^C:\\WINDOWS\\system32\\cmd\.exe /c \"" OR dirName NOT REGEXP ".*C:\\WINDOWS\\Temp\\asgard2-agent\\.*") AND (parentProcName NOT REGEXP "^C:\\Windows\\Temp" OR parentProcName NOT REGEXP "\\invcol\.exe$" OR parentCommand NOT REGEXP ".*C:\\ProgramData\\Dell\\UpdateService\\.*" OR procName NOT REGEXP "\\cmd\.exe$") AND (parentProcName NOT REGEXP "^C:\\Windows\\WinSxS\\" OR parentProcName NOT REGEXP "\\CompatTelRunner\.exe$" OR parentCommand NOT REGEXP "^C:\\Windows\\system32\\CompatTelRunner\.exe -m:appraiser\.dll -f:DoScheduledTelemetryRun") AND (parentProcName NOT REGEXP "^C:\\IBM\\SpectrumProtect\\webserver\\scripts\\" OR command NOT REGEXP ".*C:\\IBM\\SpectrumProtect\\webserver\\scripts\\.*") AND (command!="powershell.exe -ExecutionPolicy Restricted -Command Write-Host 'Final result: 1';") AND (procName NOT REGEXP "\\cmd\.exe$" OR command NOT REGEXP ".*/d /c C:\\Windows\\system32\\silcollector\.cmd.*") AND (procName NOT REGEXP "\\cmd\.exe$" OR command NOT REGEXP "cmd\.exe /c btool server list general --no-log$|cmd\.exe /c btool server list replication_port --no-log$") AND (procName NOT REGEXP "\\cmd\.exe$" OR command NOT REGEXP ".*C:\\Windows\\system32\\reg\.exe query hklm\\software\\microsoft\\windows\\softwareinventorylogging /v collectionstate /reg:64.*") AND (procName!="C:\\Windows\\System32\\cmd.exe" OR command!="C:\\Windows\\system32\\cmd.exe /c PAUSE"))

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

command = Filter.command,
dirName = Filter.dirName,
hostName = Filter.hostName,
parentCommand = Filter.parentCommand,
parentProcName = Filter.parentProcName,
procName = Filter.procName,
srcFileName = Filter.srcFileName,
user = Filter.user,
winLogonId = Filter.winLogonId