Detection rules › Sigma

File With Uncommon Extension Created By An Office Application

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

Detects the creation of files with an executable or script extension by an Office application.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: File With Uncommon Extension Created By An Office Application
id: c7a74c80-ba5a-486e-9974-ab9e682bc5e4
status: test
description: Detects the creation of files with an executable or script extension by an Office application.
references:
    - https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/
    - https://github.com/vadim-hunter/Detection-Ideas-Rules/blob/02bcbfc2bfb8b4da601bb30de0344ae453aa1afe/Threat%20Intelligence/The%20DFIR%20Report/20210329_Sodinokibi_(aka_REvil)_Ransomware.yaml
author: Vadim Khrykov (ThreatIntel), Cyb3rEng (Rule), Nasreddine Bencherchali (Nextron Systems)
date: 2021-08-23
modified: 2025-10-17
tags:
    - attack.t1204.002
    - attack.execution
logsource:
    product: windows
    category: file_event
detection:
    # Note: Please add more file extensions to the logic of your choice.
    selection1:
        Image|endswith:
            - '\excel.exe'
            - '\msaccess.exe'
            - '\mspub.exe'
            - '\powerpnt.exe'
            - '\visio.exe'
            - '\winword.exe'
    selection2:
        TargetFilename|endswith:
            - '.bat'
            - '.cmd'
            - '.com'
            - '.dll'
            - '.exe'
            - '.hta'
            - '.ocx'
            - '.proj'
            - '.ps1'
            - '.scf'
            - '.scr'
            - '.sys'
            - '.vbe'
            - '.vbs'
            - '.wsf'
            - '.wsh'
    filter_main_localassembly:
        TargetFilename|contains: '\AppData\Local\assembly\tmp\'
        TargetFilename|endswith: '.dll'
    filter_optional_webservicecache: # matches e.g. directory with name *.microsoft.com
        TargetFilename|contains|all:
            - 'C:\Users\'
            - '\AppData\Local\Microsoft\Office\'
            - '\WebServiceCache\AllUsers'
        TargetFilename|endswith: '.com'
    filter_optional_webex:
        Image|endswith: '\winword.exe'
        TargetFilename|contains: '\AppData\Local\Temp\webexdelta\'
        TargetFilename|endswith:
            - '.dll'
            - '.exe'
    filter_optional_backstageinappnavcache: # matches e.g. C:\Users\xxxxx\AppData\Local\Microsoft\Office\16.0\BackstageInAppNavCache\ODB-user@domain.com
        TargetFilename|contains|all:
            - 'C:\Users\'
            - '\AppData\Local\Microsoft\Office\'
            - '\BackstageInAppNavCache\'
        TargetFilename|endswith: '.com'
    condition: all of selection* and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection* and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection1

selection1:
    Image|endswith:
        - '\excel.exe'
        - '\msaccess.exe'
        - '\mspub.exe'
        - '\powerpnt.exe'
        - '\visio.exe'
        - '\winword.exe'

Stage 2: selection2

selection2:
    TargetFilename|endswith:
        - '.bat'
        - '.cmd'
        - '.com'
        - '.dll'
        - '.exe'
        - '.hta'
        - '.ocx'
        - '.proj'
        - '.ps1'
        - '.scf'
        - '.scr'
        - '.sys'
        - '.vbe'
        - '.vbs'
        - '.wsf'
        - '.wsh'

Stage 3: not filter_main_localassembly

filter_main_localassembly:
    TargetFilename|contains: '\AppData\Local\assembly\tmp\'
    TargetFilename|endswith: '.dll'

Stage 4: not filter_optional_*

filter_optional_webservicecache:
    TargetFilename|contains|all:
        - 'C:\Users\'
        - '\AppData\Local\Microsoft\Office\'
        - '\WebServiceCache\AllUsers'
    TargetFilename|endswith: '.com'
filter_optional_webex:
    Image|endswith: '\winword.exe'
    TargetFilename|contains: '\AppData\Local\Temp\webexdelta\'
    TargetFilename|endswith:
        - '.dll'
        - '.exe'
filter_optional_backstageinappnavcache:
    TargetFilename|contains|all:
        - 'C:\Users\'
        - '\AppData\Local\Microsoft\Office\'
        - '\BackstageInAppNavCache\'
    TargetFilename|endswith: '.com'

Exclusions

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

FieldKindExcluded values
TargetFilenameends_with.dll
TargetFilenamematch\AppData\Local\assembly\tmp\
TargetFilenameends_with.dll
TargetFilenameends_with.exe
Imageends_with\winword.exe
TargetFilenamematch\AppData\Local\Temp\webexdelta\
TargetFilenameends_with.com
TargetFilenamematchC:\Users\
TargetFilenamematch\AppData\Local\Microsoft\Office\
TargetFilenamematch\BackstageInAppNavCache\
TargetFilenameends_with.com
TargetFilenamematchC:\Users\
TargetFilenamematch\AppData\Local\Microsoft\Office\
TargetFilenamematch\WebServiceCache\AllUsers

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
  • \excel.exe corpus 18 (sigma 18)
  • \msaccess.exe corpus 4 (sigma 4)
  • \mspub.exe corpus 10 (sigma 10)
  • \powerpnt.exe corpus 15 (sigma 15)
  • \visio.exe corpus 3 (sigma 3)
  • \winword.exe corpus 20 (sigma 20)
TargetFilenameends_with
  • .bat corpus 17 (sigma 17)
  • .cmd corpus 8 (sigma 8)
  • .com corpus 3 (sigma 3)
  • .dll corpus 23 (sigma 23)
  • .exe corpus 21 (sigma 20, splunk 1)
  • .hta corpus 13 (sigma 13)
  • .ocx corpus 3 (sigma 3)
  • .proj
  • .ps1 corpus 17 (sigma 17)
  • .scf corpus 2 (sigma 2)
  • .scr corpus 8 (sigma 8)
  • .sys corpus 6 (sigma 6)
  • .vbe corpus 15 (sigma 15)
  • .vbs corpus 18 (sigma 18)
  • .wsf corpus 7 (sigma 7)
  • .wsh corpus 3 (sigma 3)