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

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

title: Service installed with a shell, script host or UNC image pathid: 0f71c25c-8f8a-41f3-b8c2-7ef8c67a9d1cstatus: experimentaldescription: |  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.references:  - https://attack.mitre.org/techniques/T1569/002  - https://attack.mitre.org/detectionstrategies/DET0421author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.execution  - attack.t1569.002logsource:  product: windows  service: securitydetection:  selection:    EventID: 4697    ServiceFileName|contains:      - '\cmd.exe'      - '%COMSPEC%'      - 'powershell'      - '\pwsh.exe'      - '\wscript.exe'      - '\cscript.exe'      - '\mshta.exe'      - '\rundll32.exe'      - '\regsvr32.exe'      - 'PSEXESVC'      - '\\\\'  condition: selectionfalsepositives:  - "Sanctioned remote administration. Helpdesk and deployment teams run PsExec and its equivalents legitimately, and the temporary service they leave behind is the same service an intruder creates — MITRE's RemoteExecutionHosts knob exists for exactly this, and until it is populated with the approved management servers the account and source host are the only things separating the two."  - "Software installers and update agents that register a service pointing at a wrapper script or at a stub that shells out, which is common in packaged line-of-business applications and produces a burst of hits during a deployment window."  - "Monitoring, backup and endpoint-security products whose service image is a PowerShell-hosted agent, matching the powershell term on every install and every version upgrade across the estate."  - "Services installed from a software distribution share, where the image path is genuinely a UNC path and matches the last term without anything unusual having happened."level: high

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(winlog.event_data.ServiceFileName) LIKE "*\\\\cmd.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*%comspec%*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*powershell*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*\\\\pwsh.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*\\\\wscript.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*\\\\cscript.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*\\\\mshta.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*\\\\rundll32.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*\\\\regsvr32.exe*" OR TO_LOWER(winlog.event_data.ServiceFileName) LIKE "*psexesvc*" OR TO_LOWER(winlog.event_data.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.