Detectionmediumtest

Suspicious PowerShell WindowStyle Option

Adversaries may use hidden windows to conceal malicious activity from the plain sight of users. In some cases, windows that would typically be displayed when an application carries out an operation can be hidden

Open in Detection LabConvert ruleBuild Package
François Hubaut, Tim Shelton (fp AWS)Created 2021-10-20Updated 2023-01-03313fbb0a-a341-4682-848d-6d6f8c4fab7cwindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic2 selectors
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'powershell'
            - 'WindowStyle'
            - 'Hidden'
    filter:
        ScriptBlockText|contains|all:
            - ':\Program Files\Amazon\WorkSpacesConfig\Scripts\'
            - '$PSScriptRoot\Module\WorkspaceScriptModule\WorkspaceScriptModule'
    condition: selection and not filter
False Positives
Unknown

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

Testing & Validation

Regression Tests

by frack113
Positive Detection Test1 matchevtx

Microsoft-Windows-PowerShell

MITRE ATT&CK
Rule Metadata
Rule ID
313fbb0a-a341-4682-848d-6d6f8c4fab7c
Status
test
Level
medium
Type
Detection
Created
2021-10-20
Modified
2023-01-03
Path
rules/windows/powershell/powershell_script/posh_ps_susp_windowstyle.yml
Raw Tags
attack.stealthattack.t1564.003
View on GitHub