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
Sentinel · 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.