-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add rule: Office Macro Phishing Initial Access detection #5411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,46 @@ | ||||||
title: Suspicious Office Macro Execution via CLI Arguments | ||||||
id: 1b94f66b-46fc-4262-8937-74cfc8d2c8da | ||||||
status: experimental | ||||||
description: Detects Microsoft Office applications (Word, Excel, PowerPoint, etc.) started with suspicious command-line arguments such as /m, .dotm, or macro-related keywords like AutoOpen/AutoClose. | ||||||
These may indicate auto-executing Office macros used in phishing attacks to gain initial access. | ||||||
|
||||||
author: arjun-tarakesh | ||||||
date: 2025/05/11 | ||||||
references: | ||||||
- 'https://attack.mitre.org/techniques/T1566/001/' | ||||||
|
||||||
tags: | ||||||
- attack.execution | ||||||
- attack.t1566.001 | ||||||
- attack.t1059.001 | ||||||
logsource: | ||||||
category: process_creation | ||||||
product: windows | ||||||
detection: | ||||||
selection_parent: | ||||||
ParentImage|endswith: | ||||||
- '\WINWORD.EXE' | ||||||
- '\EXCEL.EXE' | ||||||
- '\POWERPNT.EXE' | ||||||
- '\MSPUB.EXE' | ||||||
- '\ONENOTE.EXE' | ||||||
- '\MSACCESS.EXE' | ||||||
- '\VISIO.EXE' | ||||||
|
||||||
selection_cmdline: | ||||||
CommandLine|contains: | ||||||
- '/m' | ||||||
- '/t' | ||||||
- '/n' | ||||||
- '.dotm' | ||||||
- 'AutoOpen' | ||||||
- 'AutoClose' | ||||||
- '/q' | ||||||
- '/quiet' | ||||||
- '/h' | ||||||
Comment on lines
+32
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @arjun-tarakesh This notation means an Not all of these flags are relevant to what you are trying to detect. I suggest you keep only those that are macro related and take care of the potential FP that might occur. I suggest you give this a read https://support.microsoft.com/en-us/office/command-line-switches-for-microsoft-office-products-079164cd-4ef5-4178-b235-441737deb3a6 |
||||||
|
||||||
condition: selection_parent and selection_cmdline | ||||||
|
||||||
Comment on lines
+42
to
+43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You do not need to leave spaces between sections. Please make sure of that for the rest of the rule.
Suggested change
|
||||||
falsepositives: | ||||||
- Legitimate use of Office CLI options in enterprise scripting environments or automation | ||||||
level: medium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.