Skip to content

Siemphony is in beta and still being built. What ships today, and what does not.

Siemphony’s repertoire

Package manager lifecycle hook spawning a script or download utility

Siemphony@siemphonylowT1195.001unverified
Flags a package manager or build tool creating a child process that is a script interpreter or a download utility — the "first run of newly written components triggers scripts (preinstall/postinstall), shell/PowerShell spawning" step of MITRE's chain. Two shapes of manager and two shapes of child are matched, because on Windows the canonical case runs through ComSpec rather than directly. The manager arms are the real executables (node.exe, python.exe, pip.exe, nuget.exe, dotnet.exe, choco.exe, cargo.exe) and, separately, cmd.exe whose own command line names a package-manager shim: npm.cmd, npx.cmd, yarn.cmd, pnpm.cmd, mvn.cmd, gradle.bat, npm-cli.js, node_modules or setup.py. Those shim names are matched in ParentCommandLine and never in ParentImage — a `.cmd` or `.bat` is not a process image, so `ParentImage|endswith: '\npm.cmd'` would render in every backend and match nothing. The child arms are an interpreter or downloader spawned directly, or cmd.exe spawned with one of those named on its command line, which is the lineage npm and yarn lifecycle hooks actually take (node.exe runs npm-cli.js, npm-cli.js runs the hook through `cmd /d /s /c`, and the payload is the grandchild). pip breaks the same way, with pip.exe spawning python.exe to run setup.py. The full analytic is a correlation — manager writes files, the new component runs, then egress to a non-approved registry within a 90-minute window — and Sigma can express neither a sequence nor a time window, so the egress half is absent. Without it there is nothing in the event saying the package was untrusted: this observable is a build tool spawning an interpreter, which is supply-chain-shaped only by context, and an analyst should expect to triage it as execution rather than as evidence of initial access. Prerequisite: Sysmon EventID 1 is not present in a default install, and the cmd.exe arms need command-line capture on both the process and its parent. UNVERIFIED — derived from MITRE ATT&CK DET0009 and never executed against logs.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 (((InitiatingProcessFolderPath endswith "\\node.exe" or InitiatingProcessFolderPath endswith "\\python.exe" or InitiatingProcessFolderPath endswith "\\pip.exe" or InitiatingProcessFolderPath endswith "\\pip3.exe" or InitiatingProcessFolderPath endswith "\\nuget.exe" or InitiatingProcessFolderPath endswith "\\dotnet.exe" or InitiatingProcessFolderPath endswith "\\choco.exe" or InitiatingProcessFolderPath endswith "\\cargo.exe") or (InitiatingProcessFolderPath endswith "\\cmd.exe" and (InitiatingProcessCommandLine contains "npm.cmd" or InitiatingProcessCommandLine contains "npx.cmd" or InitiatingProcessCommandLine contains "yarn.cmd" or InitiatingProcessCommandLine contains "pnpm.cmd" or InitiatingProcessCommandLine contains "mvn.cmd" or InitiatingProcessCommandLine contains "gradle.bat" or InitiatingProcessCommandLine contains "npm-cli.js" or InitiatingProcessCommandLine contains "node_modules" or InitiatingProcessCommandLine contains "setup.py"))) and ((FolderPath endswith "\\powershell.exe" or FolderPath endswith "\\pwsh.exe" or FolderPath endswith "\\wscript.exe" or FolderPath endswith "\\cscript.exe" or FolderPath endswith "\\mshta.exe" or FolderPath endswith "\\curl.exe" or FolderPath endswith "\\certutil.exe" or FolderPath endswith "\\bitsadmin.exe" or FolderPath endswith "\\rundll32.exe" or FolderPath endswith "\\regsvr32.exe") or (FolderPath endswith "\\cmd.exe" and (ProcessCommandLine contains "powershell" or ProcessCommandLine contains "pwsh" or ProcessCommandLine contains "wscript" or ProcessCommandLine contains "cscript" or ProcessCommandLine contains "mshta" or ProcessCommandLine contains "curl" or ProcessCommandLine contains "certutil" or ProcessCommandLine contains "bitsadmin" or ProcessCommandLine contains "rundll32" or ProcessCommandLine contains "regsvr32"))))

Splunk · SPL

Run this as a search.

index=* (((ParentImage="*\\node.exe" OR ParentImage="*\\python.exe" OR ParentImage="*\\pip.exe" OR ParentImage="*\\pip3.exe" OR ParentImage="*\\nuget.exe" OR ParentImage="*\\dotnet.exe" OR ParentImage="*\\choco.exe" OR ParentImage="*\\cargo.exe") OR (ParentImage="*\\cmd.exe" AND (ParentCommandLine="*npm.cmd*" OR ParentCommandLine="*npx.cmd*" OR ParentCommandLine="*yarn.cmd*" OR ParentCommandLine="*pnpm.cmd*" OR ParentCommandLine="*mvn.cmd*" OR ParentCommandLine="*gradle.bat*" OR ParentCommandLine="*npm-cli.js*" OR ParentCommandLine="*node_modules*" OR ParentCommandLine="*setup.py*"))) AND ((Image="*\\powershell.exe" OR Image="*\\pwsh.exe" OR Image="*\\wscript.exe" OR Image="*\\cscript.exe" OR Image="*\\mshta.exe" OR Image="*\\curl.exe" OR Image="*\\certutil.exe" OR Image="*\\bitsadmin.exe" OR Image="*\\rundll32.exe" OR Image="*\\regsvr32.exe") OR (Image="*\\cmd.exe" AND (CommandLine="*powershell*" OR CommandLine="*pwsh*" OR CommandLine="*wscript*" OR CommandLine="*cscript*" OR CommandLine="*mshta*" OR CommandLine="*curl*" OR CommandLine="*certutil*" OR CommandLine="*bitsadmin*" OR CommandLine="*rundll32*" OR CommandLine="*regsvr32*"))))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE (((TO_LOWER(process.parent.executable) LIKE "*\\\\node.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\python.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\pip.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\pip3.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\nuget.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\dotnet.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\choco.exe" OR TO_LOWER(process.parent.executable) LIKE "*\\\\cargo.exe") OR (TO_LOWER(process.parent.executable) LIKE "*\\\\cmd.exe" AND (TO_LOWER(process.parent.command_line) LIKE "*npm.cmd*" OR TO_LOWER(process.parent.command_line) LIKE "*npx.cmd*" OR TO_LOWER(process.parent.command_line) LIKE "*yarn.cmd*" OR TO_LOWER(process.parent.command_line) LIKE "*pnpm.cmd*" OR TO_LOWER(process.parent.command_line) LIKE "*mvn.cmd*" OR TO_LOWER(process.parent.command_line) LIKE "*gradle.bat*" OR TO_LOWER(process.parent.command_line) LIKE "*npm-cli.js*" OR TO_LOWER(process.parent.command_line) LIKE "*node_modules*" OR TO_LOWER(process.parent.command_line) LIKE "*setup.py*"))) AND ((TO_LOWER(process.executable) LIKE "*\\\\powershell.exe" OR TO_LOWER(process.executable) LIKE "*\\\\pwsh.exe" OR TO_LOWER(process.executable) LIKE "*\\\\wscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\cscript.exe" OR TO_LOWER(process.executable) LIKE "*\\\\mshta.exe" OR TO_LOWER(process.executable) LIKE "*\\\\curl.exe" OR TO_LOWER(process.executable) LIKE "*\\\\certutil.exe" OR TO_LOWER(process.executable) LIKE "*\\\\bitsadmin.exe" OR TO_LOWER(process.executable) LIKE "*\\\\rundll32.exe" OR TO_LOWER(process.executable) LIKE "*\\\\regsvr32.exe") OR (TO_LOWER(process.executable) LIKE "*\\\\cmd.exe" AND (TO_LOWER(process.command_line) LIKE "*powershell*" OR TO_LOWER(process.command_line) LIKE "*pwsh*" OR TO_LOWER(process.command_line) LIKE "*wscript*" OR TO_LOWER(process.command_line) LIKE "*cscript*" OR TO_LOWER(process.command_line) LIKE "*mshta*" OR TO_LOWER(process.command_line) LIKE "*curl*" OR TO_LOWER(process.command_line) LIKE "*certutil*" OR TO_LOWER(process.command_line) LIKE "*bitsadmin*" OR TO_LOWER(process.command_line) LIKE "*rundll32*" OR TO_LOWER(process.command_line) LIKE "*regsvr32*"))))

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. -->  <!-- 4 rules: the Sigma condition ORs across different fields,       which one rule cannot express. Any one matching is a hit. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="ParentImage" type="pcre2">(?i)(\\node\.exe$|\\python\.exe$|\\pip\.exe$|\\pip3\.exe$|\\nuget\.exe$|\\dotnet\.exe$|\\choco\.exe$|\\cargo\.exe$)</field>    <field name="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$|\\wscript\.exe$|\\cscript\.exe$|\\mshta\.exe$|\\curl\.exe$|\\certutil\.exe$|\\bitsadmin\.exe$|\\rundll32\.exe$|\\regsvr32\.exe$)</field>    <description>Package manager lifecycle hook spawning a script or download utility (1/4)</description>    <mitre>      <id>T1195.001</id>    </mitre>  </rule>   <rule id="100001" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="ParentImage" type="pcre2">(?i)(\\node\.exe$|\\python\.exe$|\\pip\.exe$|\\pip3\.exe$|\\nuget\.exe$|\\dotnet\.exe$|\\choco\.exe$|\\cargo\.exe$)</field>    <field name="Image" type="pcre2">(?i)\\cmd\.exe$</field>    <field name="CommandLine" type="pcre2">(?i)(powershell|pwsh|wscript|cscript|mshta|curl|certutil|bitsadmin|rundll32|regsvr32)</field>    <description>Package manager lifecycle hook spawning a script or download utility (2/4)</description>    <mitre>      <id>T1195.001</id>    </mitre>  </rule>   <rule id="100002" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="ParentImage" type="pcre2">(?i)\\cmd\.exe$</field>    <field name="ParentCommandLine" type="pcre2">(?i)(npm\.cmd|npx\.cmd|yarn\.cmd|pnpm\.cmd|mvn\.cmd|gradle\.bat|npm-cli\.js|node_modules|setup\.py)</field>    <field name="Image" type="pcre2">(?i)(\\powershell\.exe$|\\pwsh\.exe$|\\wscript\.exe$|\\cscript\.exe$|\\mshta\.exe$|\\curl\.exe$|\\certutil\.exe$|\\bitsadmin\.exe$|\\rundll32\.exe$|\\regsvr32\.exe$)</field>    <description>Package manager lifecycle hook spawning a script or download utility (3/4)</description>    <mitre>      <id>T1195.001</id>    </mitre>  </rule>   <rule id="100003" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="ParentImage" type="pcre2">(?i)\\cmd\.exe$</field>    <field name="ParentCommandLine" type="pcre2">(?i)(npm\.cmd|npx\.cmd|yarn\.cmd|pnpm\.cmd|mvn\.cmd|gradle\.bat|npm-cli\.js|node_modules|setup\.py)</field>    <field name="Image" type="pcre2">(?i)\\cmd\.exe$</field>    <field name="CommandLine" type="pcre2">(?i)(powershell|pwsh|wscript|cscript|mshta|curl|certutil|bitsadmin|rundll32|regsvr32)</field>    <description>Package manager lifecycle hook spawning a script or download utility (4/4)</description>    <mitre>      <id>T1195.001</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.