Detectionlowtest

Potential Encoded PowerShell Patterns In CommandLine

Detects specific combinations of encoding methods in PowerShell via the commandline

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
Teymur Kheirkhabarov, Vasiliy Burov, oscd.community, Tim SheltonCreated Sun Oct 11Updated Thu Jan 26cdf05894-89e7-4ead-b2b0-0a5f97a90f2fwindows
Log Source
WindowsProcess Creation
ProductWindows← raw: windows
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic5 selectors
detection:
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_to_1:
        CommandLine|contains:
            - 'ToInt'
            - 'ToDecimal'
            - 'ToByte'
            - 'ToUint'
            - 'ToSingle'
            - 'ToSByte'
    selection_to_2:
        CommandLine|contains:
            - 'ToChar'
            - 'ToString'
            - 'String'
    selection_gen_1:
        CommandLine|contains|all:
            - 'char'
            - 'join'
    selection_gen_2:
        CommandLine|contains|all:
            - 'split'
            - 'join'
    condition: selection_img and (all of selection_to_* or 1 of selection_gen_*)
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Related Rules
Similar

5b572dcf-254b-425c-a8c5-d9af6bea35a6

Rule not found
Rule Metadata
Rule ID
cdf05894-89e7-4ead-b2b0-0a5f97a90f2f
Status
test
Level
low
Type
Detection
Created
Sun Oct 11
Modified
Thu Jan 26
Path
rules/windows/process_creation/proc_creation_win_powershell_encoding_patterns.yml
Raw Tags
attack.defense-evasionattack.t1027attack.executionattack.t1059.001
View on GitHub