Detection rules › Sigma

Windows Binaries Write Suspicious Extensions

Status
test
Severity
high
Log source
product windows, category file_event
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects Windows executables that write files with suspicious extensions

MITRE ATT&CK coverage

TacticTechniques
StealthT1036 Masquerading

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Windows Binaries Write Suspicious Extensions
id: b8fd0e93-ff58-4cbd-8f48-1c114e342e62
related:
    - id: 1277f594-a7d1-4f28-a2d3-73af5cbeab43
      type: derived
status: test
description: Detects Windows executables that write files with suspicious extensions
references:
    - Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
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

Stages and Predicates

Stage 0: condition

1 of selection_* and not 1 of filter_main_*

Stage 1: selection_generic

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'

Stage 2: selection_special

selection_special:
    Image|endswith:
        - '\dllhost.exe'
        - '\rundll32.exe'
        - '\svchost.exe'
    TargetFilename|endswith:
        - '.bat'
        - '.hta'
        - '.iso'
        - '.ps1'
        - '.vbe'
        - '.vbs'

Stage 3: not filter_main_*

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'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
ImageeqC:\Windows\SysWOW64\svchost.exe
ImageeqC:\Windows\system32\svchost.exe
TargetFilenamestarts_withC:\Program Files (x86)\WindowsApps\Microsoft.PowerShellPreview
TargetFilenamestarts_withC:\Program Files\WindowsApps\Microsoft.PowerShellPreview
TargetFilenameends_with.ps1
TargetFilenameends_with.bat
TargetFilenameends_with.ps1
ImageeqC:\Windows\system32\svchost.exe
TargetFilenamematchC:\Windows\System32\GroupPolicy\DataStore\
TargetFilenamematch\Machine\Scripts\Startup\
TargetFilenamematch\Policies\
TargetFilenamematch\sysvol\
ImageeqC:\Windows\System32\dllhost.exe
TargetFilenameends_with.ps1
TargetFilenamematch:\Users\
TargetFilenamematch\AppData\Local\Temp\__PSScriptPolicyTest_
ImageeqC:\Windows\system32\svchost.exe
TargetFilenamematch.ps1
TargetFilenamematchC:\Program Files\WindowsApps\Clipchamp

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.

FieldKindValues
Imageends_with
  • \RuntimeBroker.exe corpus 4 (sigma 4)
  • \csrss.exe corpus 3 (sigma 3)
  • \dllhost.exe corpus 11 (sigma 11)
  • \lsass.exe corpus 5 (sigma 5)
  • \rundll32.exe corpus 95 (sigma 95)
  • \sihost.exe corpus 2 (sigma 2)
  • \smss.exe corpus 2 (sigma 2)
  • \svchost.exe corpus 23 (sigma 23)
  • \wininit.exe corpus 3 (sigma 3)
  • \winlogon.exe corpus 6 (sigma 6)
TargetFilenameends_with
  • .bat corpus 17 (sigma 17)
  • .dll corpus 23 (sigma 23)
  • .exe corpus 21 (sigma 20, splunk 1)
  • .hta corpus 13 (sigma 13)
  • .iso corpus 5 (sigma 5)
  • .ps1 corpus 17 (sigma 17)
  • .txt corpus 3 (sigma 3)
  • .vbe corpus 15 (sigma 15)
  • .vbs corpus 18 (sigma 18)