Skip to content

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

Siemphony’s repertoire

File association handler rewritten to a script host or LOLBin

Matches the registry half of AN0170: the command that Windows runs when a file type is opened being set to an interpreter or a user-writable path. The handler lives at `<handler>\shell\<action>\command`, where `command` is a subkey and the command line sits in its default value, so a Sysmon EventID 13 record reads `...\shell\open\command\(Default)` — the terms therefore use `contains` and not `endswith`, and no hive prefix is matched because HKCR is a merged view that Sysmon never reports literally, writing instead `HKLM\SOFTWARE\Classes\...` or `HKU\<SID>_Classes\...`. The `Details` gate is MITRE's `SuspiciousHandlerPathRegex` knob, which names powershell.exe and rundll32.exe as examples and is populated here with the wider script-host and LOLBin set plus two user-writable directories; `\AppData\` as a whole is deliberately left out, since per-user installs of chat, editor and conferencing clients legitimately register handlers there and would swamp everything else. The execution half of the analytic — the hijacked handler spawning a child when a user opens a file — needs a correlation across MITRE's `TimeWindow` knob that Sigma cannot express, and Sysmon logs registry writes only for the paths its configuration allowlists, so confirm the Classes subtree is in yours before treating silence as clean. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0061, 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: File association handler rewritten to a script host or LOLBinid: d3cf5408-f80e-4e07-b143-b9480b1c033astatus: experimentaldescription: |  Matches the registry half of AN0170: the command that Windows runs when a file  type is opened being set to an interpreter or a user-writable path. The handler  lives at `<handler>\shell\<action>\command`, where `command` is a subkey and the  command line sits in its default value, so a Sysmon EventID 13 record reads  `...\shell\open\command\(Default)` — the terms therefore use `contains` and not  `endswith`, and no hive prefix is matched because HKCR is a merged view that  Sysmon never reports literally, writing instead `HKLM\SOFTWARE\Classes\...` or  `HKU\<SID>_Classes\...`. The `Details` gate is MITRE's  `SuspiciousHandlerPathRegex` knob, which names powershell.exe and rundll32.exe  as examples and is populated here with the wider script-host and LOLBin set plus  two user-writable directories; `\AppData\` as a whole is deliberately left out,  since per-user installs of chat, editor and conferencing clients legitimately  register handlers there and would swamp everything else. The execution half of  the analytic — the hijacked handler spawning a child when a user opens a file —  needs a correlation across MITRE's `TimeWindow` knob that Sigma cannot express,  and Sysmon logs registry writes only for the paths its configuration allowlists,  so confirm the Classes subtree is in yours before treating silence as clean.  UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0061, 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/T1546/001  - https://attack.mitre.org/detectionstrategies/DET0061author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.privilege-escalation  - attack.persistence  - attack.t1546.001logsource:  category: registry_set  product: windowsdetection:  selection_command_value:    TargetObject|contains:      - '\shell\open\command'      - '\shell\edit\command'      - '\shell\print\command'      - '\shell\printto\command'      - '\shell\explore\command'      - '\shell\runas\command'  selection_handler:    Details|contains:      - 'powershell'      - 'pwsh.exe'      - 'cmd.exe'      - 'wscript'      - 'cscript'      - 'mshta'      - 'rundll32'      - 'regsvr32'      - 'certutil'      - '\Users\Public\'      - '\AppData\Local\Temp\'  condition: selection_command_value and selection_handlerfalsepositives:  - "Windows setup, cumulative updates and the 'reset to the recommended defaults' apps operation, all of which rewrite the built-in handlers for script and control-panel file types. Those handlers genuinely name wscript.exe, mshta.exe and rundll32.exe — .vbs opens in WScript, .hta in mshta, .cpl and .inf through rundll32 — so this is the loudest source of matches and it arrives as a burst at image build time and after servicing."  - "Application installers and MSI self-healing claiming an extension with a launcher that shells through cmd.exe or rundll32.exe, which rewrite the command value on every repair cycle rather than only at first install."  - "Administrative baselines and Group Policy preferences that set associations fleet-wide, for instance forcing .ps1 and .vbs to open in an editor instead of executing, which writes a handler naming powershell.exe on every policy refresh."  - "Portable applications and installers running from an extracted temporary directory that register their associations while still in that directory, producing a handler path under the user's Temp folder."level: medium

Sentinel · KQL

Run this as a search.

DeviceRegistryEvents| where ((RegistryKey contains "\\shell\\open\\command" or RegistryKey contains "\\shell\\edit\\command" or RegistryKey contains "\\shell\\print\\command" or RegistryKey contains "\\shell\\printto\\command" or RegistryKey contains "\\shell\\explore\\command" or RegistryKey contains "\\shell\\runas\\command") and (RegistryValueData contains "powershell" or RegistryValueData contains "pwsh.exe" or RegistryValueData contains "cmd.exe" or RegistryValueData contains "wscript" or RegistryValueData contains "cscript" or RegistryValueData contains "mshta" or RegistryValueData contains "rundll32" or RegistryValueData contains "regsvr32" or RegistryValueData contains "certutil" or RegistryValueData contains "\\Users\\Public\\" or RegistryValueData contains "\\AppData\\Local\\Temp\\"))

Splunk · SPL

Run this as a search.

index=* ((TargetObject="*\\shell\\open\\command*" OR TargetObject="*\\shell\\edit\\command*" OR TargetObject="*\\shell\\print\\command*" OR TargetObject="*\\shell\\printto\\command*" OR TargetObject="*\\shell\\explore\\command*" OR TargetObject="*\\shell\\runas\\command*") AND (Details="*powershell*" OR Details="*pwsh.exe*" OR Details="*cmd.exe*" OR Details="*wscript*" OR Details="*cscript*" OR Details="*mshta*" OR Details="*rundll32*" OR Details="*regsvr32*" OR Details="*certutil*" OR Details="*\\Users\\Public\\*" OR Details="*\\AppData\\Local\\Temp\\*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((TO_LOWER(registry.path) LIKE "*\\\\shell\\\\open\\\\command*" OR TO_LOWER(registry.path) LIKE "*\\\\shell\\\\edit\\\\command*" OR TO_LOWER(registry.path) LIKE "*\\\\shell\\\\print\\\\command*" OR TO_LOWER(registry.path) LIKE "*\\\\shell\\\\printto\\\\command*" OR TO_LOWER(registry.path) LIKE "*\\\\shell\\\\explore\\\\command*" OR TO_LOWER(registry.path) LIKE "*\\\\shell\\\\runas\\\\command*") AND (TO_LOWER(registry.data.strings) LIKE "*powershell*" OR TO_LOWER(registry.data.strings) LIKE "*pwsh.exe*" OR TO_LOWER(registry.data.strings) LIKE "*cmd.exe*" OR TO_LOWER(registry.data.strings) LIKE "*wscript*" OR TO_LOWER(registry.data.strings) LIKE "*cscript*" OR TO_LOWER(registry.data.strings) LIKE "*mshta*" OR TO_LOWER(registry.data.strings) LIKE "*rundll32*" OR TO_LOWER(registry.data.strings) LIKE "*regsvr32*" OR TO_LOWER(registry.data.strings) LIKE "*certutil*" OR TO_LOWER(registry.data.strings) LIKE "*\\\\users\\\\public\\\\*" OR TO_LOWER(registry.data.strings) LIKE "*\\\\appdata\\\\local\\\\temp\\\\*"))

Wazuh · XML rule

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

<group name="sigma,windows,registry_set,">  <!-- 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="TargetObject" type="pcre2">(?i)(\\shell\\open\\command|\\shell\\edit\\command|\\shell\\print\\command|\\shell\\printto\\command|\\shell\\explore\\command|\\shell\\runas\\command)</field>    <field name="Details" type="pcre2">(?i)(powershell|pwsh\.exe|cmd\.exe|wscript|cscript|mshta|rundll32|regsvr32|certutil|\\Users\\Public\\|\\AppData\\Local\\Temp\\)</field>    <description>File association handler rewritten to a script host or LOLBin</description>    <mitre>      <id>T1546.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.