Detectionmediumtest

Suspicious Unblock-File

Remove the Zone.Identifier alternate data stream which identifies the file as downloaded from the internet.

Open in Detection LabConvert ruleBuild Package
François HubautCreated 2022-02-015947497f-1aa4-41dd-9693-c9848d58727dwindows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'Unblock-File '
            - '-Path '
    condition: selection
False Positives

Legitimate PowerShell scripts

Testing & Validation

Regression Tests

by frack113
Positive Detection Test1 matchevtx

Microsoft-Windows-PowerShell

Rule Metadata
Rule ID
5947497f-1aa4-41dd-9693-c9848d58727d
Status
test
Level
medium
Type
Detection
Created
2022-02-01
Path
rules/windows/powershell/powershell_script/posh_ps_susp_unblock_file.yml
Raw Tags
attack.defense-impairmentattack.t1553.005
View on GitHub