Detection rules › Splunk

Windows Spearphishing Attachment Connect To None MS Office Domain

Status
production
Group by
QueryName, QueryResults, QueryStatus, answer, answer_count, dvc, process_guid, process_name, query, query_count, reply_code_id, signature, signature_id, src, user_id, vendor_product
Author
Teoderick Contreras, Splunk
Source
github.com/splunk/security_content

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 *.office.com or *.office.net. 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.

Known false positives

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

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 22: DNSEvent (DNS query)

Rule body

name: Windows Spearphishing Attachment Connect To None MS Office Domain
id: 1cb40e15-cffa-45cc-abbd-e35884a49766
version: 10
creation_date: '2023-01-27'
modification_date: '2026-05-13'
author: Teoderick Contreras, Splunk
status: production
type: Hunting
description: 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 *.office.com or *.office.net. 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.
data_source:
    - Sysmon EventID 22
search: '`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 ("*.office.com", "*.office.net")) | stats count min(_time) as firstTime max(_time) as lastTime by answer answer_count dvc process_exec process_guid process_name query query_count reply_code_id signature signature_id src user_id vendor_product QueryName QueryResults QueryStatus | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_spearphishing_attachment_connect_to_none_ms_office_domain_filter`'
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
references:
    - https://www.netskope.com/blog/asyncrat-using-fully-undetected-downloader
    - https://malpedia.caad.fkie.fraunhofer.de/details/win.asyncrat
analytic_story:
    - Spearphishing Attachments
    - AsyncRAT
    - MuddyWater
asset_type: Endpoint
mitre_attack_id:
    - T1566.001
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: network
security_domain: endpoint

Stages and Predicates

Stage 1: search

`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 ("*.office.com", "*.office.net"))

Stage 2: stats

| stats count min(_time) as firstTime max(_time) as lastTime by answer answer_count dvc process_exec process_guid process_name query query_count reply_code_id signature signature_id src user_id vendor_product QueryName QueryResults QueryStatus

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `windows_spearphishing_attachment_connect_to_none_ms_office_domain_filter`

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
QueryNamein"*.office.com", "*.office.net"excludes:QueryName

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 22 corpus 17 (splunk 17)
field:"EventID" kind:eq value:"22"
Imagein
  • "*\\excel.exe"
  • "*\\msaccess.exe"
  • "*\\mspub.exe"
  • "*\\onenote.exe"
  • "*\\onenoteim.exe"
  • "*\\onenotem.exe"
  • "*\\onenoteviewer.exe"
  • "*\\powerpnt.exe"
  • "*\\visio.exe"
  • "*\\winword.exe"
  • "*\\wordpad.exe"
  • "*\\wordview.exe"
field:"Image" kind:in