Detection rules › Sigma

Automated Collection Command PowerShell

Status
test
Severity
medium
Log source
product windows, category ps_script
Author
frack113
Source
github.com/SigmaHQ/sigma

Once established within a system or network, an adversary may use automated techniques for collecting internal data.

MITRE ATT&CK coverage

TacticTechniques
CollectionT1119 Automated Collection

Event coverage

Rule body yaml

title: Automated Collection Command PowerShell
id: c1dda054-d638-4c16-afc8-53e007f3fbc5
status: test
description: Once established within a system or network, an adversary may use automated techniques for collecting internal data.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1119/T1119.md
author: frack113
date: 2021-07-28
modified: 2022-12-25
tags:
    - attack.collection
    - attack.t1119
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_ext:
        ScriptBlockText|contains:
            - '.doc'
            - '.docx'
            - '.xls'
            - '.xlsx'
            - '.ppt'
            - '.pptx'
            - '.rtf'
            - '.pdf'
            - '.txt'
    selection_cmd:
        ScriptBlockText|contains|all:
            - 'Get-ChildItem'
            - ' -Recurse '
            - ' -Include '
    condition: all of selection*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection*

Stage 1: selection_ext

selection_ext:
    ScriptBlockText|contains:
        - '.doc'
        - '.docx'
        - '.xls'
        - '.xlsx'
        - '.ppt'
        - '.pptx'
        - '.rtf'
        - '.pdf'
        - '.txt'

Stage 2: selection_cmd

selection_cmd:
    ScriptBlockText|contains|all:
        - 'Get-ChildItem'
        - ' -Recurse '
        - ' -Include '

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
ScriptBlockTextmatch
  • -Include
  • -Recurse corpus 2 (sigma 2)
  • .doc
  • .docx
  • .pdf
  • .ppt
  • .pptx
  • .rtf
  • .txt
  • .xls
  • .xlsx
  • Get-ChildItem corpus 4 (sigma 4)