Skip to content

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

Siemphony’s repertoire

PowerShell script block copies a file from a UNC path

Matches a 4104 script block that both names a copy verb (Copy-Item or robocopy) and contains a UNC path literal — the part of AN0194 that actually says "remote": T1074 and T1074.001, already published in this corpus, both match on a local write into a shared directory and cannot tell a file that originated on the same host from one pulled across the network. Requiring the UNC prefix in the same script block is the cheapest way to recover that distinction from a single event, at the cost of not knowing whether the UNC path is the source or the destination — Sigma cannot parse Copy-Item's argument order, so a push in the wrong direction matches identically to a remote pull. AN0194's other two log sources are deliberately not used here: the SMBClient/Security channel's EventID 31001 fields are not documented with enough confidence to author against per this corpus's own field-verification rule, and Sysmon EventID 11 (used by the sibling rules above) only records the file that was created, never where it came from, so it cannot carry the remote-origin signal at all. Script Block Logging is off in a default install and in the MS and CIS baselines; without it 4104 produces nothing, and an empty result means blind, not clean. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0071, 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: PowerShell script block copies a file from a UNC pathid: aa8adf1c-5a06-433a-93d2-2b1edad68875status: experimentaldescription: |  Matches a 4104 script block that both names a copy verb (Copy-Item or  robocopy) and contains a UNC path literal — the part of AN0194 that  actually says "remote": T1074 and T1074.001, already published in this  corpus, both match on a local write into a shared directory and cannot  tell a file that originated on the same host from one pulled across the  network. Requiring the UNC prefix in the same script block is the cheapest  way to recover that distinction from a single event, at the cost of not  knowing whether the UNC path is the source or the destination — Sigma  cannot parse Copy-Item's argument order, so a push in the wrong direction  matches identically to a remote pull. AN0194's other two log sources are  deliberately not used here: the SMBClient/Security channel's EventID 31001  fields are not documented with enough confidence to author against per this  corpus's own field-verification rule, and Sysmon EventID 11 (used by the  sibling rules above) only records the file that was created, never where it  came from, so it cannot carry the remote-origin signal at all. Script Block  Logging is off in a default install and in the MS and CIS baselines; without  it 4104 produces nothing, and an empty result means blind, not clean.  UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0071, 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/T1074/002  - https://attack.mitre.org/detectionstrategies/DET0071author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.collection  - attack.t1074.002logsource:  product: windows  service: powershelldetection:  selection_event:    EventID: 4104  selection_verb:    ScriptBlockText|contains:      - 'Copy-Item'      - 'copy-item'      - 'Robocopy'      - 'robocopy'  selection_unc:    ScriptBlockText|contains: '\\\\'  condition: selection_event and selection_verb and selection_uncfalsepositives:  - "Logon scripts and Group Policy or SCCM/Intune deployment scripts, which are the single most common source of a Copy-Item or robocopy call against a UNC path in any managed estate and run on a predictable schedule under a service or machine account."  - "Folder-redirection and roaming-profile sync scripts that robocopy a user's Desktop or Documents to a UNC file-server path at logon or logoff — ordinary and expected on every session for estates that use roaming profiles."  - "Backup and disaster-recovery jobs that Copy-Item a nightly export to a UNC path on a dedicated backup share, producing a burst of identical matches across the fleet at the same time every night."  - "Build and release scripts that robocopy compiled artefacts to or from an internal UNC build share as part of a CI pipeline running PowerShell on a build agent."level: low

Sentinel · KQL

Run this as a search.

Event| where ((EventID == 4104 and (ScriptBlockText contains "Copy-Item" or ScriptBlockText contains "copy-item" or ScriptBlockText contains "Robocopy" or ScriptBlockText contains "robocopy")) and ScriptBlockText contains "\\\\")

Splunk · SPL

Run this as a search.

index=* ((EventID="4104" AND (ScriptBlockText="*Copy-Item*" OR ScriptBlockText="*copy-item*" OR ScriptBlockText="*Robocopy*" OR ScriptBlockText="*robocopy*")) AND ScriptBlockText="*\\\\*")

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((event.code == 4104 AND (TO_LOWER(powershell.file.script_block_text) LIKE "*copy-item*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*copy-item*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*robocopy*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*robocopy*")) AND TO_LOWER(powershell.file.script_block_text) 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="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="EventID" type="pcre2">(?i)^4104$</field>    <field name="ScriptBlockText" type="pcre2">(?i)(Copy-Item|copy-item|Robocopy|robocopy)</field>    <field name="ScriptBlockText" type="pcre2">(?i)\\\\</field>    <description>PowerShell script block copies a file from a UNC path</description>    <mitre>      <id>T1074.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.