Detectionmediumtest

Suspicious IO.FileStream

Open a handle on the drive volume via the \\.\ DOS device path specifier and perform direct access read of the first few bytes of the volume.

Convert In Phoenix Studio

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

Launch
François HubautCreated Sun Jan 09Updated Sat Mar 0570ad982f-67c8-40e0-a955-b920c2fa05cbwindows
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:
            - New-Object
            - IO.FileStream
            - '\\\\.\\'
    condition: selection
False Positives

Legitimate PowerShell scripts

Rule Metadata
Rule ID
70ad982f-67c8-40e0-a955-b920c2fa05cb
Status
test
Level
medium
Type
Detection
Created
Sun Jan 09
Modified
Sat Mar 05
Path
rules/windows/powershell/powershell_script/posh_ps_susp_iofilestream.yml
Raw Tags
attack.defense-evasionattack.t1070.003
View on GitHub