← Back to SOC feed Coverage →

Potential Persistence Via Microsoft Office Startup Folder

sigma HIGH SigmaHQ
T1137
imFileEvent
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T03:05:59Z · Confidence: medium

Hunt Hypothesis

Adversaries may leverage Microsoft Office startup folders to execute malicious files at login, establishing persistence within the environment. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential long-term compromise attempts.

Detection Rule

Sigma (Original)

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

KQL (Azure Sentinel)

imFileEvent
| where (((TargetFileName contains "\\Microsoft\\Word\\STARTUP" or (TargetFileName contains "\\Office" and TargetFileName contains "\\Program Files" and TargetFileName contains "\\STARTUP")) and (TargetFileName endswith ".doc" or TargetFileName endswith ".docm" or TargetFileName endswith ".docx" or TargetFileName endswith ".dot" or TargetFileName endswith ".dotm" or TargetFileName endswith ".rtf")) or ((TargetFileName contains "\\Microsoft\\Excel\\XLSTART" or (TargetFileName contains "\\Office" and TargetFileName contains "\\Program Files" and TargetFileName contains "\\XLSTART")) and (TargetFileName endswith ".xls" or TargetFileName endswith ".xlsm" or TargetFileName endswith ".xlsx" or TargetFileName endswith ".xlt" or TargetFileName endswith ".xltm"))) and (not((TargetFilePath endswith "\\WINWORD.exe" or TargetFilePath endswith "\\EXCEL.exe")))

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_office_startup_persistence.yml