Detection rules › Sigma

Potential Persistence Via Microsoft Office Startup Folder

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

Detects creation of Microsoft Office files inside of one of the default startup folders in order to achieve persistence.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1137 Office Application Startup

Event coverage

ProviderEventTitle
SysmonEvent ID 11FileCreate

Rule body yaml

title: Potential Persistence Via Microsoft Office Startup Folder
id: 0e20c89d-2264-44ae-8238-aeeaba609ece
status: test
description: Detects creation of Microsoft Office files inside of one of the default startup folders in order to achieve persistence.
references:
    - https://insight-jp.nttsecurity.com/post/102hojk/operation-restylink-apt-campaign-targeting-japanese-companies
    - https://learn.microsoft.com/en-us/office/troubleshoot/excel/use-startup-folders
author: Max Altgelt (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-02
modified: 2023-06-22
tags:
    - attack.persistence
    - attack.t1137
logsource:
    category: file_event
    product: windows
detection:
    selection_word_paths:
        - TargetFilename|contains: '\Microsoft\Word\STARTUP'
        - TargetFilename|contains|all:
              - '\Office'
              - '\Program Files'
              - '\STARTUP'
    selection_word_extension:
        TargetFilename|endswith:
            - '.doc'
            - '.docm'
            - '.docx'
            - '.dot'
            - '.dotm'
            - '.rtf'
    selection_excel_paths:
        - TargetFilename|contains: '\Microsoft\Excel\XLSTART'
        - TargetFilename|contains|all:
              - '\Office'
              - '\Program Files'
              - '\XLSTART'
    selection_excel_extension:
        TargetFilename|endswith:
            - '.xls'
            - '.xlsm'
            - '.xlsx'
            - '.xlt'
            - '.xltm'
    filter_main_office:
        Image|endswith:
            - '\WINWORD.exe'
            - '\EXCEL.exe'
    condition: (all of selection_word_* or all of selection_excel_*) and not filter_main_office
falsepositives:
    - Loading a user environment from a backup or a domain controller
    - Synchronization of templates
level: high

Stages and Predicates

Stage 0: condition

(all of selection_word_* or all of selection_excel_*) and not filter_main_office

Stage 1: selection_word_paths

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

Stage 2: selection_word_extension

selection_word_extension:
    TargetFilename|endswith:
        - '.doc'
        - '.docm'
        - '.docx'
        - '.dot'
        - '.dotm'
        - '.rtf'

Stage 3: selection_excel_paths

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

Stage 4: selection_excel_extension

selection_excel_extension:
    TargetFilename|endswith:
        - '.xls'
        - '.xlsm'
        - '.xlsx'
        - '.xlt'
        - '.xltm'

Stage 5: not filter_main_office

filter_main_office:
    Image|endswith:
        - '\WINWORD.exe'
        - '\EXCEL.exe'

Exclusions

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

FieldKindExcluded values
Imageends_with\EXCEL.exe
Imageends_with\WINWORD.exe

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
TargetFilenameends_with
  • .doc
  • .docm corpus 4 (sigma 4)
  • .docx
  • .dot
  • .dotm corpus 4 (sigma 4)
  • .rtf
  • .xls
  • .xlsm corpus 4 (sigma 4)
  • .xlsx
  • .xlt
  • .xltm corpus 4 (sigma 4)
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)