Detection rules › Sigma

Copy From Or To Admin Share Or Sysvol Folder

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, Nasreddine Bencherchali
Source
github.com/SigmaHQ/sigma

Detects a copy command or a copy utility execution to or from an Admin share or remote

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Copy From Or To Admin Share Or Sysvol Folder
id: 855bc8b5-2ae8-402e-a9ed-b889e6df1900
status: test
description: Detects a copy command or a copy utility execution to or from an Admin share or remote
references:
    - https://twitter.com/SBousseaden/status/1211636381086339073
    - https://drive.google.com/file/d/1lKya3_mLnR3UQuCoiYruO3qgu052_iS_/view
    - https://www.elastic.co/guide/en/security/current/remote-file-copy-to-a-hidden-share.html
    - https://www.microsoft.com/en-us/security/blog/2022/10/18/defenders-beware-a-case-for-post-ransomware-investigations/
author: Florian Roth (Nextron Systems), oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, Nasreddine Bencherchali
date: 2019-12-30
modified: 2025-10-22
tags:
    - attack.lateral-movement
    - attack.collection
    - attack.exfiltration
    - attack.t1039
    - attack.t1048
    - attack.t1021.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_target:
        CommandLine|contains:
            - '\\\\*\\*$' # example \\SVR_NAME\ADMIN$
            - '\Sysvol\'
    selection_other_tools:
        - Image|endswith:
              - '\robocopy.exe'
              - '\xcopy.exe'
        - OriginalFileName:
              - 'robocopy.exe'
              - 'XCOPY.EXE'
    selection_cmd_img:
        - Image|endswith: '\cmd.exe'
        - OriginalFileName: 'Cmd.Exe'
    selection_cmd_cli:
        CommandLine|contains: 'copy'
    selection_pwsh_img:
        - Image|contains:
              - '\powershell_ise.exe'
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'powershell_ise.exe'
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_pwsh_cli:
        CommandLine|contains:
            - 'copy-item'
            - 'copy '
            - 'cpi '
            - ' cp '
            - 'move '
            - ' move-item'
            - ' mi '
            - ' mv '
    condition: selection_target and (selection_other_tools or all of selection_cmd_* or all of selection_pwsh_*)
falsepositives:
    - Administrative scripts
level: medium

Stages and Predicates

Stage 0: condition

selection_target and (selection_other_tools or all of selection_cmd_* or all of selection_pwsh_*)

Stage 1: selection_target

selection_target:
    CommandLine|contains:
        - '\\\\*\\*$'
        - '\Sysvol\'

Stage 2: selection_other_tools

selection_other_tools:
    - Image|endswith:
          - '\robocopy.exe'
          - '\xcopy.exe'
    - OriginalFileName:
          - 'robocopy.exe'
          - 'XCOPY.EXE'

Stage 3: selection_cmd_img

selection_cmd_img:
    - Image|endswith: '\cmd.exe'
    - OriginalFileName: 'Cmd.Exe'

Stage 4: selection_cmd_cli

selection_cmd_cli:
    CommandLine|contains: 'copy'

Stage 5: selection_pwsh_img

selection_pwsh_img:
    - Image|contains:
          - '\powershell_ise.exe'
          - '\powershell.exe'
          - '\pwsh.exe'
    - OriginalFileName:
          - 'powershell_ise.exe'
          - 'PowerShell.EXE'
          - 'pwsh.dll'

Stage 6: selection_pwsh_cli

selection_pwsh_cli:
    CommandLine|contains:
        - 'copy-item'
        - 'copy '
        - 'cpi '
        - ' cp '
        - 'move '
        - ' move-item'
        - ' mi '
        - ' mv '

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • cp corpus 8 (sigma 6, elastic 1, chronicle 1)
  • mi corpus 3 (sigma 2, chronicle 1)
  • move-item
  • mv corpus 4 (sigma 2, elastic 1, chronicle 1)
  • \Sysvol\ corpus 4 (sigma 4)
  • \\\\*\\*$
  • copy corpus 5 (sigma 4, chronicle 1)
  • copy corpus 12 (sigma 11, chronicle 1)
  • copy-item corpus 6 (sigma 5, chronicle 1)
  • cpi corpus 5 (sigma 4, chronicle 1)
  • move corpus 3 (sigma 2, chronicle 1)
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \robocopy.exe corpus 5 (sigma 5)
  • \xcopy.exe corpus 5 (sigma 5)
Imagematch
  • \powershell.exe
  • \powershell_ise.exe
  • \pwsh.exe
OriginalFileNameeq
  • Cmd.Exe corpus 65 (sigma 43, splunk 17, elastic 5)
  • PowerShell.EXE corpus 120 (sigma 84, splunk 30, elastic 6)
  • XCOPY.EXE corpus 4 (sigma 4)
  • powershell_ise.exe corpus 51 (splunk 30, sigma 18, elastic 3)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
  • robocopy.exe corpus 4 (sigma 4)