Windows file write events where executables save files with suspicious script/binary extensions
Alerts when common Windows system executables write files ending in suspicious extensions like .ps1, .bat, .vbs, or .hta.
- Product
- windows
- Category
- file_event
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2022-08-12
- Updated
- 2026-07-31
ATT&CK techniques
Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags Windows processes associated with common system executables that write files whose names end with potentially suspicious extensions such as .bat, .hta, .ps1, .vbs, .dll, .exe, .iso, and .txt. Attackers often stage or deploy malicious payloads by dropping scripts, installers, or signed/packaged content to disk under these extensions. It relies on Windows file event telemetry capturing the writing process image path and the target filename extension, while excluding specific known test/GPO/packaging paths to reduce noise.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Windows file write events where executables save files with suspicious script/binary extensions
id: e5dac084-2ce0-415a-96f1-81bccf8d7fb6
related:
- id: 1277f594-a7d1-4f28-a2d3-73af5cbeab43
type: derived
- id: b8fd0e93-ff58-4cbd-8f48-1c114e342e62
type: derived
status: test
description: This rule flags Windows processes associated with common system executables that write files whose names end with potentially suspicious extensions such as .bat, .hta, .ps1, .vbs, .dll, .exe, .iso, and .txt. Attackers often stage or deploy malicious payloads by dropping scripts, installers, or signed/packaged content to disk under these extensions. It relies on Windows file event telemetry capturing the writing process image path and the target filename extension, while excluding specific known test/GPO/packaging paths to reduce noise.
references:
- Internal Research
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_shell_write_susp_files_extensions.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2022-08-12
modified: 2025-10-07
tags:
- attack.stealth
- attack.t1036
logsource:
category: file_event
product: windows
detection:
selection_generic:
Image|endswith:
- \csrss.exe
- \lsass.exe
- \RuntimeBroker.exe
- \sihost.exe
- \smss.exe
- \wininit.exe
- \winlogon.exe
TargetFilename|endswith:
- .bat
- .dll
- .exe
- .hta
- .iso
- .ps1
- .txt
- .vbe
- .vbs
selection_special:
Image|endswith:
- \dllhost.exe
- \rundll32.exe
- \svchost.exe
TargetFilename|endswith:
- .bat
- .hta
- .iso
- .ps1
- .vbe
- .vbs
filter_main_AppLockerPolicyTest:
Image: C:\Windows\System32\dllhost.exe
TargetFilename|contains|all:
- :\Users\
- \AppData\Local\Temp\__PSScriptPolicyTest_
TargetFilename|endswith: .ps1
filter_main_script_gpo_machine:
Image: C:\Windows\system32\svchost.exe
TargetFilename|contains|all:
- C:\Windows\System32\GroupPolicy\DataStore\
- \sysvol\
- \Policies\
- \Machine\Scripts\Startup\
TargetFilename|endswith:
- .ps1
- .bat
filter_main_clipchamp:
Image: C:\Windows\system32\svchost.exe
TargetFilename|contains|all:
- C:\Program Files\WindowsApps\Clipchamp
- .ps1
filter_main_powershell_preview:
Image:
- C:\Windows\system32\svchost.exe
- C:\Windows\SysWOW64\svchost.exe
TargetFilename|startswith:
- C:\Program Files\WindowsApps\Microsoft.PowerShellPreview
- C:\Program Files (x86)\WindowsApps\Microsoft.PowerShellPreview
TargetFilename|endswith: .ps1
condition: 1 of selection_* and not 1 of filter_main_*
falsepositives:
- Unknown
level: high
license: DRL-1.1