Add-in dropped into a Word or Excel automatic startup folder
Detects a loadable Office file appearing in one of the two folders whose contents Word and Excel open automatically at launch, which is the file-drop half of AN0137 and the part that survives without any registry write. The two folders are matched as separate arms, each paired with the extensions its own application loads, because a `.dotm` in XLSTART or a `.xlam` in the Word STARTUP folder is inert — a path list AND-ed against one shared extension list would report those crossed pairs as persistence. Excel's arm carries the macro workbook types (`.xlsm`, `.xls`, `.xlsb`, `.xltm`) as well as the add-in types, since XLSTART opens every workbook it contains and runs `Workbook_Open` / `Auto_Open` in it; `PERSONAL.XLSB` is filtered by name rather than by dropping the whole extension, because that one file is what Excel writes when a user records their first macro. `.xll` is included for completeness — Excel is normally pointed at an XLL through the `OPEN=` registry values or the Add-ins manager rather than by finding one in XLSTART. `.ppam` is absent: PowerPoint has no startup folder of this kind and registers add-ins only in the registry, so a `.ppam` written to either matched folder would not load. The user AddIns folder is also excluded, since a file there does nothing until it is registered in the Office Options keys. `\XLSTART\` is matched unanchored because that folder name is distinctive and appears in both the per-user and the Office install-root copies; the Word term is anchored to `\Microsoft\Word\STARTUP\` and therefore covers the per-user folder only, since the install-root equivalent sits under a version-numbered `...\root\OfficeNN\STARTUP\` path that cannot be written without guessing the release. Extensions here populate MITRE's AddInExtension knob; the values are ours. The lock-file filter removes the `~$` shadow files Office itself creates beside an open template. Prerequisite: Sysmon is not present in a default install, and the widely used shipped configurations trim EventID 11 down to a small extension set that does not include `.wll` or `.xlam` — confirm these folders are in scope before reading an empty result as clean. The analytic's other arms — the registry load path and the abnormal Office child process — are separate events and are not modelled here, and this rule cannot show that a dropped file ever loaded. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0050, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
The detection
The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.
detection.yml
title: Add-in dropped into a Word or Excel automatic startup folderid: 6ec36e84-a40b-4ecc-aa7e-37f64b164579status: experimentaldescription: | Detects a loadable Office file appearing in one of the two folders whose contents Word and Excel open automatically at launch, which is the file-drop half of AN0137 and the part that survives without any registry write. The two folders are matched as separate arms, each paired with the extensions its own application loads, because a `.dotm` in XLSTART or a `.xlam` in the Word STARTUP folder is inert — a path list AND-ed against one shared extension list would report those crossed pairs as persistence. Excel's arm carries the macro workbook types (`.xlsm`, `.xls`, `.xlsb`, `.xltm`) as well as the add-in types, since XLSTART opens every workbook it contains and runs `Workbook_Open` / `Auto_Open` in it; `PERSONAL.XLSB` is filtered by name rather than by dropping the whole extension, because that one file is what Excel writes when a user records their first macro. `.xll` is included for completeness — Excel is normally pointed at an XLL through the `OPEN=` registry values or the Add-ins manager rather than by finding one in XLSTART. `.ppam` is absent: PowerPoint has no startup folder of this kind and registers add-ins only in the registry, so a `.ppam` written to either matched folder would not load. The user AddIns folder is also excluded, since a file there does nothing until it is registered in the Office Options keys. `\XLSTART\` is matched unanchored because that folder name is distinctive and appears in both the per-user and the Office install-root copies; the Word term is anchored to `\Microsoft\Word\STARTUP\` and therefore covers the per-user folder only, since the install-root equivalent sits under a version-numbered `...\root\OfficeNN\STARTUP\` path that cannot be written without guessing the release. Extensions here populate MITRE's AddInExtension knob; the values are ours. The lock-file filter removes the `~$` shadow files Office itself creates beside an open template. Prerequisite: Sysmon is not present in a default install, and the widely used shipped configurations trim EventID 11 down to a small extension set that does not include `.wll` or `.xlam` — confirm these folders are in scope before reading an empty result as clean. The analytic's other arms — the registry load path and the abnormal Office child process — are separate events and are not modelled here, and this rule cannot show that a dropped file ever loaded. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0050, not hand-written and not tested by its author. Any lab result is on this rule's own page.references: - https://attack.mitre.org/techniques/T1137/006 - https://attack.mitre.org/detectionstrategies/DET0050author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags: - attack.persistence - attack.t1137.006logsource: category: file_event product: windowsdetection: selection_word_startup: TargetFilename|contains: '\Microsoft\Word\STARTUP\' TargetFilename|endswith: - '.wll' - '.dotm' - '.dot' selection_excel_xlstart: TargetFilename|contains: '\XLSTART\' TargetFilename|endswith: - '.xll' - '.xlam' - '.xla' - '.xlsm' - '.xlsb' - '.xls' - '.xltm' filter_office_lock_files: TargetFilename|contains: '\~$' filter_personal_macro_workbook: TargetFilename|endswith: '\PERSONAL.XLSB' condition: 1 of selection_* and not filter_office_lock_files and not filter_personal_macro_workbookfalsepositives: - "Add-ins deployed on purpose — a corporate reporting or compliance .xlam pushed by Group Policy or a software-distribution package, or a vendor product that installs a .wll during setup. The rule cannot tell a sanctioned add-in from a dropped one, so these are its main volume, and MITRE's TrustedPath knob is where an estate records the deployment paths and filenames it has approved." - "Users installing an add-in themselves from a download or a colleague, which in finance and engineering teams is routine and lands in exactly these folders." - "Profile roaming and folder sync. Office repair runs, version upgrades, roaming profiles and OneDrive Known Folder Move all re-materialise the contents of STARTUP and XLSTART, and Known Folder Move in particular produces a burst of creates per user on every first logon to a new machine with no install activity behind it." - "Backup, endpoint-protection and search-indexing agents that write a temporary copy of an add-in back into the same folder while scanning or restoring it, producing a file-create event with no user action behind it." - "Shared macro workbooks other than PERSONAL.XLSB. Teams that distribute a departmental .xlsm or .xltm into XLSTART so it opens for everyone will match the Excel arm on every deployment and every update."level: mediumSentinel · KQL
Run this as a search.
DeviceFileEvents| where ((((FolderPath contains "\\Microsoft\\Word\\STARTUP\\" and (FolderPath endswith ".wll" or FolderPath endswith ".dotm" or FolderPath endswith ".dot")) or (FolderPath contains "\\XLSTART\\" and (FolderPath endswith ".xll" or FolderPath endswith ".xlam" or FolderPath endswith ".xla" or FolderPath endswith ".xlsm" or FolderPath endswith ".xlsb" or FolderPath endswith ".xls" or FolderPath endswith ".xltm"))) and not (FolderPath contains "\\~$")) and not (FolderPath endswith "\\PERSONAL.XLSB"))
Splunk · SPL
Run this as a search.
index=* ((((TargetFilename="*\\Microsoft\\Word\\STARTUP\\*" AND (TargetFilename="*.wll" OR TargetFilename="*.dotm" OR TargetFilename="*.dot")) OR (TargetFilename="*\\XLSTART\\*" AND (TargetFilename="*.xll" OR TargetFilename="*.xlam" OR TargetFilename="*.xla" OR TargetFilename="*.xlsm" OR TargetFilename="*.xlsb" OR TargetFilename="*.xls" OR TargetFilename="*.xltm"))) AND NOT (TargetFilename="*\\~$*")) AND NOT (TargetFilename="*\\PERSONAL.XLSB"))Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE ((((TO_LOWER(file.path) LIKE "*\\\\microsoft\\\\word\\\\startup\\\\*" AND (TO_LOWER(file.path) LIKE "*.wll" OR TO_LOWER(file.path) LIKE "*.dotm" OR TO_LOWER(file.path) LIKE "*.dot")) OR (TO_LOWER(file.path) LIKE "*\\\\xlstart\\\\*" AND (TO_LOWER(file.path) LIKE "*.xll" OR TO_LOWER(file.path) LIKE "*.xlam" OR TO_LOWER(file.path) LIKE "*.xla" OR TO_LOWER(file.path) LIKE "*.xlsm" OR TO_LOWER(file.path) LIKE "*.xlsb" OR TO_LOWER(file.path) LIKE "*.xls" OR TO_LOWER(file.path) LIKE "*.xltm"))) AND NOT (TO_LOWER(file.path) LIKE "*\\\\~$*")) AND NOT (TO_LOWER(file.path) LIKE "*\\\\personal.xlsb"))
Wazuh · XML rule
Deploy to your manager — this is a rule, not a search.
<group name="sigma,windows,file_event,"> <!-- Rule ids must be unique on your manager; 100000+ is the user range. --> <!-- 2 rules: the Sigma condition ORs across different fields, which one rule cannot express. Any one matching is a hit. --> <rule id="100000" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="TargetFilename" type="pcre2">(?i)\\Microsoft\\Word\\STARTUP\\</field> <field name="TargetFilename" type="pcre2">(?i)(\.wll$|\.dotm$|\.dot$)</field> <field name="TargetFilename" negate="yes" type="pcre2">(?i)\\~\$</field> <field name="TargetFilename" negate="yes" type="pcre2">(?i)\\PERSONAL\.XLSB$</field> <description>Add-in dropped into a Word or Excel automatic startup folder (1/2)</description> <mitre> <id>T1137.006</id> </mitre> </rule> <rule id="100001" level="7"> <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. --> <field name="TargetFilename" type="pcre2">(?i)\\XLSTART\\</field> <field name="TargetFilename" type="pcre2">(?i)(\.xll$|\.xlam$|\.xla$|\.xlsm$|\.xlsb$|\.xls$|\.xltm$)</field> <field name="TargetFilename" negate="yes" type="pcre2">(?i)\\~\$</field> <field name="TargetFilename" negate="yes" type="pcre2">(?i)\\PERSONAL\.XLSB$</field> <description>Add-in dropped into a Word or Excel automatic startup folder (2/2)</description> <mitre> <id>T1137.006</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.
Log in to report a verdict.
Log in to join the discussion.
No comments yet. Someone who deploys this will have something to say about it.