Detectionhightest

PowerShell Execution With Potential Decryption Capabilities

Detects PowerShell commands that decrypt an ".LNK" "file to drop the next stage of the malware.

Convert In Phoenix Studio

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

Launch
X__Junior (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)Created Fri Jun 30Updated Tue Dec 05434c08ba-8406-4d15-8b24-782cb071a691windows
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 Logic4 selectors
detection:
    selection_img:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        OriginalFileName:
            - 'PowerShell.EXE'
            - 'pwsh.dll'
    selection_cli_dir:
        CommandLine|contains:
            - "Get-ChildItem "
            - "dir "
            - "gci "
            - "ls "
    selection_cli_gc:
        CommandLine|contains:
            - "Get-Content "
            - "gc "
            - 'cat '
            - 'type '
            - 'ReadAllBytes'
    selection_cli_specific:
        - CommandLine|contains|all:
              - ' ^| '
              - '\*.lnk'
              - '-Recurse'
              - '-Skip '
        - CommandLine|contains|all:
              - ' -ExpandProperty '
              - '\*.lnk'
              - 'WriteAllBytes'
              - ' .length '
    condition: all of selection_*
False Positives
Unlikely

False positives are unlikely for most environments. High confidence detection.

MITRE ATT&CK
Rule Metadata
Rule ID
434c08ba-8406-4d15-8b24-782cb071a691
Status
test
Level
high
Type
Detection
Created
Fri Jun 30
Modified
Tue Dec 05
Path
rules/windows/process_creation/proc_creation_win_powershell_decrypt_pattern.yml
Raw Tags
attack.execution
View on GitHub