CmdID

CmdID / Rules / Windows

Copy From Or To Admin Share Or Sysvol Folder

A Sigma rule for process creation on Windows, by Florian Roth (Nextron Systems), oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, Nasreddine Bencherchali.

medium 3 ATT&CK techniques 9 programs it names 1 everyday example trips it

What it looks for

its detection, as SigmaHQ writes it
detection:
  selection_cmd_cli:
    CommandLine|contains: 'copy'
  selection_cmd_img:
    - Image|endswith: '\cmd.exe'
    - OriginalFileName: 'Cmd.Exe'
  selection_other_tools:
    - Image|endswith:
        - '\robocopy.exe'
        - '\xcopy.exe'
    - OriginalFileName:
        - 'robocopy.exe'
        - 'XCOPY.EXE'
  selection_pwsh_cli:
    CommandLine|contains:
      - 'copy-item'
      - 'copy '
      - 'cpi '
      - ' cp '
      - 'move '
      - ' move-item'
      - ' mi '
      - ' mv '
  selection_pwsh_img:
    - Image|contains:
        - '\powershell_ise.exe'
        - '\powershell.exe'
        - '\pwsh.exe'
    - OriginalFileName:
        - 'powershell_ise.exe'
        - 'PowerShell.EXE'
        - 'pwsh.dll'
  selection_target:
    CommandLine|contains:
      - '\\\\*\\*$'
      - '\Sysvol\'
  condition: selection_target and (selection_other_tools or all of selection_cmd_* or all of selection_pwsh_*)

The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by Florian Roth (Nextron Systems), oscd.community, Teymur Kheirkhabarov @HeirhabarovT, Zach Stanford @svch0st, Nasreddine Bencherchali, under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.

Command lines that trip it

everyday examples from tldr-pages, CC BY 4.0, each read by CmdID

Copy a mandatory snippet from a folder to a destination folder on the page for New-IseSnippet

$path = "$HOME\Documents\WindowsPowerShell\Snippets\Mandatory.Snippets.ps1xml" $destination = "\\Server\Share" Copy-Item -Path $path -Destination $destinationIdentify

Programs and files it names

their pages here

ATT&CK

the techniques it is tagged with
T1021.002Remote Services: SMB/Windows Admin Shares
T1039Data from Network Shared Drive
T1048Exfiltration Over Alternative Protocol