Detection rules › Sigma

Uncommon File Created In Office Startup Folder

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

Detects the creation of a file with an uncommon extension in an Office application startup folder

MITRE ATT&CK coverage

TacticTechniques
Resource DevelopmentT1587.001 Develop Capabilities: Malware

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Uncommon File Created In Office Startup Folder
id: a10a2c40-2c4d-49f8-b557-1a946bc55d9d
status: test
description: Detects the creation of a file with an uncommon extension in an Office application startup folder
references:
    - https://app.any.run/tasks/d6fe6624-6ef8-485d-aa75-3d1bdda2a08c/
    - http://addbalance.com/word/startup.htm
    - https://answers.microsoft.com/en-us/msoffice/forum/all/document-in-word-startup-folder-doesnt-open-when/44ab0932-2917-4150-8cdc-2f2cf39e86f3
    - https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-05
modified: 2023-12-13
tags:
    - attack.resource-development
    - attack.t1587.001
logsource:
    product: windows
    category: file_event
detection:
    selection_word_paths:
        - TargetFilename|contains: '\Microsoft\Word\STARTUP'
        - TargetFilename|contains|all:
              - '\Office'
              - '\Program Files'
              - '\STARTUP'
    filter_exclude_word_ext:
        TargetFilename|endswith:
            - '.docb' # Word binary document introduced in Microsoft Office 2007
            - '.docm' # Word macro-enabled document; same as docx, but may contain macros and scripts
            - '.docx' # Word document
            - '.dotm' # Word macro-enabled template; same as dotx, but may contain macros and scripts
            - '.mdb' # MS Access DB
            - '.mdw' # MS Access DB
            - '.pdf' # PDF documents
            - '.wll' # Word add-in
            - '.wwl' # Word add-in
    selection_excel_paths:
        - TargetFilename|contains: '\Microsoft\Excel\XLSTART'
        - TargetFilename|contains|all:
              - '\Office'
              - '\Program Files'
              - '\XLSTART'
    filter_exclude_excel_ext:
        TargetFilename|endswith:
            - '.xll'
            - '.xls'
            - '.xlsm'
            - '.xlsx'
            - '.xlt'
            - '.xltm'
            - '.xlw'
    filter_main_office_click_to_run:
        Image|contains: ':\Program Files\Common Files\Microsoft Shared\ClickToRun\'
        Image|endswith: '\OfficeClickToRun.exe'
    filter_main_office_apps:
        Image|contains:
            - ':\Program Files\Microsoft Office\'
            - ':\Program Files (x86)\Microsoft Office\'
        Image|endswith:
            - '\winword.exe'
            - '\excel.exe'
    condition: ((selection_word_paths and not filter_exclude_word_ext) or (selection_excel_paths and not filter_exclude_excel_ext)) and not 1 of filter_main_*
falsepositives:
    - False positive might stem from rare extensions used by other Office utilities.
level: high

Stages and Predicates

Stage 0: condition

((selection_word_paths and not filter_exclude_word_ext) or (selection_excel_paths and not filter_exclude_excel_ext)) and not 1 of filter_main_*

Stage 1: selection_word_paths

selection_word_paths:
    - TargetFilename|contains: '\Microsoft\Word\STARTUP'
    - TargetFilename|contains|all:
          - '\Office'
          - '\Program Files'
          - '\STARTUP'

Stage 2: not filter_exclude_word_ext

filter_exclude_word_ext:
    TargetFilename|endswith:
        - '.docb'
        - '.docm'
        - '.docx'
        - '.dotm'
        - '.mdb'
        - '.mdw'
        - '.pdf'
        - '.wll'
        - '.wwl'

Stage 3: selection_excel_paths

selection_excel_paths:
    - TargetFilename|contains: '\Microsoft\Excel\XLSTART'
    - TargetFilename|contains|all:
          - '\Office'
          - '\Program Files'
          - '\XLSTART'

Stage 4: not filter_exclude_excel_ext

filter_exclude_excel_ext:
    TargetFilename|endswith:
        - '.xll'
        - '.xls'
        - '.xlsm'
        - '.xlsx'
        - '.xlt'
        - '.xltm'
        - '.xlw'

Stage 5: not filter_main_*

filter_main_office_click_to_run:
    Image|contains: ':\Program Files\Common Files\Microsoft Shared\ClickToRun\'
    Image|endswith: '\OfficeClickToRun.exe'
filter_main_office_apps:
    Image|contains:
        - ':\Program Files\Microsoft Office\'
        - ':\Program Files (x86)\Microsoft Office\'
    Image|endswith:
        - '\winword.exe'
        - '\excel.exe'

Exclusions

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

FieldKindExcluded values
TargetFilenameends_with.docb
TargetFilenameends_with.docm
TargetFilenameends_with.docx
TargetFilenameends_with.dotm
TargetFilenameends_with.mdb
TargetFilenameends_with.mdw
TargetFilenameends_with.pdf
TargetFilenameends_with.wll
TargetFilenameends_with.wwl
TargetFilenameends_with.xll
TargetFilenameends_with.xls
TargetFilenameends_with.xlsm
TargetFilenameends_with.xlsx
TargetFilenameends_with.xlt
TargetFilenameends_with.xltm
TargetFilenameends_with.xlw
Imageends_with\excel.exe
Imageends_with\winword.exe
Imagematch:\Program Files (x86)\Microsoft Office\
Imagematch:\Program Files\Microsoft Office\
Imageends_with\OfficeClickToRun.exe
Imagematch:\Program Files\Common Files\Microsoft Shared\ClickToRun\

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
TargetFilenamematch
  • \Microsoft\Excel\XLSTART corpus 2 (sigma 2)
  • \Microsoft\Word\STARTUP corpus 2 (sigma 2)
  • \Office corpus 2 (sigma 2)
  • \Program Files corpus 2 (sigma 2)
  • \STARTUP corpus 2 (sigma 2)
  • \XLSTART corpus 2 (sigma 2)