Detection rules › Sigma
Potential Binary Or Script Dropper Via PowerShell
Detects PowerShell creating a binary executable or a script file.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | No specific technique |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 11 | FileCreate |
Rule body yaml
title: Potential Binary Or Script Dropper Via PowerShell
id: 7047d730-036f-4f40-b9d8-1c63e36d5e62
status: test
description: Detects PowerShell creating a binary executable or a script file.
references:
- https://www.zscaler.com/blogs/security-research/onenote-growing-threat-malware-distribution
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2023-03-17
modified: 2025-07-04
tags:
- attack.persistence
logsource:
product: windows
category: file_event
detection:
selection:
Image|endswith:
- '\powershell.exe'
- '\powershell_ise.exe'
- '\pwsh.exe'
TargetFilename|endswith:
- '.bat'
- '.chm'
- '.cmd'
- '.com'
- '.dll'
- '.exe'
- '.hta'
- '.jar'
- '.js'
- '.ocx'
- '.scr'
- '.sys'
- '.vbe'
- '.vbs'
- '.wsf'
filter_main_user_temp:
TargetFilename|startswith: 'C:\Users\'
TargetFilename|contains: '\AppData\Local\Temp\'
TargetFilename|endswith:
- '.dll'
- '.exe'
filter_main_other_temp:
# Example: C:\Windows\Temp\0DA9758B-4649-4969-9409-5CBDF193FB53\TransmogProvider.dll
TargetFilename|startswith:
- 'C:\Windows\Temp\'
- 'C:\Windows\SystemTemp\'
TargetFilename|endswith:
- '.dll'
- '.exe'
filter_main_powershell_module:
TargetFilename|startswith: 'C:\Users\'
TargetFilename|contains: '\WindowsPowerShell\Modules\' # C:\Users\xxxx\Documents\WindowsPowerShell\Modules\powershell-yaml\0.4.12\lib\net47\PowerShellYamlSerializer.dll
TargetFilename|endswith: '.dll'
filter_main_nuget:
TargetFilename|startswith: 'C:\Program Files\PackageManagement\ProviderAssemblies\nuget\'
TargetFilename|endswith: '\Microsoft.PackageManagement.NuGetProvider.dll'
condition: selection and not 1 of filter_main_*
falsepositives:
- False positives will differ depending on the environment and scripts used. Apply additional filters accordingly.
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
Image|endswith:
- '\powershell.exe'
- '\powershell_ise.exe'
- '\pwsh.exe'
TargetFilename|endswith:
- '.bat'
- '.chm'
- '.cmd'
- '.com'
- '.dll'
- '.exe'
- '.hta'
- '.jar'
- '.js'
- '.ocx'
- '.scr'
- '.sys'
- '.vbe'
- '.vbs'
- '.wsf'
Stage 2: not filter_main_*
filter_main_user_temp:
TargetFilename|startswith: 'C:\Users\'
TargetFilename|contains: '\AppData\Local\Temp\'
TargetFilename|endswith:
- '.dll'
- '.exe'
filter_main_other_temp:
TargetFilename|startswith:
- 'C:\Windows\Temp\'
- 'C:\Windows\SystemTemp\'
TargetFilename|endswith:
- '.dll'
- '.exe'
filter_main_powershell_module:
TargetFilename|startswith: 'C:\Users\'
TargetFilename|contains: '\WindowsPowerShell\Modules\'
TargetFilename|endswith: '.dll'
filter_main_nuget:
TargetFilename|startswith: 'C:\Program Files\PackageManagement\ProviderAssemblies\nuget\'
TargetFilename|endswith: '\Microsoft.PackageManagement.NuGetProvider.dll'
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
TargetFilename | ends_with | .dll |
TargetFilename | ends_with | .exe |
TargetFilename | starts_with | C:\Windows\SystemTemp\ |
TargetFilename | starts_with | C:\Windows\Temp\ |
TargetFilename | ends_with | .dll |
TargetFilename | ends_with | .exe |
TargetFilename | match | \AppData\Local\Temp\ |
TargetFilename | starts_with | C:\Users\ |
TargetFilename | ends_with | .dll |
TargetFilename | match | \WindowsPowerShell\Modules\ |
TargetFilename | starts_with | C:\Users\ |
TargetFilename | ends_with | \Microsoft.PackageManagement.NuGetProvider.dll |
TargetFilename | starts_with | C:\Program Files\PackageManagement\ProviderAssemblies\nuget\ |
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
Image | ends_with |
|
TargetFilename | ends_with |
|