Skip to content

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

Siemphony’s repertoire

Python interpreter spawned by a document or script host

Siemphony@siemphonymediumT1059.006unverified
Matches a Python interpreter process whose parent is an Office application, a script host or a signed-binary proxy, which is the lineage half of AN0172. Python itself is unremarkable on a Windows estate, so the parent list is the entire detection: it populates MITRE's ParentProcess knob, and the twelve parents named are authored here rather than taken from MITRE, which names only winword.exe and mshta.exe as examples. py.exe and pyw.exe are in the child list on purpose — the launcher execs python.exe as its own child, so in a Word-to-py.exe-to-python.exe chain only the py.exe event still carries winword.exe as ParentImage and a list of python.exe alone would miss it. Known gap in the child list: endswith cannot see version-suffixed interpreters such as python3.12.exe or the embedded runtimes some vendors ship under their own product name, so a payload launched through one of those is invisible here. MITRE's ScriptPath knob (a .py under a temp or profile directory) is not used, because on Sysmon EventID 1 the script path sits in CommandLine only when it was passed as an argument, and requiring that would drop the -c one-liner form entirely. The rule is written in the Sysmon EventID 1 vocabulary the brief names; if Security 4688 feeds this category instead, ParentProcessName is the field name there and Audit Process Creation must be enabled first. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0063, 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.

DeviceProcessEvents| where ((FolderPath endswith "\\python.exe" or FolderPath endswith "\\pythonw.exe" or FolderPath endswith "\\python3.exe" or FolderPath endswith "\\py.exe" or FolderPath endswith "\\pyw.exe") and (InitiatingProcessFolderPath endswith "\\winword.exe" or InitiatingProcessFolderPath endswith "\\excel.exe" or InitiatingProcessFolderPath endswith "\\powerpnt.exe" or InitiatingProcessFolderPath endswith "\\outlook.exe" or InitiatingProcessFolderPath endswith "\\msaccess.exe" or InitiatingProcessFolderPath endswith "\\visio.exe" or InitiatingProcessFolderPath endswith "\\mshta.exe" or InitiatingProcessFolderPath endswith "\\wscript.exe" or InitiatingProcessFolderPath endswith "\\cscript.exe" or InitiatingProcessFolderPath endswith "\\regsvr32.exe" or InitiatingProcessFolderPath endswith "\\rundll32.exe" or InitiatingProcessFolderPath endswith "\\wmiprvse.exe"))

Splunk · SPL

Run this as a search.

index=* ((Image="*\\python.exe" OR Image="*\\pythonw.exe" OR Image="*\\python3.exe" OR Image="*\\py.exe" OR Image="*\\pyw.exe") AND (ParentImage="*\\winword.exe" OR ParentImage="*\\excel.exe" OR ParentImage="*\\powerpnt.exe" OR ParentImage="*\\outlook.exe" OR ParentImage="*\\msaccess.exe" OR ParentImage="*\\visio.exe" OR ParentImage="*\\mshta.exe" OR ParentImage="*\\wscript.exe" OR ParentImage="*\\cscript.exe" OR ParentImage="*\\regsvr32.exe" OR ParentImage="*\\rundll32.exe" OR ParentImage="*\\wmiprvse.exe"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((TO_LOWER(process.executable) LIKE "*\\\\python.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pythonw.exe" OR TO_LOWER(process.executable) LIKE "*\\\\python3.exe" OR TO_LOWER(process.executable) LIKE "*\\\\py.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pyw.exe") AND (TO_LOWER(process.parent.executable) LIKE "*\\\\winword.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\excel.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\powerpnt.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\outlook.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\msaccess.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\visio.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\mshta.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\wscript.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\cscript.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\regsvr32.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\rundll32.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\wmiprvse.exe"))

Wazuh · XML rule

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

<group name="sigma,windows,process_creation,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="7">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="Image" type="pcre2">(?i)(\\python\.exe$|\\pythonw\.exe$|\\python3\.exe$|\\py\.exe$|\\pyw\.exe$)</field>    <field name="ParentImage" type="pcre2">(?i)(\\winword\.exe$|\\excel\.exe$|\\powerpnt\.exe$|\\outlook\.exe$|\\msaccess\.exe$|\\visio\.exe$|\\mshta\.exe$|\\wscript\.exe$|\\cscript\.exe$|\\regsvr32\.exe$|\\rundll32\.exe$|\\wmiprvse\.exe$)</field>    <description>Python interpreter spawned by a document or script host</description>    <mitre>      <id>T1059.006</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.