Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

Service installed with a shell, script host or UNC image path

Siemphony@siemphonyhighT1569.002unverified
AN1185 anchored on the service-creation record itself rather than on the process tree, which is what keeps it distinct from the DCOM and WMI execution rules already in this corpus: those match a child process on the target, this matches the moment Security 4697 registers a new service whose image is a command interpreter, a script host, a signed proxy binary, a PsExec-style temporary service, or a path on another machine. That is the common denominator of `sc create` with a command line for a binary, the Impacket service-execution family, and PsExec — all of them have to name something executable in ServiceFileName, and none of them can name a normal service binary. Only creation is in scope: an adversary who starts a service that already exists produces no 4697 at all and is invisible here, and the registry and network legs of AN1185 need MITRE's ParentProcessCorrelationWindow, which Sigma cannot express. 4697 requires Audit Security System Extension (Success), which is off in a default install — with it off this rule is blind rather than quiet. System log event 7045 carries the same facts without an audit policy, but it is a different log source than the one the brief names for this analytic. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0421, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.

detection.yml

Sentinel · KQL

Run this as a search.

SecurityEvent| where (EventID == 4697 and (ServiceFileName contains "\\cmd.exe" or ServiceFileName contains "%COMSPEC%" or ServiceFileName contains "powershell" or ServiceFileName contains "\\pwsh.exe" or ServiceFileName contains "\\wscript.exe" or ServiceFileName contains "\\cscript.exe" or ServiceFileName contains "\\mshta.exe" or ServiceFileName contains "\\rundll32.exe" or ServiceFileName contains "\\regsvr32.exe" or ServiceFileName contains "PSEXESVC" or ServiceFileName contains "\\\\"))

Splunk · SPL

Run this as a search.

index=* (EventID="4697" AND (ServiceFileName="*\\cmd.exe*" OR ServiceFileName="*%COMSPEC%*" OR ServiceFileName="*powershell*" OR ServiceFileName="*\\pwsh.exe*" OR ServiceFileName="*\\wscript.exe*" OR ServiceFileName="*\\cscript.exe*" OR ServiceFileName="*\\mshta.exe*" OR ServiceFileName="*\\rundll32.exe*" OR ServiceFileName="*\\regsvr32.exe*" OR ServiceFileName="*PSEXESVC*" OR ServiceFileName="*\\\\*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (event.code == 4697 AND (TO_LOWER(ServiceFileName) LIKE "*\\\\cmd.exe*" OR TO_LOWER(ServiceFileName) LIKE "*%comspec%*" OR TO_LOWER(ServiceFileName) LIKE "*powershell*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\pwsh.exe*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\wscript.exe*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\cscript.exe*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\mshta.exe*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\rundll32.exe*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\regsvr32.exe*" OR TO_LOWER(ServiceFileName) LIKE "*psexesvc*" OR TO_LOWER(ServiceFileName) LIKE "*\\\\\\\\*"))

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,windows,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="12">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="EventID" type="pcre2">(?i)^4697$</field>    <field name="ServiceFileName" type="pcre2">(?i)(\\cmd\.exe|%COMSPEC%|powershell|\\pwsh\.exe|\\wscript\.exe|\\cscript\.exe|\\mshta\.exe|\\rundll32\.exe|\\regsvr32\.exe|PSEXESVC|\\\\)</field>    <description>Service installed with a shell, script host or UNC image path</description>    <mitre>      <id>T1569.002</id>    </mitre>  </rule></group>

Verdicts · reactions · comments

Community

Verdicts from engineers who actually deployed it, and the conversation around it.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.

Log in to report a verdict.

Log in to join the discussion.

No comments yet. Someone who deploys this will have something to say about it.