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.
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: selectionFalse Positives
Legitimate PowerShell scripts
References
MITRE ATT&CK
Tactics
Sub-techniques
Rule Metadata
Rule ID
70ad982f-67c8-40e0-a955-b920c2fa05cb
Status
test
Level
medium
Type
Detection
Created
2022-01-09
Modified
2022-03-05
Author
Path
rules/windows/powershell/powershell_script/posh_ps_susp_iofilestream.yml
Raw Tags
attack.stealthattack.t1070.003