Detection rules › Sigma

Hidden Powershell in Link File Pattern

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

Detects events that appear when a user click on a link file with a powershell command in it

Known false positives

  • Legitimate commands in .lnk files

MITRE ATT&CK coverage

Telemetry coverage

Rule body

title: Hidden Powershell in Link File Pattern
id: 30e92f50-bb5a-4884-98b5-d20aa80f3d7a
status: test
description: Detects events that appear when a user click on a link file with a powershell command in it
references:
    - https://www.x86matthew.com/view_post?id=embed_exe_lnk
author: frack113
date: 2022-02-06
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage: C:\Windows\explorer.exe
        Image: C:\Windows\System32\cmd.exe
        CommandLine|contains|all:
            - 'powershell'
            - '.lnk'
    condition: selection
falsepositives:
    - Legitimate commands in .lnk files
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    ParentImage: C:\Windows\explorer.exe
    Image: C:\Windows\System32\cmd.exe
    CommandLine|contains|all:
        - 'powershell'
        - '.lnk'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • .lnk corpus 3 (sigma 3)
  • powershell corpus 25 (sigma 24, chronicle 1)
field:"CommandLine" kind:match
Imageeq
  • C:\Windows\System32\cmd.exe corpus 2 (sigma 2)
field:"Image" kind:eq value:"C:\Windows\System32\cmd.exe"
ParentImageeq
  • C:\Windows\explorer.exe
field:"ParentImage" kind:eq value:"C:\Windows\explorer.exe"