Try in Splunk Security Cloud


The following analytic identifies suspicious Office documents that connect to non-Microsoft Office domains. It leverages Sysmon EventCode 22 to detect processes like winword.exe or excel.exe making DNS queries to domains outside of * or * This activity is significant as it may indicate a spearphishing attempt using malicious documents to download or connect to harmful content. If confirmed malicious, this could lead to unauthorized data access, malware infection, or further network compromise.

  • Type: Hunting
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-23
  • Author: Teoderick Contreras, Splunk
  • ID: 1cb40e15-cffa-45cc-abbd-e35884a49766




ID Technique Tactic
T1566.001 Spearphishing Attachment Initial Access
T1566 Phishing Initial Access
Kill Chain Phase
  • Delivery
  • DE.AE
  • CIS 10
`sysmon` EventCode=22 Image IN ("*\\winword.exe","*\\excel.exe","*\\powerpnt.exe","*\\mspub.exe","*\\visio.exe","*\\wordpad.exe","*\\wordview.exe","*\\onenote.exe", "*\\onenotem.exe","*\\onenoteviewer.exe","*\\onenoteim.exe", "*\\msaccess.exe") AND NOT(QueryName IN ("*", "*")) 
| stats count min(_time) as firstTime max(_time) as lastTime by Image QueryName QueryResults QueryStatus Computer 
| rename Computer as dest 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_spearphishing_attachment_connect_to_none_ms_office_domain_filter`


The SPL above uses the following Macros:

:information_source: windows_spearphishing_attachment_connect_to_none_ms_office_domain_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • Image
  • QueryName
  • QueryResults
  • QueryStatus
  • dest

How To Implement

To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

Known False Positives

Windows Office document may contain legitimate url link other than MS office Domain. filter is needed

Associated Analytic Story


Risk Score Impact Confidence Message
9.0 30 30 a office document process $Image$ connect to an URL link $QueryName$ in $dest$

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.


Test Dataset

Replay any dataset to Splunk Enterprise by using our tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 3