Detection rules › Splunk

Windows Office Product Loading VBE7 DLL

Status
production
Severity
low
Group by
dest, image_loaded, original_file_name, process_guid, process_hash, process_id, process_name, service_dll_signature_exists, service_dll_signature_verified, signature, signature_id, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

The following analytic identifies office documents executing macro code. It leverages Sysmon EventCode 7 to detect when processes like WINWORD.EXE or EXCEL.EXE load specific DLLs associated with macros (e.g., VBE7.DLL). This activity is significant because macros are a common attack vector for delivering malicious payloads, such as malware. If confirmed malicious, this could lead to unauthorized code execution, data exfiltration, or further compromise of the system. Disabling macros by default is recommended to mitigate this risk.

Known false positives

  • False positives may occur if legitimate office documents are executing macro code. Ensure to investigate the macro code and the command to be executed. If the macro code is benign, add the document name to the exclusion list. Some applications may legitimately load VBE7INTL.DLL, VBE7.DLL, or VBEUI.DLL.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 7: Image loaded

Rule body

name: Windows Office Product Loading VBE7 DLL
id: 7cfec906-2697-43f7-898b-83634a051d9a
version: 7
creation_date: '2021-04-14'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: The following analytic identifies office documents executing macro code. It leverages Sysmon EventCode 7 to detect when processes like WINWORD.EXE or EXCEL.EXE load specific DLLs associated with macros (e.g., VBE7.DLL). This activity is significant because macros are a common attack vector for delivering malicious payloads, such as malware. If confirmed malicious, this could lead to unauthorized code execution, data exfiltration, or further compromise of the system. Disabling macros by default is recommended to mitigate this risk.
data_source:
    - Sysmon EventID 7
search: '`sysmon` EventCode=7 process_name IN ("EQNEDT32.exe", "excel.exe", "Graph.exe", "msaccess.exe", "mspub.exe", "onenote.exe", "onenoteim.exe", "onenotem.exe", "outlook.exe", "powerpnt.exe", "visio.exe", "winproj.exe", "winword.exe") loaded_file_path IN ("*\\VBE7INTL.DLL", "*\\VBE7.DLL", "*\\VBEUI.DLL") | fillnull | stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded dest loaded_file loaded_file_path original_file_name process_exec process_guid process_hash process_id process_name process_path service_dll_signature_exists service_dll_signature_verified signature signature_id user_id vendor_product | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_office_product_loading_vbe7_dll_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting logs with the process name and ImageLoaded (Like sysmon EventCode 7) from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Also be sure to include those monitored dll to your own sysmon config.
known_false_positives: False positives may occur if legitimate office documents are executing macro code. Ensure to investigate the macro code and the command to be executed. If the macro code is benign, add the document name to the exclusion list. Some applications may legitimately load VBE7INTL.DLL, VBE7.DLL, or VBEUI.DLL.
references:
    - https://www.joesandbox.com/analysis/386500/0/html
    - https://www.joesandbox.com/analysis/702680/0/html
    - https://bazaar.abuse.ch/sample/02cbc1ab80695fc12ff8822b926957c3a600247b9ca412a137f69cb5716c8781/
    - https://www.fortinet.com/blog/threat-research/latest-remcos-rat-phishing
    - https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/trojanized-onenote-document-leads-to-formbook-malware/
    - https://www.fortinet.com/blog/threat-research/leveraging-microsoft-office-documents-to-deliver-agent-tesla-and-njrat
intermediate_findings:
    entities:
        - field: dest
          type: system
          score: 20
          message: Office document executing a macro on $dest$
analytic_story:
    - Spearphishing Attachments
    - Trickbot
    - IcedID
    - DarkCrystal RAT
    - AgentTesla
    - Qakbot
    - Azorult
    - Remcos
    - PlugX
    - NjRAT
    - MuddyWater
asset_type: Endpoint
mitre_attack_id:
    - T1566.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`sysmon` EventCode=7 process_name IN ("EQNEDT32.exe", "excel.exe", "Graph.exe", "msaccess.exe", "mspub.exe", "onenote.exe", "onenoteim.exe", "onenotem.exe", "outlook.exe", "powerpnt.exe", "visio.exe", "winproj.exe", "winword.exe") loaded_file_path IN ("*\\VBE7INTL.DLL", "*\\VBE7.DLL", "*\\VBEUI.DLL")

Stage 2: fillnull

| fillnull

Stage 3: stats

| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded dest loaded_file loaded_file_path original_file_name process_exec process_guid process_hash process_id process_name process_path service_dll_signature_exists service_dll_signature_verified signature signature_id user_id vendor_product

Stage 4: search

| `security_content_ctime(firstTime)`

Stage 5: search

| `security_content_ctime(lastTime)`

Stage 6: search

| `windows_office_product_loading_vbe7_dll_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 7 corpus 41 (splunk 39, elastic 1, kusto 1)
field:"EventID" kind:eq value:"7"
loaded_file_pathin
  • "*\\VBE7.DLL"
  • "*\\VBE7INTL.DLL"
  • "*\\VBEUI.DLL"
field:"ImageLoaded" kind:in
process_namein
  • "EQNEDT32.exe" corpus 8 (elastic 8)
  • "Graph.exe"
  • "excel.exe" corpus 34 (elastic 34)
  • "msaccess.exe" corpus 19 (elastic 19)
  • "mspub.exe" corpus 15 (elastic 15)
  • "onenote.exe"
  • "onenoteim.exe"
  • "onenotem.exe"
  • "outlook.exe" corpus 9 (elastic 7, splunk 2)
  • "powerpnt.exe" corpus 31 (elastic 31)
  • "visio.exe" corpus 2 (elastic 2)
  • "winproj.exe"
  • "winword.exe" corpus 35 (elastic 35)
field:"process_name" kind:in