Sigma rule: Office Macro File Creation
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-b12a120ef626, updated 2026-01-09T00:00:00.000Z.
Rule
- Title
- Office Macro File Creation
- Status
- test
- Level
- low
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-01-23
- Modified
- 2026-01-09
- File
- rules/windows/file/file_event/file_event_win_office_macro_files_created.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the creation of a new office macro files on the systems
Log source
- product
- windows
- category
- file_event
Detection
selection:
TargetFilename|endswith:
- '.docm'
- '.dotm'
- '.xlsm'
- '.xltm'
- '.potm'
- '.pptm'
filter_main_office:
Image|startswith:
- 'C:\Program Files\Microsoft Office\'
- 'C:\Program Files (x86)\Microsoft Office\'
Image|endswith:
- '\WINWORD.EXE'
- '\EXCEL.EXE'
- '\POWERPNT.EXE'
TargetFilename|contains: '\~$' # Temporary files created by Office applications
condition: selection and not 1 of filter_main_*False positives (as the rule lists them)
- Very common in environments that rely heavily on macro documents
Tags
- attack.initial-access
- attack.t1566.001
MITRE ATT&CK ids this rule names
Related rules
References
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1566.001/T1566.001.md
- https://learn.microsoft.com/en-us/deployoffice/compat/office-file-format-reference
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/file/file_event/file_event_win_office_macro_files_created.yml
Sources and licences
SigmaHQ
"Office Macro File Creation" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/file/file_event/file_event_win_office_macro_files_created.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Office Macro File Creation",
entity page, dataset version ref-b12a120ef626, updated 2026-01-09T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/91174a41-dc8f-401b-be89-7bfc140612a0 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 91174a41-dc8f-401b-be89-7bfc140612a0, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.